id-utils-4.6+git20120811/0000775000000000000000000000000012210465166011406 5ustar id-utils-4.6+git20120811/m4/0000775000000000000000000000000012210465166011726 5ustar id-utils-4.6+git20120811/m4/xstrndup.m40000664000000000000000000000063112166360012014051 0ustar # xstrndup.m4 serial 2 dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSTRNDUP], [ gl_PREREQ_XSTRNDUP ]) # Prerequisites of lib/xstrndup.c. AC_DEFUN([gl_PREREQ_XSTRNDUP], [ : ]) id-utils-4.6+git20120811/m4/intlmacosx.m40000664000000000000000000000474612166360012014356 0ustar # intlmacosx.m4 serial 4 (gettext-0.18.2) dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) id-utils-4.6+git20120811/m4/exponentd.m40000664000000000000000000000753312166360012014176 0ustar # exponentd.m4 serial 2 dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'double'], [gl_cv_cc_double_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_double_expbit0=`cat conftest.out`], [gl_cv_cc_double_expbit0="unknown"], [ dnl On ARM, there are two 'double' floating-point formats, used by dnl different sets of instructions: The older FPA instructions assume dnl that they are stored in big-endian word order, while the words dnl (like integer types) are stored in little-endian byte order. dnl The newer VFP instructions assume little-endian order consistenly. AC_EGREP_CPP([mixed_endianness], [ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif ], [gl_cv_cc_double_expbit0="unknown"], [ pushdef([AC_MSG_CHECKING],[:])dnl pushdef([AC_MSG_RESULT],[:])dnl pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl AC_C_BIGENDIAN( [gl_cv_cc_double_expbit0="word 0 bit 20"], [gl_cv_cc_double_expbit0="word 1 bit 20"], [gl_cv_cc_double_expbit0="unknown"]) popdef([AC_MSG_RESULT_UNQUOTED])dnl popdef([AC_MSG_RESULT])dnl popdef([AC_MSG_CHECKING])dnl ]) ]) rm -f conftest.out ]) case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'double'.]) AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.]) ;; esac ]) id-utils-4.6+git20120811/m4/manywarnings.m40000664000000000000000000001215612166360012014704 0ustar # manywarnings.m4 serial 3 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson # gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR) # -------------------------------------------------- # Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR. # Elements separated by whitespace. In set logic terms, the function # does OUTVAR = LISTVAR \ REMOVEVAR. AC_DEFUN([gl_MANYWARN_COMPLEMENT], [ gl_warn_set= set x $2; shift for gl_warn_item do case " $3 " in *" $gl_warn_item "*) ;; *) gl_warn_set="$gl_warn_set $gl_warn_item" ;; esac done $1=$gl_warn_set ]) # gl_MANYWARN_ALL_GCC(VARIABLE) # ----------------------------- # Add all documented GCC warning parameters to variable VARIABLE. # Note that you need to test them using gl_WARN_ADD if you want to # make sure your gcc understands it. AC_DEFUN([gl_MANYWARN_ALL_GCC], [ dnl First, check if -Wno-missing-field-initializers is needed. dnl -Wmissing-field-initializers is implied by -W, but that issues dnl warnings with GCC version before 4.7, for the common idiom dnl of initializing types on the stack to zero, using { 0, } AC_REQUIRE([AC_PROG_CC]) if test -n "$GCC"; then dnl First, check -W -Werror -Wno-missing-field-initializers is supported dnl with the current $CC $CFLAGS $CPPFLAGS. AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[]])], [gl_cv_cc_nomfi_supported=yes], [gl_cv_cc_nomfi_supported=no]) CFLAGS="$gl_save_CFLAGS"]) AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) if test "$gl_cv_cc_nomfi_supported" = yes; then dnl Now check whether -Wno-missing-field-initializers is needed dnl for the { 0, } construct. AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -W -Werror" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[void f (void) { typedef struct { int a; int b; } s_t; s_t s1 = { 0, }; } ]], [[]])], [gl_cv_cc_nomfi_needed=no], [gl_cv_cc_nomfi_needed=yes]) CFLAGS="$gl_save_CFLAGS" ]) AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) fi fi gl_manywarn_set= for gl_manywarn_item in \ -Wall \ -W \ -Wformat-y2k \ -Wformat-nonliteral \ -Wformat-security \ -Winit-self \ -Wmissing-include-dirs \ -Wswitch-default \ -Wswitch-enum \ -Wunused \ -Wunknown-pragmas \ -Wstrict-aliasing \ -Wstrict-overflow \ -Wsystem-headers \ -Wfloat-equal \ -Wtraditional \ -Wtraditional-conversion \ -Wdeclaration-after-statement \ -Wundef \ -Wshadow \ -Wunsafe-loop-optimizations \ -Wpointer-arith \ -Wbad-function-cast \ -Wc++-compat \ -Wcast-qual \ -Wcast-align \ -Wwrite-strings \ -Wconversion \ -Wsign-conversion \ -Wlogical-op \ -Waggregate-return \ -Wstrict-prototypes \ -Wold-style-definition \ -Wmissing-prototypes \ -Wmissing-declarations \ -Wmissing-noreturn \ -Wmissing-format-attribute \ -Wpacked \ -Wpadded \ -Wredundant-decls \ -Wnested-externs \ -Wunreachable-code \ -Winline \ -Winvalid-pch \ -Wlong-long \ -Wvla \ -Wvolatile-register-var \ -Wdisabled-optimization \ -Wstack-protector \ -Woverlength-strings \ -Wbuiltin-macro-redefined \ -Wmudflap \ -Wpacked-bitfield-compat \ -Wsync-nand \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # The following are not documented in the manual but are included in # output from gcc --help=warnings. for gl_manywarn_item in \ -Wattributes \ -Wcoverage-mismatch \ -Wmultichar \ -Wunused-macros \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # More warnings from gcc 4.6.2 --help=warnings. for gl_manywarn_item in \ -Wabi \ -Wcpp \ -Wdeprecated \ -Wdeprecated-declarations \ -Wdiv-by-zero \ -Wdouble-promotion \ -Wendif-labels \ -Wextra \ -Wformat-contains-nul \ -Wformat-extra-args \ -Wformat-zero-length \ -Wformat=2 \ -Wmultichar \ -Wnormalized=nfc \ -Woverflow \ -Wpointer-to-int-cast \ -Wpragmas \ -Wsuggest-attribute=const \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ -Wtrampolines \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # Disable the missing-field-initializers warning if needed if test "$gl_cv_cc_nomfi_needed" = yes; then gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" fi $1=$gl_manywarn_set ]) id-utils-4.6+git20120811/m4/libunistring-base.m40000664000000000000000000001426012166360012015606 0ustar # libunistring-base.m4 serial 5 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paolo Bonzini and Bruno Haible. dnl gl_LIBUNISTRING_MODULE([VERSION], [Module]) dnl Declares that the source files of Module should be compiled, unless we dnl are linking with libunistring and its version is >= the given VERSION. dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is dnl true if the source files of Module should be compiled. dnl This macro is to be used for public libunistring API, not for dnl undocumented API. dnl dnl You have to bump the VERSION argument to the next projected version dnl number each time you make a change that affects the behaviour of the dnl functions defined in Module (even if the sources of Module itself do not dnl change). AC_DEFUN([gl_LIBUNISTRING_MODULE], [ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]), [gl_LIBUNISTRING_VERSION_CMP([$1])]) ]) dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile]) dnl Declares that HeaderFile should be created, unless we are linking dnl with libunistring and its version is >= the given VERSION. dnl HeaderFile should be relative to the lib directory and end in '.h'. dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty). dnl dnl When we are linking with the already installed libunistring and its version dnl is < VERSION, we create HeaderFile here, because we may compile functions dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed dnl version. dnl When we are linking with the already installed libunistring and its version dnl is > VERSION, we don't create HeaderFile here: it could cause compilation dnl errors in other libunistring header files if some types are missing. dnl dnl You have to bump the VERSION argument to the next projected version dnl number each time you make a non-comment change to the HeaderFile. AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], [ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. if gl_LIBUNISTRING_VERSION_CMP([$1]); then LIBUNISTRING_[]AS_TR_CPP([$2])='$2' else LIBUNISTRING_[]AS_TR_CPP([$2])= fi AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2])) ]) dnl Miscellaneous preparations/initializations. AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE], [ dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point. m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])]) AC_REQUIRE([AC_PROG_AWK]) dnl Sed expressions to extract the parts of a version number. changequote(,) gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' changequote([,]) if test "$HAVE_LIBUNISTRING" = yes; then LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` fi ]) dnl gl_LIBUNISTRING_VERSION_CMP([VERSION]) dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION dnl is less than the VERSION argument. AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], [ { test "$HAVE_LIBUNISTRING" != yes \ || { dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least. AS_LITERAL_IF([$1], [dnl This is the optimized variant, that assumes the argument is a literal: m4_pushdef([requested_version_major], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])]) m4_pushdef([requested_version_minor], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) m4_pushdef([requested_version_subminor], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \ || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \ && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \ || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor } } } m4_popdef([requested_version_subminor]) m4_popdef([requested_version_minor]) m4_popdef([requested_version_major]) ], [dnl This is the unoptimized variant: requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"` requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"` requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"` test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \ || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \ && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \ || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor } } } ]) } }]) dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the dnl same as ORIG, otherwise to 0. m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])]) id-utils-4.6+git20120811/m4/getcwd-path-max.m40000664000000000000000000001274212166360012015162 0ustar # serial 19 # Check for several getcwd bugs with long file names. # If so, arrange to compile the wrapper function. # This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20. # I've heard that this is due to a Linux kernel bug, and that it has # been fixed between 2.4.21-pre3 and 2.4.21-pre4. # Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # From Jim Meyering AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], [ AC_CHECK_DECLS_ONCE([getcwd]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CACHE_CHECK([whether getcwd handles long file names properly], gl_cv_func_getcwd_path_max, [# Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir3" dnl Please keep this in sync with tests/test-getcwd.c. AC_RUN_IFELSE( [AC_LANG_SOURCE( [[ #include #include #if HAVE_UNISTD_H # include #else # include #endif #include #include #include #include #include ]gl_PATHMAX_SNIPPET[ #ifndef AT_FDCWD # define AT_FDCWD 0 #endif #ifdef ENAMETOOLONG # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) #else # define is_ENAMETOOLONG(x) 0 #endif /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ #undef mkdir #ifndef S_IRWXU # define S_IRWXU 0700 #endif /* The length of this name must be 8. */ #define DIR_NAME "confdir3" #define DIR_NAME_LEN 8 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1) /* The length of "../". */ #define DOTDOTSLASH_LEN 3 /* Leftover bytes in the buffer, to work around library or OS bugs. */ #define BUF_SLOP 20 int main () { #ifndef PATH_MAX /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- at least not on a local file system. And if we were to start worrying about remote file systems, we'd have to enable the wrapper function all of the time, just to be safe. That's not worth the cost. */ exit (0); #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - DIR_NAME_SIZE - BUF_SLOP) \ <= PATH_MAX) /* FIXME: Assuming there's a system for which this is true, this should be done in a compile test. */ exit (0); #else char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + DIR_NAME_SIZE + BUF_SLOP]; char *cwd = getcwd (buf, PATH_MAX); size_t initial_cwd_len; size_t cwd_len; int fail = 0; size_t n_chdirs = 0; if (cwd == NULL) exit (10); cwd_len = initial_cwd_len = strlen (cwd); while (1) { size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); char *c = NULL; cwd_len += DIR_NAME_SIZE; /* If mkdir or chdir fails, it could be that this system cannot create any file with an absolute name longer than PATH_MAX, such as cygwin. If so, leave fail as 0, because the current working directory can't be too long for getcwd if it can't even be created. For other errors, be pessimistic and consider that as a failure, too. */ if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) { if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) fail = 20; break; } if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) { c = getcwd (buf, PATH_MAX); if (!c && errno == ENOENT) { fail = 11; break; } if (c) { fail = 31; break; } if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) { fail = 21; break; } } if (dotdot_max <= cwd_len - initial_cwd_len) { if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) break; c = getcwd (buf, cwd_len + 1); if (!c) { if (! (errno == ERANGE || errno == ENOENT || is_ENAMETOOLONG (errno))) { fail = 22; break; } if (AT_FDCWD || errno == ERANGE || errno == ENOENT) { fail = 12; break; } } } if (c && strlen (c) != cwd_len) { fail = 23; break; } ++n_chdirs; } /* Leaving behind such a deep directory is not polite. So clean up here, right away, even though the driving shell script would also clean up. */ { size_t i; /* Try rmdir first, in case the chdir failed. */ rmdir (DIR_NAME); for (i = 0; i <= n_chdirs; i++) { if (chdir ("..") < 0) break; if (rmdir (DIR_NAME) != 0) break; } } exit (fail); #endif } ]])], [gl_cv_func_getcwd_path_max=yes], [case $? in 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; *) gl_cv_func_getcwd_path_max=no;; esac], [case "$host_os" in aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; *) gl_cv_func_getcwd_path_max=no;; esac]) ]) ]) id-utils-4.6+git20120811/m4/po.m40000664000000000000000000004461611434330764012623 0ustar # po.m4 serial 17 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < to declare strsep(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The strsep() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([strsep]) if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 fi ]) # Prerequisites of lib/strsep.c. AC_DEFUN([gl_PREREQ_STRSEP], [:]) id-utils-4.6+git20120811/m4/localename.m40000664000000000000000000000064212166360012014264 0ustar # localename.m4 serial 2 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALENAME], [ AC_REQUIRE([gt_LC_MESSAGES]) AC_REQUIRE([gt_INTL_MACOSX]) AC_CHECK_FUNCS([setlocale uselocale]) ]) id-utils-4.6+git20120811/m4/configmake.m40000664000000000000000000000354012166360012014267 0ustar # configmake.m4 serial 1 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with # autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake # 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). AC_DEFUN([gl_CONFIGMAKE_PREP], [ dnl Technically, datadir should default to datarootdir. But if dnl autoconf is too old to provide datarootdir, then reversing the dnl definition is a reasonable compromise. Only AC_SUBST a variable dnl if it was not already defined earlier by autoconf. if test "x$datarootdir" = x; then AC_SUBST([datarootdir], ['${datadir}']) fi dnl Copy the approach used in autoconf 2.60. if test "x$docdir" = x; then AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) fi dnl The remaining variables missing from autoconf 2.59 are easier. if test "x$htmldir" = x; then AC_SUBST([htmldir], ['${docdir}']) fi if test "x$dvidir" = x; then AC_SUBST([dvidir], ['${docdir}']) fi if test "x$pdfdir" = x; then AC_SUBST([pdfdir], ['${docdir}']) fi if test "x$psdir" = x; then AC_SUBST([psdir], ['${docdir}']) fi if test "x$lispdir" = x; then AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) fi if test "x$localedir" = x; then AC_SUBST([localedir], ['${datarootdir}/locale']) fi dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) ]) id-utils-4.6+git20120811/m4/isnand.m40000664000000000000000000000525112166360012013441 0ustar # isnand.m4 serial 11 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnand(). AC_DEFUN([gl_FUNC_ISNAND], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNAND_LIBM= gl_HAVE_ISNAND_NO_LIBM if test $gl_cv_func_isnand_no_libm = no; then gl_HAVE_ISNAND_IN_LIBM if test $gl_cv_func_isnand_in_libm = yes; then ISNAND_LIBM=-lm fi fi dnl The variable gl_func_isnand set here is used by isnan.m4. if test $gl_cv_func_isnand_no_libm = yes \ || test $gl_cv_func_isnand_in_libm = yes; then gl_func_isnand=yes else gl_func_isnand=no HAVE_ISNAND=0 fi AC_SUBST([ISNAND_LIBM]) ]) dnl Check how to get or define isnand() without linking with libm. AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM], [ gl_HAVE_ISNAND_NO_LIBM gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm if test $gl_cv_func_isnand_no_libm = yes; then AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1], [Define if the isnan(double) function is available in libc.]) fi ]) dnl Prerequisites of replacement isnand definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNAND], [ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) ]) dnl Test whether isnand() can be used with libm. AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used with libm], [gl_cv_func_isnand_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #elif defined isnan # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;]], [[return isnand (x);]])], [gl_cv_func_isnand_in_libm=yes], [gl_cv_func_isnand_in_libm=no]) LIBS="$save_LIBS" ]) ]) AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm], [gl_cv_func_isnand_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;]], [[return isnand (x);]])], [gl_cv_func_isnand_no_libm=yes], [gl_cv_func_isnand_no_libm=no]) ]) ]) id-utils-4.6+git20120811/m4/dirent_h.m40000664000000000000000000000476612166360012013773 0ustar # dirent_h.m4 serial 16 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Bruno Haible. AC_DEFUN([gl_DIRENT_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([dirent.h]) if test $ac_cv_header_dirent_h = yes; then HAVE_DIRENT_H=1 else HAVE_DIRENT_H=0 fi AC_SUBST([HAVE_DIRENT_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir]) ]) AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_DIRENT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR]) GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR]) GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR]) GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR]) GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR]) HAVE_READDIR=1; AC_SUBST([HAVE_READDIR]) HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR]) HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR]) HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD]) HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR]) HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR]) HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR]) HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT]) REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD]) REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) ]) id-utils-4.6+git20120811/m4/mode_t.m40000664000000000000000000000234212166360012013432 0ustar # mode_t.m4 serial 2 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # For using mode_t, it's sufficient to use AC_TYPE_MODE_T and # include . # Define PROMOTED_MODE_T to the type that is the result of "default argument # promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], [ AC_REQUIRE([AC_TYPE_MODE_T]) AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', dnl and to itself otherwise. This assumption is not guaranteed by the ISO C dnl standard, but we don't know of any real-world counterexamples. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], [gl_cv_promoted_mode_t='int'], [gl_cv_promoted_mode_t='mode_t']) ]) AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], [Define to the type that is the result of default argument promotions of type mode_t.]) ]) id-utils-4.6+git20120811/m4/mbsinit.m40000664000000000000000000000276312166360012013637 0ustar # mbsinit.m4 serial 8 dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSINIT], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 AC_CHECK_DECLS([mbsinit],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_mbsinit = yes; then dnl On Minix 3.1.8, the system's declares mbsinit() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_MBSINIT=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 else dnl On mingw, mbsinit() always returns 1, which is inappropriate for dnl states produced by mbrtowc() for an incomplete multibyte character dnl in multibyte locales. case "$host_os" in mingw*) REPLACE_MBSINIT=1 ;; esac fi fi ]) # Prerequisites of lib/mbsinit.c. AC_DEFUN([gl_PREREQ_MBSINIT], [ : ]) id-utils-4.6+git20120811/m4/fcntl_h.m40000664000000000000000000000327112166360012013602 0ustar # serial 15 # Configure fcntl.h. dnl Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) gl_NEXT_HEADERS([fcntl.h]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, if it is not common dnl enough to be declared everywhere. gl_WARN_ON_USE_PREPARE([[#include ]], [fcntl openat]) ]) AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) ]) id-utils-4.6+git20120811/m4/iconv.m40000664000000000000000000001522612166360012013306 0ustar # iconv.m4 serial 9 (gettext-0.18) dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) id-utils-4.6+git20120811/m4/memchr.m40000664000000000000000000000534012166360012013437 0ustar # memchr.m4 serial 12 dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [ dnl These days, we assume memchr is present. But if support for old dnl platforms is desired: AC_CHECK_FUNCS_ONCE([memchr]) if test $ac_cv_func_memchr = no; then HAVE_MEMCHR=0 fi ]) if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif ]], [[ int result = 0; char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) result |= 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) result |= 2; if (memchr (fence - 1, 0, 3) != fence - 1) result |= 4; } return result; ]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], [dnl Be pessimistic for now. gl_cv_func_memchr_works="guessing no"])]) if test "$gl_cv_func_memchr_works" != yes; then REPLACE_MEMCHR=1 fi fi ]) # Prerequisites of lib/memchr.c. AC_DEFUN([gl_PREREQ_MEMCHR], [ AC_CHECK_HEADERS([bp-sym.h]) ]) id-utils-4.6+git20120811/m4/readdir.m40000664000000000000000000000067012166360012013577 0ustar # readdir.m4 serial 1 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_READDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_CHECK_FUNCS([readdir]) if test $ac_cv_func_readdir = no; then HAVE_READDIR=0 fi ]) id-utils-4.6+git20120811/m4/wctomb.m40000664000000000000000000000071412166360012013457 0ustar # wctomb.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCTOMB], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) if false; then REPLACE_WCTOMB=1 fi ]) # Prerequisites of lib/wctomb.c. AC_DEFUN([gl_PREREQ_WCTOMB], [ : ]) id-utils-4.6+git20120811/m4/frexp.m40000664000000000000000000001141712166360012013312 0ustar # frexp.m4 serial 13 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXP], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) FREXP_LIBM= if test $gl_cv_func_frexp_no_libm = no; then AC_CACHE_CHECK([whether frexp() can be used with libm], [gl_cv_func_frexp_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x;]], [[int e; return frexp (x, &e) > 0;]])], [gl_cv_func_frexp_in_libm=yes], [gl_cv_func_frexp_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexp_in_libm = yes; then FREXP_LIBM=-lm fi fi if test $gl_cv_func_frexp_no_libm = yes \ || test $gl_cv_func_frexp_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXP_LIBM" gl_FUNC_FREXP_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp=yes ;; *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; esac else gl_func_frexp=no fi if test $gl_func_frexp = yes; then AC_DEFINE([HAVE_FREXP], [1], [Define if the frexp() function is available and works.]) fi AC_SUBST([FREXP_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXP_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp_no_libm=yes ;; *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; esac else gl_func_frexp_no_libm=no dnl Set REPLACE_FREXP here because the system may have frexp in libm. REPLACE_FREXP=1 fi if test $gl_func_frexp_no_libm = yes; then AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp() function is available in libc.]) fi ]) dnl Test whether frexp() can be used without linking with libm. dnl Set gl_cv_func_frexp_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_FREXP_NO_LIBM], [ AC_CACHE_CHECK([whether frexp() can be used without linking with libm], [gl_cv_func_frexp_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x;]], [[int e; return frexp (x, &e) > 0;]])], [gl_cv_func_frexp_no_libm=yes], [gl_cv_func_frexp_no_libm=no]) ]) ]) dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw), dnl and on negative zero (this fails e.g. on NetBSD 4.99 and mingw). AC_DEFUN([gl_FUNC_FREXP_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([alarm]) AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #if HAVE_ALARM # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) { return -DBL_MIN * DBL_MIN; } # define minus_zero compute_minus_zero () #else double minus_zero = -0.0; #endif int main() { int result = 0; int i; volatile double x; double zero = 0.0; #if HAVE_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ alarm (5); #endif /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) result |= 1; } /* Test on infinite numbers. */ x = 1.0 / zero; { int exp; double y = frexp (x, &exp); if (y != x) result |= 2; } /* Test on negative zero. */ x = minus_zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) result |= 4; } return result; }]])], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac ]) ]) ]) id-utils-4.6+git20120811/m4/threadlib.m40000664000000000000000000003413712166360012014130 0ustar # threadlib.m4 serial 9 (gettext-0.18.2) dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the dnl default is 'no', otherwise it is system dependent. In both cases, the user dnl can change the choice through the options --enable-threads=choice or dnl --disable-threads. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, dnl USE_PTH_THREADS, USE_WINDOWS_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for dnl programs that really need multithread functionality. The difference dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for dnl multithread-safe programs. AC_DEFUN([gl_THREADLIB_EARLY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) ]) dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_EARLY_BODY], [ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that dnl influences the result of the autoconf tests that test for *_unlocked dnl declarations, on AIX 5 at least. Therefore it must come early. AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. m4_ifdef([gl_THREADLIB_DEFAULT_NO], [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) AC_ARG_ENABLE([threads], AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ AC_HELP_STRING([--disable-threads], [build without multithread safety])]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else changequote(,)dnl case "$host_os" in dnl Disable multithreading by default on OSF/1, because it interferes dnl with fork()/exec(): When msgexec is linked with -lpthread, its dnl child process gets an endless segmentation fault inside execvp(). dnl Disable multithreading by default on Cygwin 1.5.x, because it has dnl bugs that lead to endless loops or crashes. See dnl . osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac changequote([,])dnl fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_LINK_IFELSE test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi ]) dnl The guts of gl_THREADLIB. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_BODY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. AC_CACHE_CHECK([whether imported symbols can be declared weak], [gl_cv_have_weak], [gl_cv_have_weak=no dnl First, test whether the compiler accepts it syntactically. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[extern void xyzzy (); #pragma weak xyzzy]], [[xyzzy();]])], [gl_cv_have_weak=maybe]) if test $gl_cv_have_weak = maybe; then dnl Second, test whether it actually works. On Cygwin 1.7.2, with dnl gcc 4.3, symbols declared weak always evaluate to the address 0. AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #pragma weak fputs int main () { return (fputs == NULL); }]])], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], [dnl When cross-compiling, assume that only ELF platforms support dnl weak symbols. AC_EGREP_CPP([Extensible Linking Format], [#ifdef __ELF__ Extensible Linking Format #endif ], [gl_cv_have_weak="guessing yes"], [gl_cv_have_weak="guessing no"]) ]) fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. AC_CHECK_HEADER([pthread.h], [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0);]])], [gl_have_pthread=yes]) # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. AC_CHECK_LIB([pthread], [pthread_kill], [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], [Define if the pthread_in_use() detection is hard.]) esac ]) else # Some library is needed. Try libpthread and libc_r. AC_CHECK_LIB([pthread], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. AC_CHECK_LIB([c_r], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], [1], [Define if the POSIX multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[thr_self();]])], [gl_have_solaristhread=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_SOLARIS_THREADS], [1], [Define if the old Solaris multithreading library can be used.]) if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" AC_LIB_LINKFLAGS([pth]) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBPTH" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], [gl_have_pth=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_PTH_THREADS], [1], [Define if the GNU Pth multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_PTH_THREADS_WEAK], [1], [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then case "$gl_use_threads" in yes | windows | win32) # The 'win32' is for backward compatibility. if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=windows AC_DEFINE([USE_WINDOWS_THREADS], [1], [Define if the native Windows multithreading API can be used.]) fi ;; esac fi fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) AC_SUBST([LIBTHREAD]) AC_SUBST([LTLIBTHREAD]) AC_SUBST([LIBMULTITHREAD]) AC_SUBST([LTLIBMULTITHREAD]) ]) AC_DEFUN([gl_THREADLIB], [ AC_REQUIRE([gl_THREADLIB_EARLY]) AC_REQUIRE([gl_THREADLIB_BODY]) ]) dnl gl_DISABLE_THREADS dnl ------------------ dnl Sets the gl_THREADLIB default so that threads are not used by default. dnl The user can still override it at installation time, by using the dnl configure option '--enable-threads'. AC_DEFUN([gl_DISABLE_THREADS], [ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) ]) dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock dnl flavours option weak result dnl --------------- --------- --------- -------- --------- dnl Linux 2.4/glibc posix -lpthread Y OK dnl dnl GNU Hurd/glibc posix dnl dnl FreeBSD 5.3 posix -lc_r Y dnl posix -lkse ? Y dnl posix -lpthread ? Y dnl posix -lthr Y dnl dnl FreeBSD 5.2 posix -lc_r Y dnl posix -lkse Y dnl posix -lthr Y dnl dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl dnl NetBSD 1.6 -- dnl dnl OpenBSD 3.4 posix -lpthread Y OK dnl dnl MacOS X 10.[123] posix -lpthread Y OK dnl dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl dnl IRIX 6.5 posix -lpthread Y 0.5 dnl dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl dnl Mingw windows N OK dnl dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: dnl OK if all three tests terminate OK, dnl 0.5 if the first test terminates OK but the second one loops endlessly, dnl 0.0 if the first test already loops endlessly. id-utils-4.6+git20120811/m4/strerror_r.m40000664000000000000000000001506612166360012014375 0ustar # strerror_r.m4 serial 14 dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRERROR_R], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) dnl Persuade Solaris to declare strerror_r(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT dnl are not defined. AC_CHECK_DECLS_ONCE([strerror_r]) if test $ac_cv_have_decl_strerror_r = no; then HAVE_DECL_STRERROR_R=0 fi if test $ac_cv_func_strerror_r = yes; then if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then if test $gl_cv_func_strerror_r_posix_signature = yes; then case "$gl_cv_func_strerror_r_works" in dnl The system's strerror_r has bugs. Replace it. *no) REPLACE_STRERROR_R=1 ;; esac else dnl The system's strerror_r() has a wrong signature. Replace it. REPLACE_STRERROR_R=1 fi else dnl The system's strerror_r() cannot know about the new errno values we dnl add to , or any fix for strerror(0). Replace it. REPLACE_STRERROR_R=1 fi fi ]) # Prerequisites of lib/strerror_r.c. AC_DEFUN([gl_PREREQ_STRERROR_R], [ dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) AC_CHECK_FUNCS_ONCE([catgets]) AC_CHECK_FUNCS_ONCE([snprintf]) ]) # Detect if strerror_r works, but without affecting whether a replacement # strerror_r will be used. AC_DEFUN([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_FUNC_STRERROR_0]) AC_CHECK_FUNCS_ONCE([strerror_r]) if test $ac_cv_func_strerror_r = yes; then if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then dnl The POSIX prototype is: int strerror_r (int, char *, size_t); dnl glibc, Cygwin: char *strerror_r (int, char *, size_t); dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int); AC_CACHE_CHECK([for strerror_r with POSIX signature], [gl_cv_func_strerror_r_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int strerror_r (int, char *, size_t); ]], [])], [gl_cv_func_strerror_r_posix_signature=yes], [gl_cv_func_strerror_r_posix_signature=no]) ]) if test $gl_cv_func_strerror_r_posix_signature = yes; then dnl AIX 6.1 strerror_r fails by returning -1, not an error number. dnl HP-UX 11.31 strerror_r always fails when the buffer length argument dnl is less than 80. dnl FreeBSD 8.s strerror_r claims failure on 0 dnl MacOS X 10.5 strerror_r treats 0 like -1 dnl Solaris 10 strerror_r corrupts errno on failure AC_CACHE_CHECK([whether strerror_r works], [gl_cv_func_strerror_r_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[int result = 0; char buf[79]; if (strerror_r (EACCES, buf, 0) < 0) result |= 1; errno = 0; if (strerror_r (EACCES, buf, sizeof buf) != 0) result |= 2; strcpy (buf, "Unknown"); if (strerror_r (0, buf, sizeof buf) != 0) result |= 4; if (errno) result |= 8; if (strstr (buf, "nknown") || strstr (buf, "ndefined")) result |= 0x10; errno = 0; *buf = 0; if (strerror_r (-3, buf, sizeof buf) < 0) result |= 0x20; if (errno) result |= 0x40; if (!*buf) result |= 0x80; return result; ]])], [gl_cv_func_strerror_r_works=yes], [gl_cv_func_strerror_r_works=no], [ changequote(,)dnl case "$host_os" in # Guess no on AIX. aix*) gl_cv_func_strerror_r_works="guessing no";; # Guess no on HP-UX. hpux*) gl_cv_func_strerror_r_works="guessing no";; # Guess no on BSD variants. *bsd*) gl_cv_func_strerror_r_works="guessing no";; # Guess yes otherwise. *) gl_cv_func_strerror_r_works="guessing yes";; esac changequote([,])dnl ]) ]) else dnl The system's strerror() has a wrong signature. dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure. dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer. if test $ac_cv_func___xpg_strerror_r = yes; then AC_CACHE_CHECK([whether __xpg_strerror_r works], [gl_cv_func_strerror_r_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include extern #ifdef __cplusplus "C" #endif int __xpg_strerror_r(int, char *, size_t); ]], [[int result = 0; char buf[256] = "^"; char copy[256]; char *str = strerror (-1); strcpy (copy, str); if (__xpg_strerror_r (-2, buf, 1) == 0) result |= 1; if (*buf) result |= 2; __xpg_strerror_r (-2, buf, 256); if (strcmp (str, copy)) result |= 4; return result; ]])], [gl_cv_func_strerror_r_works=yes], [gl_cv_func_strerror_r_works=no], [dnl Guess no on all platforms that have __xpg_strerror_r, dnl at least until fixed glibc and cygwin are more common. gl_cv_func_strerror_r_works="guessing no" ]) ]) fi fi fi fi ]) id-utils-4.6+git20120811/m4/wctype_h.m40000664000000000000000000001542412166360012014012 0ustar # wctype_h.m4 serial 16 dnl A placeholder for ISO C99 , for platforms that lack it. dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_WCTYPE_H], [ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([iswcntrl]) if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi AC_SUBST([HAVE_ISWCNTRL]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) gl_CHECK_NEXT_HEADERS([wctype.h]) if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then dnl Linux libc5 has an iswprint function that returns 0 for all arguments. dnl The other functions are likely broken in the same way. AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } ]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) ]) ]) fi HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi AC_SUBST([HAVE_WCTYPE_H]) if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then dnl Redefine all of iswcntrl, ..., iswxdigit in . : fi if test $REPLACE_ISWCNTRL = 1; then REPLACE_TOWLOWER=1 else AC_CHECK_FUNCS([towlower]) if test $ac_cv_func_towlower = yes; then REPLACE_TOWLOWER=0 else AC_CHECK_DECLS([towlower],,, [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif ]]) if test $ac_cv_have_decl_towlower = yes; then dnl On Minix 3.1.8, the system's declares towlower() and dnl towupper() although it does not have the functions. Avoid a dnl collision with gnulib's replacement. REPLACE_TOWLOWER=1 else REPLACE_TOWLOWER=0 fi fi fi AC_SUBST([REPLACE_TOWLOWER]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then dnl Redefine towlower, towupper in . : fi dnl We assume that the wctype() and iswctype() functions exist if and only dnl if the type wctype_t is defined in or in if that dnl exists. dnl HP-UX 11.00 declares all these in and lacks . AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif wctype_t a; ]], [[]])], [gl_cv_type_wctype_t=yes], [gl_cv_type_wctype_t=no]) ]) if test $gl_cv_type_wctype_t = no; then HAVE_WCTYPE_T=0 fi dnl We assume that the wctrans() and towctrans() functions exist if and only dnl if the type wctrans_t is defined in . AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include wctrans_t a; ]], [[]])], [gl_cv_type_wctrans_t=yes], [gl_cv_type_wctrans_t=no]) ]) if test $gl_cv_type_wctrans_t = no; then HAVE_WCTRANS_T=0 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # include #endif #include ]], [wctype iswctype wctrans towctrans ]) ]) AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCTYPE_H_DEFAULTS], [ GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T]) REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK]) ]) id-utils-4.6+git20120811/m4/00gnulib.m40000664000000000000000000000252212166360012013603 0ustar # 00gnulib.m4 serial 2 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) id-utils-4.6+git20120811/m4/regex.m40000664000000000000000000002232712166360012013302 0ustar # serial 60 # Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl Initially derived from code in GNU grep. dnl Mostly written by Jim Meyering. AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ AC_ARG_WITH([included-regex], [AS_HELP_STRING([--without-included-regex], [don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems).])]) case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. AC_CACHE_CHECK([for working re_compile_pattern], [gl_cv_func_re_compile_pattern_working], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ #include #include #include ]], [[int result = 0; static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ if (setlocale (LC_ALL, "en_US.UTF-8")) { static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; else if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) result |= 1; if (! setlocale (LC_ALL, "C")) return 1; } /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) result |= 2; /* This should fail, but succeeds for glibc-2.5. */ else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) result |= 2; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) result |= 4; /* Ensure that [b-a] is diagnosed as invalid, when using RE_NO_EMPTY_RANGES. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) result |= 8; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) result |= 8; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) result |= 8; /* This should match, but does not for glibc-2.2.1. */ else if (re_match (®ex, "an", 2, 0, ®s) != 2) result |= 8; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 8; /* glibc-2.2.93 does not work with a negative RANGE argument. */ else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) result |= 8; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 16; else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) result |= 16; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) result |= 32; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) result |= 64; #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and 32-bit int), but we should wait until glibc implements this feature. Otherwise, support for equivalence classes and multibyte collation symbols would always be broken except when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) result |= 64; #endif return result; ]])], [gl_cv_func_re_compile_pattern_working=yes], [gl_cv_func_re_compile_pattern_working=no], dnl When crosscompiling, assume it is not working. [gl_cv_func_re_compile_pattern_working=no])]) case $gl_cv_func_re_compile_pattern_working in #( yes) ac_use_included_regex=no;; #( no) ac_use_included_regex=yes;; esac ;; *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) ;; esac if test $ac_use_included_regex = yes; then AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], [Define if you want regoff_t to be at least as wide POSIX requires.]) AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], [Define to rpl_re_syntax_options if the replacement should be used.]) AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], [Define to rpl_re_set_syntax if the replacement should be used.]) AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], [Define to rpl_re_compile_pattern if the replacement should be used.]) AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], [Define to rpl_re_compile_fastmap if the replacement should be used.]) AC_DEFINE([re_search], [rpl_re_search], [Define to rpl_re_search if the replacement should be used.]) AC_DEFINE([re_search_2], [rpl_re_search_2], [Define to rpl_re_search_2 if the replacement should be used.]) AC_DEFINE([re_match], [rpl_re_match], [Define to rpl_re_match if the replacement should be used.]) AC_DEFINE([re_match_2], [rpl_re_match_2], [Define to rpl_re_match_2 if the replacement should be used.]) AC_DEFINE([re_set_registers], [rpl_re_set_registers], [Define to rpl_re_set_registers if the replacement should be used.]) AC_DEFINE([re_comp], [rpl_re_comp], [Define to rpl_re_comp if the replacement should be used.]) AC_DEFINE([re_exec], [rpl_re_exec], [Define to rpl_re_exec if the replacement should be used.]) AC_DEFINE([regcomp], [rpl_regcomp], [Define to rpl_regcomp if the replacement should be used.]) AC_DEFINE([regexec], [rpl_regexec], [Define to rpl_regexec if the replacement should be used.]) AC_DEFINE([regerror], [rpl_regerror], [Define to rpl_regerror if the replacement should be used.]) AC_DEFINE([regfree], [rpl_regfree], [Define to rpl_regfree if the replacement should be used.]) fi ]) # Prerequisites of lib/regex.c and lib/regex_internal.c. AC_DEFUN([gl_PREREQ_REGEX], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) ]) id-utils-4.6+git20120811/m4/stdint.m40000664000000000000000000003701412166360012013474 0ustar # stdint.m4 serial 43 dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for , in the same way as gl_WCHAR_H does. AC_CHECK_HEADERS_ONCE([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [dnl Determine whether the various *_MIN, *_MAX macros are usable dnl in preprocessor expression. We could do it by compiling a test dnl program for each of these macros. It is faster to run a program dnl that inspects the macro expansion. dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] gl_STDINT_INCLUDES [ #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; ]], [[ const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ]])], [gl_cv_header_working_stdint_h=yes], [], [dnl When cross-compiling, assume it works. gl_cv_header_working_stdint_h=yes ]) ]) ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi AC_SUBST([HAVE_SYS_INTTYPES_H]) if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi AC_SUBST([HAVE_SYS_BITYPES_H]) gl_STDINT_TYPE_PROPERTIES STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 dnl requirement that wint_t is "unchanged by default argument promotions". dnl In this case gnulib's and override wint_t. dnl Set the variable BITSIZEOF_WINT_T accordingly. if test $BITSIZEOF_WINT_T -lt 32; then BITSIZEOF_WINT_T=32 fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) # Hey Emacs! # Local Variables: # indent-tabs-mode: nil # End: id-utils-4.6+git20120811/m4/printf-frexp.m40000664000000000000000000000226612166360012014614 0ustar # printf-frexp.m4 serial 5 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexp() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXP], [ AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp function is available in libc.]) ;; esac fi AC_CACHE_CHECK([whether ldexp can be used without linking with libm], [gl_cv_func_ldexp_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x; int y;]], [[return ldexp (x, y) < 1;]])], [gl_cv_func_ldexp_no_libm=yes], [gl_cv_func_ldexp_no_libm=no]) ]) if test $gl_cv_func_ldexp_no_libm = yes; then AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], [Define if the ldexp function is available in libc.]) fi ]) id-utils-4.6+git20120811/m4/lib-ld.m40000664000000000000000000000705012166360012013327 0ustar # lib-ld.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) id-utils-4.6+git20120811/m4/chdir-long.m40000664000000000000000000000213612166360012014212 0ustar #serial 14 # Use Gnulib's robust chdir function. # It can handle arbitrarily long directory names, which means # that when it is given the name of an existing directory, it # never fails with ENAMETOOLONG. # Arrange to compile chdir-long.c only on systems that define PATH_MAX. dnl Copyright (C) 2004-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Jim Meyering. AC_DEFUN([gl_FUNC_CHDIR_LONG], [ AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], gl_cv_have_arbitrary_file_name_length_limit, [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], gl_PATHMAX_SNIPPET[ #ifdef PATH_MAX have_arbitrary_file_name_length_limit #endif], gl_cv_have_arbitrary_file_name_length_limit=yes, gl_cv_have_arbitrary_file_name_length_limit=no)]) ]) AC_DEFUN([gl_PREREQ_CHDIR_LONG], [ AC_REQUIRE([AC_C_INLINE]) : ]) id-utils-4.6+git20120811/m4/quote.m40000664000000000000000000000057312166360012013324 0ustar # quote.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_QUOTE], [ dnl Prerequisites of lib/quote.c. dnl (none) : ]) id-utils-4.6+git20120811/m4/ldexpl.m40000664000000000000000000000726412166360012013463 0ustar # ldexpl.m4 serial 14 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LDEXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM dnl Check whether it's declared. dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include ]]) LDEXPL_LIBM= if test $HAVE_DECL_LDEXPL = 1; then gl_CHECK_LDEXPL_NO_LIBM if test $gl_cv_func_ldexpl_no_libm = no; then AC_CACHE_CHECK([whether ldexpl() can be used with libm], [gl_cv_func_ldexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[return ldexpl (x, -1) > 0;]])], [gl_cv_func_ldexpl_in_libm=yes], [gl_cv_func_ldexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_ldexpl_in_libm = yes; then LDEXPL_LIBM=-lm fi fi if test $gl_cv_func_ldexpl_no_libm = yes \ || test $gl_cv_func_ldexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $LDEXPL_LIBM" gl_FUNC_LDEXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_ldexpl_works" in *yes) gl_func_ldexpl=yes ;; *) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;; esac else gl_func_ldexpl=no fi if test $gl_func_ldexpl = yes; then AC_DEFINE([HAVE_LDEXPL], [1], [Define if the ldexpl() function is available.]) fi fi if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then dnl Find libraries needed to link lib/ldexpl.c. if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then AC_REQUIRE([gl_FUNC_LDEXP]) LDEXPL_LIBM="$LDEXP_LIBM" else LDEXPL_LIBM="$ISNANL_LIBM" fi fi AC_SUBST([LDEXPL_LIBM]) ]) dnl Test whether ldexpl() can be used without linking with libm. dnl Set gl_cv_func_ldexpl_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM], [ AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm], [gl_cv_func_ldexpl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[return ldexpl (x, -1) > 0;]])], [gl_cv_func_ldexpl_no_libm=yes], [gl_cv_func_ldexpl_no_libm=no]) ]) ]) dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1 dnl and MacOS X 10.4/PowerPC). AC_DEFUN([gl_FUNC_LDEXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include extern #ifdef __cplusplus "C" #endif long double ldexpl (long double, int); int main() { int result = 0; { volatile long double x = 1.0; volatile long double y = ldexpl (x, -1); if (y != 0.5L) result |= 1; } { volatile long double x = 1.73205L; volatile long double y = ldexpl (x, 0); if (y != x) result |= 2; } return result; }]])], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no], [ changequote(,)dnl case "$host_os" in aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; *) gl_cv_func_ldexpl_works="guessing yes";; esac changequote([,])dnl ]) ]) ]) id-utils-4.6+git20120811/m4/malloc.m40000664000000000000000000000375512166360012013443 0ustar # malloc.m4 serial 13 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_MALLOC_GNU # ------------------ # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if # it is not. AC_DEFUN([gl_FUNC_MALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. _AC_FUNC_MALLOC_IF( [AC_DEFINE([HAVE_MALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_MALLOC_GNU], [0]) REPLACE_MALLOC=1 ]) ]) # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else REPLACE_MALLOC=1 fi ]) # Test whether malloc, realloc, calloc are POSIX compliant, # Set gl_cv_func_malloc_posix to yes or no accordingly. AC_DEFUN([gl_CHECK_MALLOC_POSIX], [ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], [gl_cv_func_malloc_posix], [ dnl It is too dangerous to try to allocate a large amount of memory: dnl some systems go to their knees when you do that. So assume that dnl all Unix implementations of the function are POSIX compliant. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ]])], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) id-utils-4.6+git20120811/m4/dirfd.m40000664000000000000000000000465512166360012013264 0ustar # serial 22 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. # Copyright (C) 2001-2006, 2008-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering AC_DEFUN([gl_FUNC_DIRFD], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) dnl Persuade glibc to declare dirfd(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS([dirfd]) AC_CHECK_DECLS([dirfd], , , [[#include #include ]]) if test $ac_cv_have_decl_dirfd = no; then HAVE_DECL_DIRFD=0 fi AC_CACHE_CHECK([whether dirfd is a macro], gl_cv_func_dirfd_macro, [AC_EGREP_CPP([dirent_header_defines_dirfd], [ #include #include #ifdef dirfd dirent_header_defines_dirfd #endif], gl_cv_func_dirfd_macro=yes, gl_cv_func_dirfd_macro=no)]) # Use the replacement only if we have no function or macro with that name. if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then if test $ac_cv_have_decl_dirfd = yes; then # If the system declares dirfd already, let's declare rpl_dirfd instead. REPLACE_DIRFD=1 fi fi ]) dnl Prerequisites of lib/dirfd.c. AC_DEFUN([gl_PREREQ_DIRFD], [ AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*], [gl_cv_sys_dir_fd_member_name], [ dirfd_save_CFLAGS=$CFLAGS for ac_expr in d_fd dd_fd; do CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])], [dir_fd_found=yes] ) CFLAGS=$dirfd_save_CFLAGS test "$dir_fd_found" = yes && break done test "$dir_fd_found" = yes || ac_expr=no_such_member gl_cv_sys_dir_fd_member_name=$ac_expr ] ) if test $gl_cv_sys_dir_fd_member_name != no_such_member; then AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME], [$gl_cv_sys_dir_fd_member_name], [the name of the file descriptor member of DIR]) fi AH_VERBATIM([DIR_TO_FD], [#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 ]) ]) id-utils-4.6+git20120811/m4/time_h.m40000664000000000000000000001022712166360012013431 0ustar # Configure a more-standard replacement for . # Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # serial 6 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_pthread_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_pthread_h=yes], [gl_cv_sys_struct_timespec_in_pthread_h=no])]) if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) id-utils-4.6+git20120811/m4/xgetcwd.m40000664000000000000000000000046312166360012013632 0ustar #serial 8 dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XGETCWD], [ : ]) id-utils-4.6+git20120811/m4/pathmax.m40000664000000000000000000000220412166360012013622 0ustar # pathmax.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PATHMAX], [ dnl Prerequisites of lib/pathmax.h. AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) # Expands to a piece of C program that defines PATH_MAX in the same way as # "pathmax.h" will do. AC_DEFUN([gl_PATHMAX_SNIPPET], [[ /* Arrange to define PATH_MAX, like "pathmax.h" does. */ #if HAVE_UNISTD_H # include #endif #include #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifdef __hpux # undef PATH_MAX # define PATH_MAX 1024 #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif ]]) # Prerequisites of gl_PATHMAX_SNIPPET. AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], [ AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) ]) id-utils-4.6+git20120811/m4/vfprintf-posix.m40000664000000000000000000001044612166360012015165 0ustar # vfprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VFPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vfprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # vfprintf exists and is # already POSIX compliant. gl_cv_func_vfprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vfprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VFPRINTF fi ]) AC_DEFUN([gl_REPLACE_VFPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vfprintf]) REPLACE_VFPRINTF=1 AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1], [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_VFPRINTF ]) AC_DEFUN([gl_PREREQ_VFPRINTF], [:]) id-utils-4.6+git20120811/m4/inline.m40000664000000000000000000000315412166360012013443 0ustar # inline.m4 serial 4 dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for the 'inline' keyword or equivalent. dnl Define 'inline' to a supported equivalent, or to nothing if not supported, dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an dnl equivalent is effectively supported, i.e. if the compiler is likely to dnl drop unused 'static inline' functions. AC_DEFUN([gl_INLINE], [ AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether the compiler generally respects inline], [gl_cv_c_inline_effective], [if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is dnl specified. dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result dnl depends on optimization flags, which can be in CFLAGS. dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[#ifdef __NO_INLINE__ #error "inline is not effective" #endif]])], [gl_cv_c_inline_effective=yes], [gl_cv_c_inline_effective=no]) fi ]) if test $gl_cv_c_inline_effective = yes; then AC_DEFINE([HAVE_INLINE], [1], [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such.]) fi ]) id-utils-4.6+git20120811/m4/mbchar.m40000664000000000000000000000070712166360012013422 0ustar # mbchar.m4 serial 8 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbchar.m4 dnl From Bruno Haible. AC_DEFUN([gl_MBCHAR], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/realloc.m40000664000000000000000000000242012166360012013601 0ustar # realloc.m4 serial 12 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_REALLOC_GNU # ------------------- # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace # realloc if it is not. AC_DEFUN([gl_FUNC_REALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. _AC_FUNC_REALLOC_IF( [AC_DEFINE([HAVE_REALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_REALLOC_GNU], [0]) REPLACE_REALLOC=1 ]) ])# gl_FUNC_REALLOC_GNU # gl_FUNC_REALLOC_POSIX # --------------------- # Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace realloc if it is not. AC_DEFUN([gl_FUNC_REALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_REALLOC_POSIX], [1], [Define if the 'realloc' function is POSIX compliant.]) else REPLACE_REALLOC=1 fi ]) id-utils-4.6+git20120811/m4/math_h.m40000664000000000000000000002643712166360012013436 0ustar # math_h.m4 serial 56 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MATH_H], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([math.h]) AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN f = NAN; #endif return f == 0;]])], [gl_cv_header_math_nan_works=yes], [gl_cv_header_math_nan_works=no])]) if test $gl_cv_header_math_nan_works = no; then REPLACE_NAN=1 fi AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0;]])], [gl_cv_header_math_huge_val_works=yes], [gl_cv_header_math_huge_val_works=no])]) if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [acosf acosl asinf asinl atanf atanl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl fabsf floorf floorl fma fmaf fmal fmodf frexpf frexpl ldexpf ldexpl logb logf logl log10f modff powf rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl]) ]) AC_DEFUN([gl_MATH_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_MATH_H_DEFAULTS], [ GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF]) HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) HAVE_COSF=1; AC_SUBST([HAVE_COSF]) HAVE_COSL=1; AC_SUBST([HAVE_COSL]) HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) HAVE_FMA=1; AC_SUBST([HAVE_FMA]) HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) HAVE_POWF=1; AC_SUBST([HAVE_POWF]) HAVE_RINT=1; AC_SUBST([HAVE_RINT]) HAVE_RINTF=1; AC_SUBST([HAVE_RINTF]) HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) HAVE_SINF=1; AC_SUBST([HAVE_SINF]) HAVE_SINL=1; AC_SUBST([HAVE_SINL]) HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) HAVE_TANF=1; AC_SUBST([HAVE_TANF]) HAVE_TANL=1; AC_SUBST([HAVE_TANL]) HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) ]) # gl_LONG_DOUBLE_VS_DOUBLE # determines whether 'long double' and 'double' have the same representation. # Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines # HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. # The currently known platforms where this is the case are: # Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], [ AC_CACHE_CHECK([whether long double and double are the same], [gl_cv_long_double_equals_double], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[typedef int check[sizeof (long double) == sizeof (double) && LDBL_MANT_DIG == DBL_MANT_DIG && LDBL_MAX_EXP == DBL_MAX_EXP && LDBL_MIN_EXP == DBL_MIN_EXP ? 1 : -1]; ]])], [gl_cv_long_double_equals_double=yes], [gl_cv_long_double_equals_double=no]) ]) if test $gl_cv_long_double_equals_double = yes; then AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], [Define to 1 if 'long double' and 'double' have the same representation.]) HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 else HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 fi AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) ]) id-utils-4.6+git20120811/m4/string_h.m40000664000000000000000000001271412166360012014004 0ustar # Configure a GNU-like replacement for . # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 21 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_NEXT_HEADERS([string.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) id-utils-4.6+git20120811/m4/strerror.m40000664000000000000000000000523012166360012014044 0ustar # strerror.m4 serial 16 dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRERROR], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) ]) if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[if (!*strerror (-2)) return 1;]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [dnl Be pessimistic on cross-compiles for now. gl_cv_func_working_strerror="guessing no"]) ]) if test "$gl_cv_func_working_strerror" != yes; then dnl The system's strerror() fails to return a string for out-of-range dnl integers. Replace it. REPLACE_STRERROR=1 fi m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's dnl buffer, we must replace strerror. case "$gl_cv_func_strerror_r_works" in *no) REPLACE_STRERROR=1 ;; esac ]) else dnl The system's strerror() cannot know about the new errno values we add dnl to , or any fix for strerror(0). Replace it. REPLACE_STRERROR=1 fi ]) dnl Detect if strerror(0) passes (that is, does not set errno, and does not dnl return a string that matches strerror(-1)). AC_DEFUN([gl_FUNC_STRERROR_0], [ REPLACE_STRERROR_0=0 AC_CACHE_CHECK([whether strerror(0) succeeds], [gl_cv_func_strerror_0_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[int result = 0; char *str; errno = 0; str = strerror (0); if (!*str) result |= 1; if (errno) result |= 2; if (strstr (str, "nknown") || strstr (str, "ndefined")) result |= 4; return result;]])], [gl_cv_func_strerror_0_works=yes], [gl_cv_func_strerror_0_works=no], [dnl Be pessimistic on cross-compiles for now. gl_cv_func_strerror_0_works="guessing no"]) ]) if test "$gl_cv_func_strerror_0_works" != yes; then REPLACE_STRERROR_0=1 AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0) does not return a message implying success.]) fi ]) id-utils-4.6+git20120811/m4/alloca.m40000664000000000000000000001037212166360012013420 0ustar # alloca.m4 serial 14 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) # This works around a bug in autoconf <= 2.68. # See . m4_version_prereq([2.69], [] ,[ # This is taken from the following Autoconf patch: # http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 # _AC_LIBOBJ_ALLOCA # ----------------- # Set up the LIBOBJ replacement of 'alloca'. Well, not exactly # AC_LIBOBJ since we actually set the output variable 'ALLOCA'. # Nevertheless, for Automake, AC_LIBSOURCES it. m4_define([_AC_LIBOBJ_ALLOCA], [# The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. AC_LIBSOURCES(alloca.c) AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.]) AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray, [AC_EGREP_CPP(webecray, [#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif ], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, [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.]) break]) done fi AC_CACHE_CHECK([stack direction for C alloca], [ac_cv_c_stack_direction], [AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_INCLUDES_DEFAULT int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; }])], [ac_cv_c_stack_direction=1], [ac_cv_c_stack_direction=-1], [ac_cv_c_stack_direction=0])]) AH_VERBATIM([STACK_DIRECTION], [/* 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 */ @%:@undef STACK_DIRECTION])dnl AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) ])# _AC_LIBOBJ_ALLOCA ]) id-utils-4.6+git20120811/m4/include_next.m40000664000000000000000000002542412166360012014652 0ustar # include_next.m4 serial 23 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. dnl dnl PRAGMA_COLUMNS can be used in files that override system header files, so dnl as to avoid compilation errors on HP NonStop systems when the gnulib file dnl is included by a system header file that does a "#pragma COLUMNS 80" (which dnl has the effect of truncating the lines of that file and all files that it dnl includes to 80 columns) and the gnulib file has lines longer than 80 dnl columns. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including . dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's . By virtue of the second bug, we need to use dnl include_next as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" dnl We intentionally avoid using AC_LANG_SOURCE here. AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) AC_CACHE_CHECK([whether system header files limit the line length], [gl_cv_pragma_columns], [dnl HP NonStop systems, which define __TANDEM, have this misfeature. AC_EGREP_CPP([choke me], [ #ifdef __TANDEM choke me #endif ], [gl_cv_pragma_columns=yes], [gl_cv_pragma_columns=no]) ]) if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi AC_SUBST([PRAGMA_COLUMNS]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use '""', not '<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. # # This macro also checks whether each header exists, by invoking # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [check]) ]) # gl_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------ # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. # This is suitable for headers like that are standardized by C89 # and therefore can be assumed to exist. AC_DEFUN([gl_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [assume]) ]) # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_if([$2], [check], [AC_CHECK_HEADERS_ONCE([$1]) ]) dnl FIXME: gl_next_header and gl_header_exists must be used unquoted dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [m4_if([$2], [check], [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header dnl files that contain only a #include of other header files and dnl no non-comment tokens of their own. This leads to a failure dnl to detect the absolute name of , , dnl and others. The workaround is to force preservation dnl of comments through option -C. This ensures all necessary dnl #line directives are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac changequote(,) case "$host_os" in mingw*) dnl For the sake of native Windows compilers (excluding gcc), dnl treat backslash as a directory separator, like /. dnl Actually, these compilers use a double-backslash as dnl directory separator, inside the dnl # line "filename" dnl directives. gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac dnl A sed expression that turns a string into a basic regular dnl expression, for use within "/.../". gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' changequote([,]) gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl p q }' dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET(gl_next_header, ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n "$gl_absolute_header_sed"`'"']) m4_if([$2], [check], [else AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET(gl_next_header)]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET(gl_next_header) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; # this fallback is safe for all earlier autoconf versions. m4_define_default([AC_LANG_DEFINES_PROVIDED]) id-utils-4.6+git20120811/m4/isnanl.m40000664000000000000000000001736312166360012013460 0ustar # isnanl.m4 serial 17 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ISNANL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANL_LIBM= gl_HAVE_ISNANL_NO_LIBM if test $gl_cv_func_isnanl_no_libm = no; then gl_HAVE_ISNANL_IN_LIBM if test $gl_cv_func_isnanl_in_libm = yes; then ISNANL_LIBM=-lm fi fi dnl The variable gl_func_isnanl set here is used by isnan.m4. if test $gl_cv_func_isnanl_no_libm = yes \ || test $gl_cv_func_isnanl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANL_LIBM" gl_FUNC_ISNANL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanl_works" in *yes) gl_func_isnanl=yes ;; *) gl_func_isnanl=no; ISNANL_LIBM= ;; esac else gl_func_isnanl=no fi if test $gl_func_isnanl != yes; then HAVE_ISNANL=0 fi AC_SUBST([ISNANL_LIBM]) ]) AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM], [ gl_HAVE_ISNANL_NO_LIBM gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm if test $gl_func_isnanl_no_libm = yes; then gl_FUNC_ISNANL_WORKS case "$gl_cv_func_isnanl_works" in *yes) ;; *) gl_func_isnanl_no_libm=no ;; esac fi if test $gl_func_isnanl_no_libm = yes; then AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1], [Define if the isnan(long double) function is available in libc.]) fi ]) dnl Prerequisites of replacement isnanl definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNANL], [ gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) ]) dnl Test whether isnanl() can be used without libm. AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm], [gl_cv_func_isnanl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;]], [[return isnanl (x);]])], [gl_cv_func_isnanl_no_libm=yes], [gl_cv_func_isnanl_no_libm=no]) ]) ]) dnl Test whether isnanl() can be used with libm. AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used with libm], [gl_cv_func_isnanl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;]], [[return isnanl (x);]])], [gl_cv_func_isnanl_in_libm=yes], [gl_cv_func_isnanl_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanl() recognizes all numbers which are neither finite nor dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64. dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests dnl - for pseudo-denormals on i686 and x86_64, dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64. AC_DEFUN([gl_FUNC_ISNANL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { int result = 0; if (!isnanl (NaNl ())) result |= 1; { memory_long_double m; unsigned int i; /* The isnanl function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (!isnanl (m.value)) result |= 1; } #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (!isnanl (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (!isnanl (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) result |= 64; } #endif return result; }]])], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], [case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; *) case "$host_os" in netbsd*) gl_cv_func_isnanl_works="guessing no";; *) gl_cv_func_isnanl_works="guessing yes";; esac ;; esac ]) ]) ]) id-utils-4.6+git20120811/m4/printf-frexpl.m40000664000000000000000000000332012166360012014760 0ustar # printf-frexpl.m4 serial 9 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexpl() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Subset of gl_FUNC_FREXPL_NO_LIBM. gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl function is available in libc.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) fi gl_CHECK_LDEXPL_NO_LIBM if test $gl_cv_func_ldexpl_no_libm = yes; then gl_FUNC_LDEXPL_WORKS case "$gl_cv_func_ldexpl_works" in *yes) AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1], [Define if the ldexpl function is available in libc.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include ]]) ;; esac fi ]) id-utils-4.6+git20120811/m4/strcasestr.m40000664000000000000000000001045012166360012014357 0ustar # strcasestr.m4 serial 20 dnl Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check that strcasestr is present and works. AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) dnl Persuade glibc to declare strcasestr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_MEMCHR]) AC_CHECK_FUNCS([strcasestr]) if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 else dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. AC_CACHE_CHECK([whether strcasestr works], [gl_cv_func_strcasestr_works_always], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for strcasestr */ #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P ]], [[return !!strcasestr (HAYSTACK, NEEDLE); ]])], [gl_cv_func_strcasestr_works_always=yes], [gl_cv_func_strcasestr_works_always=no], [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not dnl affected, since it uses different source code for strcasestr dnl than glibc. dnl Assume that it works on all other platforms, even if it is not dnl linear. AC_EGREP_CPP([Lucky user], [ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ || defined __UCLIBC__ Lucky user #endif #elif defined __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #else Lucky user #endif ], [gl_cv_func_strcasestr_works_always=yes], [gl_cv_func_strcasestr_works_always="guessing no"]) ]) ]) if test "$gl_cv_func_strcasestr_works_always" != yes; then REPLACE_STRCASESTR=1 fi fi fi ]) # gl_FUNC_STRCASESTR_SIMPLE dnl Additionally, check that strcasestr is efficient. AC_DEFUN([gl_FUNC_STRCASESTR], [ AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then AC_CACHE_CHECK([whether strcasestr works in linear time], [gl_cv_func_strcasestr_linear], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for signal */ #include /* for strcasestr */ #include /* for malloc */ #include /* for alarm */ static void quit (int sig) { exit (sig + 128); } ]], [[ int result = 0; size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, quit); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; if (!strcasestr (haystack, needle)) result |= 1; } return result; ]])], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a dnl strcasestr that works in linear time. AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ && !defined __UCLIBC__ Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #endif ], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear="guessing no"]) ]) ]) if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 fi fi ]) # gl_FUNC_STRCASESTR # Prerequisites of lib/strcasestr.c. AC_DEFUN([gl_PREREQ_STRCASESTR], [ : ]) id-utils-4.6+git20120811/m4/closeout.m40000664000000000000000000000056512166360012014025 0ustar # closeout.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites of lib/closeout.c. AC_DEFUN([gl_CLOSEOUT], [ : ]) id-utils-4.6+git20120811/m4/freopen.m40000664000000000000000000000105412166360012013620 0ustar # freopen.m4 serial 3 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREOPEN], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) REPLACE_FREOPEN=1 ;; esac ]) # Prerequisites of lib/freopen.c. AC_DEFUN([gl_PREREQ_FREOPEN], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/stdio_h.m40000664000000000000000000002245712166360012013625 0ustar # stdio_h.m4 serial 40 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FSCANF=1 GNULIB_SCANF=1 GNULIB_FGETC=1 GNULIB_GETC=1 GNULIB_GETCHAR=1 GNULIB_FGETS=1 GNULIB_GETS=1 GNULIB_FREAD=1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING dnl or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_READ_FUNCS=1 AC_LIBOBJ([stdio-read]) fi ]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or dnl GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING dnl or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat snprintf tmpfile vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDIO_H_DEFAULTS], [ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) GNULIB_GETS=0; AC_SUBST([GNULIB_GETS]) GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE]) HAVE_POPEN=1; AC_SUBST([HAVE_POPEN]) HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) ]) id-utils-4.6+git20120811/m4/mbrtowc.m40000664000000000000000000004153712166360012013651 0ustar # mbrtowc.m4 serial 25 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBRTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 AC_CHECK_DECLS([mbrtowc],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_mbrtowc = yes; then dnl On Minix 3.1.8, the system's declares mbrtowc() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_MBRTOWC=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 else gl_MBRTOWC_NULL_ARG1 gl_MBRTOWC_NULL_ARG2 gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], [Define if the mbrtowc function has the NULL pwc argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_null_arg2" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], [Define if the mbrtowc function has the NULL string argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], [Define if the mbrtowc function returns a wrong return value.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], [Define if the mbrtowc function does not return 0 for a NUL character.]) REPLACE_MBRTOWC=1 ;; esac fi fi ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that dnl redefines the semantics of the given mbstate_t type. dnl Result is REPLACE_MBSTATE_T. dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to dnl avoid inconsistencies. AC_DEFUN([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_FUNCS_ONCE([mbsinit]) AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then gl_MBRTOWC_INCOMPLETE_STATE gl_MBRTOWC_SANITYCHECK REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi ]) dnl Test whether mbrtowc puts the state into non-initial state when parsing an dnl incomplete multibyte character. dnl Result is gl_cv_func_mbrtowc_incomplete_state. AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], [gl_cv_func_mbrtowc_incomplete_state], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_JA != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; }]])], [gl_cv_func_mbrtowc_incomplete_state=yes], [gl_cv_func_mbrtowc_incomplete_state=no], [:]) fi ]) ]) dnl Test whether mbrtowc works not worse than mbtowc. dnl Result is gl_cv_func_mbrtowc_sanitycheck. AC_DEFUN([gl_MBRTOWC_SANITYCHECK], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], [gl_cv_func_mbrtowc_sanitycheck], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; }]])], [gl_cv_func_mbrtowc_sanitycheck=yes], [gl_cv_func_mbrtowc_sanitycheck=no], [:]) fi ]) ]) dnl Test whether mbrtowc supports a NULL pwc argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg1. AC_DEFUN([gl_MBRTOWC_NULL_ARG1], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument], [gl_cv_func_mbrtowc_null_arg1], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "\303\237er"; mbstate_t state; wchar_t wc; size_t ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 5, &state); if (ret != 2) result |= 1; if (!mbsinit (&state)) result |= 2; memset (&state, '\0', sizeof (mbstate_t)); ret = mbrtowc (NULL, input, 5, &state); if (ret != 2) /* Solaris 7 fails here: ret is -1. */ result |= 4; if (!mbsinit (&state)) result |= 8; } return result; }]])], [gl_cv_func_mbrtowc_null_arg1=yes], [gl_cv_func_mbrtowc_null_arg1=no], [:]) fi ]) ]) dnl Test whether mbrtowc supports a NULL string argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg2. AC_DEFUN([gl_MBRTOWC_NULL_ARG2], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], [gl_cv_func_mbrtowc_null_arg2], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; }]])], [gl_cv_func_mbrtowc_null_arg2=yes], [gl_cv_func_mbrtowc_null_arg2=no], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing the end of a multibyte character, dnl correctly returns the number of bytes that were needed to complete the dnl character (not the total number of bytes of the multibyte character). dnl Result is gl_cv_func_mbrtowc_retval. AC_DEFUN([gl_MBRTOWC_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether mbrtowc has a correct return value], [gl_cv_func_mbrtowc_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on HP-UX, Solaris, native Windows. hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; int found_some_locale = 0; /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) result |= 1; } found_some_locale = 1; } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) result |= 2; } found_some_locale = 1; } /* This fails on native Windows. */ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) { char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 4; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) { char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 8; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_China.936") != NULL) { char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 16; } found_some_locale = 1; } return (found_some_locale ? result : 77); }]])], [gl_cv_func_mbrtowc_retval=yes], [if test $? != 77; then gl_cv_func_mbrtowc_retval=no fi ], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. dnl Result is gl_cv_func_mbrtowc_nul_retval. AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], [gl_cv_func_mbrtowc_nul_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; }]])], [gl_cv_func_mbrtowc_nul_retval=yes], [gl_cv_func_mbrtowc_nul_retval=no], [:]) fi ]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ : ]) dnl From Paul Eggert dnl This is an override of an autoconf macro. AC_DEFUN([AC_FUNC_MBRTOWC], [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], gl_cv_func_mbrtowc, [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], gl_cv_func_mbrtowc=yes, gl_cv_func_mbrtowc=no)]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) id-utils-4.6+git20120811/m4/error.m40000664000000000000000000000154412166360012013317 0ustar #serial 14 # Copyright (C) 1996-1998, 2001-2004, 2009-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ERROR], [ dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer dnl maintained in Autoconf and because it invokes AC_LIBOBJ. AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[error_at_line (0, 0, "", 0, "an error occurred");]])], [ac_cv_lib_error_at_line=yes], [ac_cv_lib_error_at_line=no])]) ]) # Prerequisites of lib/error.c. AC_DEFUN([gl_PREREQ_ERROR], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) AC_REQUIRE([AC_C_INLINE]) : ]) id-utils-4.6+git20120811/m4/locale-tr.m40000664000000000000000000001210612166360012014044 0ustar # locale-tr.m4 serial 8 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a turkish locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_TR_UTF8], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. But BeOS does not implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the eighth month, the second character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) return 1; /* Check whether the upper-/lowercase mappings are as expected for Turkish. */ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=Turkish_Turkey.65001 else # None found. gt_cv_locale_tr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr.UTF-8 else # None found. gt_cv_locale_tr_utf8=none fi fi fi ;; esac else gt_cv_locale_tr_utf8=none fi rm -fr conftest* ]) LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 AC_SUBST([LOCALE_TR_UTF8]) ]) id-utils-4.6+git20120811/m4/warn-on-use.m40000664000000000000000000000416012166360012014336 0ustar # warn-on-use.m4 serial 4 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # If you assume C89, then it is generally safe to assume declarations # for functions declared in that standard (such as gets) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl dnl FIXME: gl_Symbol must be used unquoted until we can assume dnl autoconf 2.64 or newer. for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], gl_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) AS_VAR_IF(gl_Symbol, [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) id-utils-4.6+git20120811/m4/exponentl.m40000664000000000000000000000612112166360012014176 0ustar # exponentl.m4 serial 3 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION], [ AC_REQUIRE([gl_BIGENDIAN]) AC_CACHE_CHECK([where to find the exponent in a 'long double'], [gl_cv_cc_long_double_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_long_double_expbit0=`cat conftest.out`], [gl_cv_cc_long_double_expbit0="unknown"], [ dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. gl_cv_cc_long_double_expbit0="unknown" ]) rm -f conftest.out ]) case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'long double'.]) AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.]) ;; esac ]) id-utils-4.6+git20120811/m4/unistd_h.m40000664000000000000000000002127312166360012014004 0ustar # unistd_h.m4 serial 63 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_UNISTD_H # include #endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) GNULIB_READ=0; AC_SUBST([GNULIB_READ]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) id-utils-4.6+git20120811/m4/sys_types_h.m40000664000000000000000000000107712166360012014540 0ustar # sys_types_h.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SYS_TYPES_H], [ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) ]) AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], [ ]) id-utils-4.6+git20120811/m4/strings_h.m40000664000000000000000000000316312166360012014165 0ustar # Configure a replacement for . # serial 6 # Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_STRINGS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_BODY], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([strings.h]) if test $ac_cv_header_strings_h = yes; then HAVE_STRINGS_H=1 else HAVE_STRINGS_H=0 fi AC_SUBST([HAVE_STRINGS_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Minix 3.1.8 has a bug: must be included before . */ #include #include ]], [ffs strcasecmp strncasecmp]) ]) AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], [ GNULIB_FFS=0; AC_SUBST([GNULIB_FFS]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FFS=1; AC_SUBST([HAVE_FFS]) HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) ]) id-utils-4.6+git20120811/m4/asm-underscore.m40000664000000000000000000000431712166360012015116 0ustar # asm-underscore.m4 serial 2 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp. # gl_ASM_SYMBOL_PREFIX # Tests for the prefix of C symbols at the assembly language level and the # linker level. This prefix is either an underscore or empty. Defines the # C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to # a stringified variant of this prefix. AC_DEFUN([gl_ASM_SYMBOL_PREFIX], [ dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because dnl 1. It works only for GCC. dnl 2. It is incorrectly defined on some platforms, in some GCC versions. AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK( [whether C symbols are prefixed with underscore at the linker level], [gl_cv_prog_as_underscore], [cat > conftest.c </dev/null 2>&1 if grep _foo conftest.$gl_asmext >/dev/null ; then gl_cv_prog_as_underscore=yes else gl_cv_prog_as_underscore=no fi rm -f conftest* ]) if test $gl_cv_prog_as_underscore = yes; then USER_LABEL_PREFIX=_ else USER_LABEL_PREFIX= fi AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX], [Define to the prefix of C symbols at the assembler and linker level, either an underscore or empty.]) ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' AC_SUBST([ASM_SYMBOL_PREFIX]) ]) # gl_C_ASM # Determines how to produce an assembly language file from C source code. # Sets the variables: # gl_asmext - the extension of assembly language output, # gl_c_asm_opt - the C compiler option that produces assembly language output. AC_DEFUN([gl_C_ASM], [ AC_EGREP_CPP([MicrosoftCompiler], [ #ifdef _MSC_VER MicrosoftCompiler #endif ], [gl_asmext='asm' gl_c_asm_opt='-c -Fa' ], [gl_asmext='s' gl_c_asm_opt='-S' ]) ]) id-utils-4.6+git20120811/m4/fdopen.m40000664000000000000000000000250312166360012013435 0ustar # fdopen.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FDOPEN], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_FDOPEN=1 else dnl Test whether fdopen() sets errno when it fails due to a bad fd argument. AC_CACHE_CHECK([whether fdopen sets errno], [gl_cv_func_fdopen_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main (void) { FILE *fp; errno = 0; fp = fdopen (-1, "r"); if (fp != NULL) return 1; if (errno == 0) return 2; return 0; }]])], [gl_cv_func_fdopen_works=yes], [gl_cv_func_fdopen_works=no], [case "$host_os" in mingw*) gl_cv_func_fdopen_works="guessing no" ;; *) gl_cv_func_fdopen_works="guessing yes" ;; esac ]) ]) case "$gl_cv_func_fdopen_works" in *no) REPLACE_FDOPEN=1 ;; esac fi ]) dnl Prerequisites of lib/fdopen.c. AC_DEFUN([gl_PREREQ_FDOPEN], []) id-utils-4.6+git20120811/m4/strcase.m40000664000000000000000000000201212166360012013621 0ustar # strcase.m4 serial 11 dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STRCASE], [ gl_FUNC_STRCASECMP gl_FUNC_STRNCASECMP ]) AC_DEFUN([gl_FUNC_STRCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_CHECK_FUNCS([strcasecmp]) if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 fi ]) AC_DEFUN([gl_FUNC_STRNCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_CHECK_FUNCS([strncasecmp]) if test $ac_cv_func_strncasecmp = yes; then HAVE_STRNCASECMP=1 else HAVE_STRNCASECMP=0 fi AC_CHECK_DECLS([strncasecmp]) if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi ]) # Prerequisites of lib/strcasecmp.c. AC_DEFUN([gl_PREREQ_STRCASECMP], [ : ]) # Prerequisites of lib/strncasecmp.c. AC_DEFUN([gl_PREREQ_STRNCASECMP], [ : ]) id-utils-4.6+git20120811/m4/fcntl-o.m40000664000000000000000000001030512166360012013523 0ustar # fcntl-o.m4 serial 4 dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include # include # defined sleep(n) _sleep ((n) * 1000) #endif #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; ]], [[ int result = !constants; #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result;]])], [gl_cv_header_working_fcntl_h=yes], [case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], [gl_cv_header_working_fcntl_h=cross-compiling])]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], [Define to 1 if O_NOATIME works.]) case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], [Define to 1 if O_NOFOLLOW works.]) ]) id-utils-4.6+git20120811/m4/warnings.m40000664000000000000000000000265712166360012014024 0ustar # warnings.m4 serial 5 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson # gl_AS_VAR_APPEND(VAR, VALUE) # ---------------------------- # Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. m4_ifdef([AS_VAR_APPEND], [m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], [m4_define([gl_AS_VAR_APPEND], [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) # gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS]) # ------------------------------------------------ # Adds parameter to WARN_CFLAGS if the compiler supports it. For example, # gl_WARN_ADD([-Wparentheses]). AC_DEFUN([gl_WARN_ADD], dnl FIXME: gl_Warn must be used unquoted until we can assume dnl autoconf 2.64 or newer. [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [ gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} $1" AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])], [AS_VAR_SET(gl_Warn, [yes])], [AS_VAR_SET(gl_Warn, [no])]) CPPFLAGS="$gl_save_CPPFLAGS" ]) AS_VAR_IF(gl_Warn, [yes], [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])]) AS_VAR_POPDEF([gl_Warn])dnl m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl ]) id-utils-4.6+git20120811/m4/filenamecat.m40000664000000000000000000000075512166360012014441 0ustar # filenamecat.m4 serial 11 dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FILE_NAME_CONCAT], [ AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL]) ]) AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL], [ dnl Prerequisites of lib/filenamecat-lgpl.c. AC_CHECK_FUNCS_ONCE([mempcpy]) ]) id-utils-4.6+git20120811/m4/nocrash.m40000664000000000000000000001055412166360012013624 0ustar # nocrash.m4 serial 3 dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. AC_PREREQ([2.13]) dnl Expands to some code for use in .c programs that will cause the configure dnl test to exit instead of crashing. This is useful to avoid triggering dnl action from a background debugger and to avoid core dumps. dnl Usage: ... dnl ]GL_NOCRASH[ dnl ... dnl int main() { nocrash_init(); ... } AC_DEFUN([GL_NOCRASH],[[ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include #include static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif ]]) id-utils-4.6+git20120811/m4/fprintf-posix.m40000664000000000000000000001043012166360012014770 0ustar # fprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_fprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # fprintf exists and is # already POSIX compliant. gl_cv_func_fprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_fprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_FPRINTF fi ]) AC_DEFUN([gl_REPLACE_FPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([fprintf]) REPLACE_FPRINTF=1 AC_DEFINE([REPLACE_FPRINTF_POSIX], [1], [Define if fprintf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_FPRINTF ]) AC_DEFUN([gl_PREREQ_FPRINTF], [:]) id-utils-4.6+git20120811/m4/msvc-inval.m40000664000000000000000000000133412166360012014242 0ustar # msvc-inval.m4 serial 1 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MSVC_INVAL], [ AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) if test $ac_cv_func__set_invalid_parameter_handler = yes; then HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], [Define to 1 on MSVC platforms that have the "invalid parameter handler" concept.]) else HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 fi AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) ]) id-utils-4.6+git20120811/m4/locale-ja.m40000664000000000000000000001260112166360012014011 0ustar # locale-ja.m4 serial 10 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a japanese locale with EUC-JP encoding. AC_DEFUN([gt_LOCALE_JA], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_JA=$gt_cv_locale_ja AC_SUBST([LOCALE_JA]) ]) id-utils-4.6+git20120811/m4/dirname.m40000664000000000000000000000105412166360012013601 0ustar #serial 10 -*- autoconf -*- dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DIRNAME], [ AC_REQUIRE([gl_DIRNAME_LGPL]) ]) AC_DEFUN([gl_DIRNAME_LGPL], [ dnl Prerequisites of lib/dirname.h. AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, dnl lib/stripslash.c. ]) id-utils-4.6+git20120811/m4/iswblank.m40000664000000000000000000000234112166360012013774 0ustar # iswblank.m4 serial 4 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ISWBLANK], [ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) AC_REQUIRE([gl_WCTYPE_H]) dnl Persuade glibc to declare iswblank(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([iswblank]) AC_CHECK_DECLS([iswblank], , , [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include ]]) if test $ac_cv_func_iswblank = no; then HAVE_ISWBLANK=0 if test $ac_cv_have_decl_iswblank = yes; then REPLACE_ISWBLANK=1 fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then dnl Redefine all of iswcntrl, ..., towupper in . : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then dnl Redefine only iswblank. : fi fi ]) id-utils-4.6+git20120811/m4/fchdir.m40000664000000000000000000000332212166360012013421 0ustar # fchdir.m4 serial 20 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FCHDIR], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([fchdir]) if test $ac_cv_have_decl_fchdir = no; then HAVE_DECL_FCHDIR=0 fi AC_REQUIRE([gl_TEST_FCHDIR]) if test $HAVE_FCHDIR = 0; then AC_LIBOBJ([fchdir]) gl_PREREQ_FCHDIR AC_DEFINE([REPLACE_FCHDIR], [1], [Define to 1 if gnulib's fchdir() replacement is used.]) dnl We must also replace anything that can manipulate a directory fd, dnl to keep our bookkeeping up-to-date. We don't have to replace dnl fstatat, since no platform has fstatat but lacks fchdir. AC_CACHE_CHECK([whether open can visit directories], [gl_cv_func_open_directory_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]], [return open(".", O_RDONLY) < 0;])], [gl_cv_func_open_directory_works=yes], [gl_cv_func_open_directory_works=no], [gl_cv_func_open_directory_works="guessing no"])]) if test "$gl_cv_func_open_directory_works" != yes; then AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should work around the inability to open a directory.]) fi fi ]) # Determine whether to use the overrides in lib/fchdir.c. AC_DEFUN([gl_TEST_FCHDIR], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([fchdir]) if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi ]) # Prerequisites of lib/fchdir.c. AC_DEFUN([gl_PREREQ_FCHDIR], [:]) id-utils-4.6+git20120811/m4/closedir.m40000664000000000000000000000134612166360012013772 0ustar # closedir.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSEDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_CHECK_FUNCS([closedir]) if test $ac_cv_func_closedir = no; then HAVE_CLOSEDIR=0 fi dnl Replace closedir() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then if test $HAVE_CLOSEDIR = 1; then REPLACE_CLOSEDIR=1 fi fi ]) ]) id-utils-4.6+git20120811/m4/isnanf.m40000664000000000000000000001224212166360012013441 0ustar # isnanf.m4 serial 14 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnanf(). AC_DEFUN([gl_FUNC_ISNANF], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANF_LIBM= gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = no; then gl_HAVE_ISNANF_IN_LIBM if test $gl_cv_func_isnanf_in_libm = yes; then ISNANF_LIBM=-lm fi fi dnl The variable gl_func_isnanf set here is used by isnan.m4. if test $gl_cv_func_isnanf_no_libm = yes \ || test $gl_cv_func_isnanf_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANF_LIBM" gl_ISNANF_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanf_works" in *yes) gl_func_isnanf=yes ;; *) gl_func_isnanf=no; ISNANF_LIBM= ;; esac else gl_func_isnanf=no fi if test $gl_func_isnanf != yes; then HAVE_ISNANF=0 fi AC_SUBST([ISNANF_LIBM]) ]) dnl Check how to get or define isnanf() without linking with libm. AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM], [ gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = yes; then gl_ISNANF_WORKS fi if test $gl_cv_func_isnanf_no_libm = yes \ && { case "$gl_cv_func_isnanf_works" in *yes) true;; *) false;; esac }; then gl_func_isnanf_no_libm=yes AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1], [Define if the isnan(float) function is available in libc.]) else gl_func_isnanf_no_libm=no fi ]) dnl Prerequisites of replacement isnanf definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNANF], [ gl_FLOAT_EXPONENT_LOCATION ]) dnl Test whether isnanf() can be used without libm. AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm], [gl_cv_func_isnanf_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;]], [[return isnanf (x);]])], [gl_cv_func_isnanf_no_libm=yes], [gl_cv_func_isnanf_no_libm=no]) ]) ]) dnl Test whether isnanf() can be used with libm. AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used with libm], [gl_cv_func_isnanf_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;]], [[return isnanf (x);]])], [gl_cv_func_isnanf_in_libm=yes], [gl_cv_func_isnanf_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1), dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5). AC_DEFUN([gl_ISNANF_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaN () { static float zero = 0.0f; return zero / zero; } #else # define NaN() (0.0f / 0.0f) #endif #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; float value; } memory_float; int main() { int result = 0; if (isnanf (1.0f / 0.0f)) result |= 1; if (!isnanf (NaN ())) result |= 2; #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* The isnanf function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit. */ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) { memory_float m; m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; if (!isnanf (m.value)) result |= 4; } #endif return result; }]])], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no], [case "$host_os" in irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; *) gl_cv_func_isnanf_works="guessing yes";; esac ]) ]) ]) id-utils-4.6+git20120811/m4/ungetc.m40000664000000000000000000000255712166360012013460 0ustar # ungetc.m4 serial 2 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether ungetc works on arbitrary bytes], [gl_cv_func_ungetc_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include ]], [FILE *f; if (!(f = fopen ("conftest.tmp", "w+"))) return 1; if (fputs ("abc", f) < 0) return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != 'b') return 4; if (ungetc ('d', f) != 'd') return 5; if (ftell (f) != 1) return 6; if (fgetc (f) != 'd') return 7; if (ftell (f) != 2) return 8; if (fseek (f, 0, SEEK_CUR) != 0) return 9; if (ftell (f) != 2) return 10; if (fgetc (f) != 'c') return 11; fclose (f); remove ("conftest.tmp");])], [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], [gl_cv_func_ungetc_works='guessing no']) ]) if test "$gl_cv_func_ungetc_works" != yes; then AC_DEFINE([FUNC_UNGETC_BROKEN], [1], [Define to 1 if ungetc is broken when used on arbitrary bytes.]) fi ]) id-utils-4.6+git20120811/m4/double-slash-root.m40000664000000000000000000000312512166360012015526 0ustar # double-slash-root.m4 serial 4 -*- Autoconf -*- dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], [ if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi]) if test "$gl_cv_double_slash_root" = yes; then AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], [Define to 1 if // is a file system root distinct from /.]) fi ]) id-utils-4.6+git20120811/m4/printf.m40000664000000000000000000016623612166360012013502 0ustar # printf.m4 serial 48 dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test whether the *printf family of functions supports the 'j', 'z', 't', dnl 'L' size specifiers. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_sizes_c99. AC_DEFUN([gl_PRINTF_SIZES_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports size specifiers as in C99], [gl_cv_func_printf_sizes_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { int result = 0; #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) result |= 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) result |= 4; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) result |= 8; return result; }]])], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports 'long double' dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_long_double. AC_DEFUN([gl_PRINTF_LONG_DOUBLE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports 'long double' arguments], [gl_cv_func_printf_long_double], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[10000]; int main () { int result = 0; buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) result |= 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) result |= 4; return result; }]])], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no], [ changequote(,)dnl case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; *) gl_cv_func_printf_long_double="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'double' arguments and negative zero arguments in the %f, %e, %g dnl directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite. AC_DEFUN([gl_PRINTF_INFINITE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], [gl_cv_func_printf_infinite], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%f", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%f", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%e", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 4; if (sprintf (buf, "%e", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 4; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%g", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 16; if (sprintf (buf, "%g", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 16; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) result |= 64; return result; }]])], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite_long_double. AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl The user can set or unset the variable gl_printf_safe to indicate dnl that he wishes a safe handling of non-IEEE-754 'long double' values. if test -n "$gl_printf_safe"; then AC_DEFINE([CHECK_PRINTF_SAFE], [1], [Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values.]) fi case "$gl_cv_func_printf_long_double" in *yes) AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], [gl_cv_func_printf_infinite_long_double], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ ]GL_NOCRASH[ #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { int result = 0; nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; } #endif return result; }]])], [gl_cv_func_printf_infinite_long_double=yes], [gl_cv_func_printf_infinite_long_double=no], [ changequote(,)dnl case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac changequote([,])dnl ]) ]) ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac ]) dnl Test whether the *printf family of functions supports the 'a' and 'A' dnl conversion specifier for hexadecimal output of floating-point numbers. dnl (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_a. AC_DEFUN([gl_PRINTF_DIRECTIVE_A], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], [gl_cv_func_printf_directive_a], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) result |= 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) result |= 2; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) result |= 4; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 || buf[0] == '0') result |= 8; /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 16; /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 32; return result; }]])], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no], [ case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) AC_EGREP_CPP([BZ2908], [ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ BZ2908 #endif #endif ], [gl_cv_func_printf_directive_a="guessing yes"], [gl_cv_func_printf_directive_a="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %F format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_f. AC_DEFUN([gl_PRINTF_DIRECTIVE_F], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'F' directive], [gl_cv_func_printf_directive_f], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) result |= 1; if (sprintf (buf, "%F", 1.0 / zero) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) result |= 2; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) result |= 4; return result; }]])], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %n format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_n. AC_DEFUN([gl_PRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'n' directive], [gl_cv_func_printf_directive_n], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #ifdef _MSC_VER /* See page about "Parameter Validation" on msdn.microsoft.com. */ static void cdecl invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { exit (1); } #endif static char fmtstring[10]; static char buf[100]; int main () { int count = -1; #ifdef _MSC_VER _set_invalid_parameter_handler (invalid_parameter_handler); #endif /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; }]])], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no], [ changequote(,)dnl case "$host_os" in mingw*) gl_cv_func_printf_directive_n="guessing no";; *) gl_cv_func_printf_directive_n="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %ls format dnl directive and in particular, when a precision is specified, whether dnl the functions stop converting the wide string argument when the number dnl of bytes that have been produced by this conversion equals or exceeds dnl the precision. dnl Result is gl_cv_func_printf_directive_ls. AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'ls' directive], [gl_cv_func_printf_directive_ls], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { int result = 0; char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) result |= 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) result |= 2; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) result |= 8; } return result; }]])], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no], [ changequote(,)dnl case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with positions. (POSIX:2001) dnl Result is gl_cv_func_printf_positions. AC_DEFUN([gl_PRINTF_POSITIONS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], [gl_cv_func_printf_positions], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }]])], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no], [ changequote(,)dnl case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) dnl Result is gl_cv_func_printf_flag_grouping. AC_DEFUN([gl_PRINTF_FLAG_GROUPING], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the grouping flag], [gl_cv_func_printf_flag_grouping], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; }]])], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no], [ changequote(,)dnl case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the - flag correctly. dnl (ISO C99.) See dnl dnl Result is gl_cv_func_printf_flag_leftadjust. AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], [gl_cv_func_printf_flag_leftadjust], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; }]])], [gl_cv_func_printf_flag_leftadjust=yes], [gl_cv_func_printf_flag_leftadjust=no], [ changequote(,)dnl case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports padding of non-finite dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See dnl dnl Result is gl_cv_func_printf_flag_zero. AC_DEFUN([gl_PRINTF_FLAG_ZERO], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the zero flag correctly], [gl_cv_func_printf_flag_zero], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; }]])], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports large precisions. dnl On mingw, precisions larger than 512 are treated like 512, in integer, dnl floating-point or pointer output. On Solaris 10/x86, precisions larger dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC, dnl precisions larger than 510 in floating-point output yield wrong results. dnl On AIX 7.1, precisions larger than 998 in floating-point output yield dnl wrong results. On BeOS, precisions larger than 1044 crash the program. dnl Result is gl_cv_func_printf_precision. AC_DEFUN([gl_PRINTF_PRECISION], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports large precisions], [gl_cv_func_printf_precision], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[5000]; int main () { int result = 0; #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) result |= 1; if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) result |= 2; if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 || buf[0] != '1') result |= 4; if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 || buf[0] != '1') result |= 4; return result; }]])], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no], [ changequote(,)dnl case "$host_os" in # Guess no only on Solaris, native Windows, and BeOS systems. solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions recovers gracefully in case dnl of an out-of-memory condition, or whether it crashes the entire program. dnl Result is gl_cv_func_printf_enomem. AC_DEFUN([gl_PRINTF_ENOMEM], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_MULTIARCH]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf survives out-of-memory conditions], [gl_cv_func_printf_enomem], [ gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then AC_LANG_CONFTEST([AC_LANG_SOURCE([ ]GL_NOCRASH[ changequote(,)dnl #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then (./conftest result=$? if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else dnl A universal build on Apple MacOS X platforms. dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac changequote([,])dnl fi ]) ]) dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) dnl Result is ac_cv_func_snprintf. AC_DEFUN([gl_SNPRINTF_PRESENCE], [ AC_CHECK_FUNCS_ONCE([snprintf]) ]) dnl Test whether the string produced by the snprintf function is always NUL dnl terminated. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_truncation_c99. AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf truncates the result as in C99], [gl_cv_func_snprintf_truncation_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char buf[100]; int main () { strcpy (buf, "ABCDEF"); my_snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; }]])], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the return value of the snprintf function is the number dnl of bytes (excluding the terminating NUL) that would have been produced dnl if the buffer had been large enough. (ISO C99, POSIX:2001) dnl For example, this test program fails on IRIX 6.5: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8]; dnl int retval = snprintf (buf, 3, "%d", 12345); dnl return retval >= 0 && retval < 3; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_snprintf_retval_c99. AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], [gl_cv_func_snprintf_retval_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) return 2; if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) return 3; return 0; }]])], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function supports the %n format directive dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_directive_n. AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], [gl_cv_func_snprintf_directive_n], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; }]])], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function, when passed a size = 1, writes any dnl output without bounds in this case, behaving like sprintf. This is the dnl case on Linux libc5. dnl Result is gl_cv_func_snprintf_size1. AC_DEFUN([gl_SNPRINTF_SIZE1], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf respects a size of 1], [gl_cv_func_snprintf_size1], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; }]])], [gl_cv_func_snprintf_size1=yes], [gl_cv_func_snprintf_size1=no], [gl_cv_func_snprintf_size1="guessing yes"]) ]) ]) dnl Test whether the vsnprintf function, when passed a zero size, produces no dnl output. (ISO C99, POSIX:2001) dnl For example, snprintf nevertheless writes a NUL byte in this case dnl on OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl And vsnprintf writes any output without bounds in this case, behaving like dnl vsprintf, on HP-UX 11 and OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl #include dnl static int my_snprintf (char *buf, int size, const char *format, ...) dnl { dnl va_list args; dnl int ret; dnl va_start (args, format); dnl ret = vsnprintf (buf, size, format, args); dnl va_end (args); dnl return ret; dnl } dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl my_snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_vsnprintf_zerosize_c99. AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], [gl_cv_func_vsnprintf_zerosize_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; }]])], [gl_cv_func_vsnprintf_zerosize_c99=yes], [gl_cv_func_vsnprintf_zerosize_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on mingw. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl The results of these tests on various platforms are: dnl dnl 1 = gl_PRINTF_SIZES_C99 dnl 2 = gl_PRINTF_LONG_DOUBLE dnl 3 = gl_PRINTF_INFINITE dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE dnl 5 = gl_PRINTF_DIRECTIVE_A dnl 6 = gl_PRINTF_DIRECTIVE_F dnl 7 = gl_PRINTF_DIRECTIVE_N dnl 8 = gl_PRINTF_DIRECTIVE_LS dnl 9 = gl_PRINTF_POSITIONS dnl 10 = gl_PRINTF_FLAG_GROUPING dnl 11 = gl_PRINTF_FLAG_LEFTADJUST dnl 12 = gl_PRINTF_FLAG_ZERO dnl 13 = gl_PRINTF_PRECISION dnl 14 = gl_PRINTF_ENOMEM dnl 15 = gl_SNPRINTF_PRESENCE dnl 16 = gl_SNPRINTF_TRUNCATION_C99 dnl 17 = gl_SNPRINTF_RETVAL_C99 dnl 18 = gl_SNPRINTF_DIRECTIVE_N dnl 19 = gl_SNPRINTF_SIZE1 dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 dnl dnl 1 = checking whether printf supports size specifiers as in C99... dnl 2 = checking whether printf supports 'long double' arguments... dnl 3 = checking whether printf supports infinite 'double' arguments... dnl 4 = checking whether printf supports infinite 'long double' arguments... dnl 5 = checking whether printf supports the 'a' and 'A' directives... dnl 6 = checking whether printf supports the 'F' directive... dnl 7 = checking whether printf supports the 'n' directive... dnl 8 = checking whether printf supports the 'ls' directive... dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... dnl 10 = checking whether printf supports the grouping flag... dnl 11 = checking whether printf supports the left-adjust flag correctly... dnl 12 = checking whether printf supports the zero flag correctly... dnl 13 = checking whether printf supports large precisions... dnl 14 = checking whether printf survives out-of-memory conditions... dnl 15 = checking for snprintf... dnl 16 = checking whether snprintf truncates the result as in C99... dnl 17 = checking whether snprintf returns a byte count as in C99... dnl 18 = checking whether snprintf fully supports the 'n' directive... dnl 19 = checking whether snprintf respects a size of 1... dnl 20 = checking whether vsnprintf respects a zero size as in C99... dnl dnl . = yes, # = no. dnl dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . . dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . . dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . . dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . ? . . . dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . . dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . . dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . . dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . . id-utils-4.6+git20120811/m4/stddef_h.m40000664000000000000000000000275512166360012013753 0ustar dnl A placeholder for POSIX 2008 , for platforms that have issues. # stddef_h.m4 serial 4 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi AC_SUBST([STDDEF_H]) AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then gl_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) ]) id-utils-4.6+git20120811/m4/mmap-anon.m40000664000000000000000000000372112166360012014050 0ustar # mmap-anon.m4 serial 9 dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Detect how mmap can be used to create anonymous (not file-backed) memory # mappings. # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS # and MAP_ANON exist and have the same value. # - On HP-UX, only MAP_ANONYMOUS exists. # - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be # used. AC_DEFUN([gl_FUNC_MMAP_ANON], [ dnl Persuade glibc to define MAP_ANONYMOUS. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then AC_MSG_CHECKING([for MAP_ANONYMOUS]) AC_EGREP_CPP([I cant identify this map], [ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif ], [gl_have_mmap_anonymous=yes]) if test $gl_have_mmap_anonymous != yes; then AC_EGREP_CPP([I cant identify this map], [ #include #ifdef MAP_ANON I cant identify this map #endif ], [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) gl_have_mmap_anonymous=yes]) fi AC_MSG_RESULT([$gl_have_mmap_anonymous]) if test $gl_have_mmap_anonymous = yes; then AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and .]) fi fi ]) id-utils-4.6+git20120811/m4/printf-posix-rpl.m40000664000000000000000000000137412166360012015424 0ustar # printf-posix-rpl.m4 serial 4 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_PRINTF_POSIX], [ AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX]) if test $gl_cv_func_vfprintf_posix = no; then gl_REPLACE_PRINTF fi ]) AC_DEFUN([gl_REPLACE_PRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) AC_LIBOBJ([printf]) REPLACE_PRINTF=1 AC_DEFINE([REPLACE_PRINTF_POSIX], [1], [Define if printf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_PRINTF ]) AC_DEFUN([gl_PREREQ_PRINTF], [:]) id-utils-4.6+git20120811/m4/gnulib-common.m40000664000000000000000000003275612166360012014745 0ustar # gnulib-common.m4 serial 32 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* 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 ]) AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The __const__ attribute was added in gcc 2.95. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ ]) # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depending # whether a gnulib module that has been requested shall be considered present # or not. m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) # gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) # sets the shell variable that indicates the presence of the given module to # a C preprocessor expression that will evaluate to 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ gl_MODULE_INDICATOR_SET_VARIABLE_AUX( [GNULIB_[]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], [gl_MODULE_INDICATOR_CONDITION]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) # modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. # The shell variable's value is a C preprocessor expression that evaluates # to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], [ m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], [ dnl Simplify the expression VALUE || 1 to 1. $1=1 ], [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], [gl_MODULE_INDICATOR_CONDITION])]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) # modifies the shell variable to include the given condition. The shell # variable's value is a C preprocessor expression that evaluates to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], [ dnl Simplify the expression 1 || CONDITION to 1. if test "$[]$1" != 1; then dnl Simplify the expression 0 || CONDITION to CONDITION. if test "$[]$1" = 0; then $1=$2 else $1="($[]$1 || $2)" fi fi ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module # in a location where it can be used. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 0 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [gl_MODULE_INDICATOR_CONDITION], [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module $1 shall be considered present.]) ]) # gl_MODULE_INDICATOR_FOR_TESTS([modulename]) # defines a C macro indicating the presence of the given module # in lib or tests. This is useful to determine whether the module # should be tested. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [ AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when the gnulib module $1 should be tested.]) ]) # gl_ASSERT_NO_GNULIB_POSIXCHECK # asserts that there will never be a need to #define GNULIB_POSIXCHECK. # and thereby enables an optimization of configure and config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. dnl But hide this definition from 'aclocal'. AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) ]) # gl_ASSERT_NO_GNULIB_TESTS # asserts that there will be no gnulib tests in the scope of the configure.ac # and thereby enables an optimization of config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], [ dnl Override gl_MODULE_INDICATOR_FOR_TESTS. AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) ]) # Test whether exists. # Set HAVE_FEATURES_H. AC_DEFUN([gl_FEATURES_H], [ AC_CHECK_HEADERS_ONCE([features.h]) if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi AC_SUBST([HAVE_FEATURES_H]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # gl_PROG_CC_C99 # Modifies the value of the shell variable CC in an attempt to make $CC # understand ISO C99 source code. # This is like AC_PROG_CC_C99, except that # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC # , # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 # . # Remaining problems: # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # . # - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ dnl Change that version number to the minimum Autoconf version that supports dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. m4_version_prereq([9.0], [AC_REQUIRE([AC_PROG_CC_C99])], [AC_REQUIRE([AC_PROG_CC_STDC])]) ]) # gl_PROG_AR_RANLIB # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override # the values. AC_DEFUN([gl_PROG_AR_RANLIB], [ dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler dnl as "cc", and GCC as "gcc". They have different object file formats and dnl library formats. In particular, the GNU binutils programs ar, ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], [ #ifdef __ACK__ Amsterdam #endif ], [gl_cv_c_amsterdam_compiler=yes], [gl_cv_c_amsterdam_compiler=no]) ]) if test -z "$AR"; then if test $gl_cv_c_amsterdam_compiler = yes; then AR='cc -c.a' if test -z "$ARFLAGS"; then ARFLAGS='-o' fi else dnl Use the Automake-documented default values for AR and ARFLAGS, dnl but prefer ${host}-ar over ar (useful for cross-compiling). AC_CHECK_TOOL([AR], [ar], [ar]) if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi else if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi AC_SUBST([AR]) AC_SUBST([ARFLAGS]) if test -z "$RANLIB"; then if test $gl_cv_c_amsterdam_compiler = yes; then RANLIB=':' else dnl Use the ranlib program if it is available. AC_PROG_RANLIB fi fi AC_SUBST([RANLIB]) ]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], m4_defn([AC_PROG_MKDIR_P])[ AC_SUBST([MKDIR_P])])], [ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) id-utils-4.6+git20120811/m4/inttostr.m40000664000000000000000000000145412166360012014054 0ustar #serial 8 dnl Copyright (C) 2004-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_INTTOSTR], [ gl_PREREQ_INTTOSTR gl_PREREQ_IMAXTOSTR gl_PREREQ_OFFTOSTR gl_PREREQ_UMAXTOSTR gl_PREREQ_UINTTOSTR ]) # Prerequisites of lib/inttostr.h. AC_DEFUN([gl_PREREQ_INTTOSTR], [ AC_REQUIRE([AC_TYPE_OFF_T]) : ]) # Prerequisites of lib/imaxtostr.c. AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:]) # Prerequisites of lib/offtostr.c. AC_DEFUN([gl_PREREQ_OFFTOSTR], [:]) # Prerequisites of lib/umaxtostr.c. AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:]) # Prerequisites of lib/uinttostr.c. AC_DEFUN([gl_PREREQ_UINTTOSTR], [:]) id-utils-4.6+git20120811/m4/btowc.m40000664000000000000000000000613312166360012013303 0ustar # btowc.m4 serial 10 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_BTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) dnl Check whether is usable at all, first. Otherwise the test dnl program below may lead to an endless loop. See dnl . AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) AC_CHECK_FUNCS_ONCE([btowc]) if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0. AC_CACHE_CHECK([whether btowc(0) is correct], [gl_cv_func_btowc_nul], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (btowc ('\0') != 0) return 1; return 0; }]])], [gl_cv_func_btowc_nul=yes], [gl_cv_func_btowc_nul=no], [ changequote(,)dnl case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac changequote([,])dnl ]) ]) dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. AC_CACHE_CHECK([whether btowc(EOF) is correct], [gl_cv_func_btowc_eof], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; }]])], [gl_cv_func_btowc_eof=yes], [gl_cv_func_btowc_eof=no], [:]) fi ]) case "$gl_cv_func_btowc_nul" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi ]) # Prerequisites of lib/btowc.c. AC_DEFUN([gl_PREREQ_BTOWC], [ : ]) id-utils-4.6+git20120811/m4/gettext.m40000664000000000000000000003513212166360012013652 0ustar # gettext.m4 serial 63 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) id-utils-4.6+git20120811/m4/xsize.m40000664000000000000000000000066212166360012013330 0ustar # xsize.m4 serial 4 dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([AC_C_INLINE]) AC_CHECK_HEADERS([stdint.h]) ]) id-utils-4.6+git20120811/m4/fopen.m40000664000000000000000000000330612166360012013273 0ustar # fopen.m4 serial 8 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FOPEN], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) dnl Replace fopen, for handling of "/dev/null". REPLACE_FOPEN=1 dnl fopen on mingw also has the trailing slash bug. gl_cv_func_fopen_slash="guessing no" ;; *) dnl fopen("foo/", "w") should not create a file when the file name has a dnl trailing slash. AC_CACHE_CHECK([whether fopen recognizes a trailing slash], [gl_cv_func_fopen_slash], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main () { return fopen ("conftest.sl/", "w") != NULL; }]])], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no], [ changequote(,)dnl case "$host_os" in aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) gl_cv_func_fopen_slash="guessing no" ;; *) gl_cv_func_fopen_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl ]) ;; esac case "$gl_cv_func_fopen_slash" in *no) AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if fopen() fails to recognize a trailing slash.]) REPLACE_FOPEN=1 ;; esac ]) # Prerequisites of lib/fopen.c. AC_DEFUN([gl_PREREQ_FOPEN], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/autobuild.m40000664000000000000000000000201012166360012014143 0ustar # autobuild.m4 serial 7 dnl Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson # Usage: AB_INIT([MODE]). AC_DEFUN([AB_INIT], [ AC_REQUIRE([AC_CANONICAL_BUILD]) AC_REQUIRE([AC_CANONICAL_HOST]) if test -z "$AB_PACKAGE"; then AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} fi AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) if test -z "$AB_VERSION"; then AB_VERSION=${PACKAGE_VERSION:-$VERSION} fi AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) hostname=`hostname` if test "$hostname"; then AC_MSG_NOTICE([autobuild hostname... $hostname]) fi ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` if test "$?" != 0; then date=`date` fi if test "$date"; then AC_MSG_NOTICE([autobuild timestamp... $date]) fi ]) id-utils-4.6+git20120811/m4/exponentf.m40000664000000000000000000000545612166360012014202 0ustar # exponentf.m4 serial 2 dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'float'], [gl_cv_cc_float_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_float_expbit0=`cat conftest.out`], [gl_cv_cc_float_expbit0="unknown"], [gl_cv_cc_float_expbit0="word 0 bit 23"]) rm -f conftest.out ]) case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'float'.]) AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.]) ;; esac ]) id-utils-4.6+git20120811/m4/close-stream.m40000664000000000000000000000054112166360012014560 0ustar #serial 4 dnl Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites of lib/close-stream.c. AC_DEFUN([gl_CLOSE_STREAM], [ : ]) id-utils-4.6+git20120811/m4/locale_h.m40000664000000000000000000000576212166360012013742 0ustar # locale_h.m4 serial 14 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALE_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) dnl Persuade glibc to define locale_t. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl If is replaced, then must also be replaced. AC_REQUIRE([gl_STDDEF_H]) AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], [gl_cv_header_locale_h_posix2001], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int x = LC_MESSAGES;]], [[]])], [gl_cv_header_locale_h_posix2001=yes], [gl_cv_header_locale_h_posix2001=no])]) dnl Check for . AC_CHECK_HEADERS_ONCE([xlocale.h]) if test $ac_cv_header_xlocale_h = yes; then HAVE_XLOCALE_H=1 dnl Check whether use of locale_t requires inclusion of , dnl e.g. on MacOS X 10.5. If does not define locale_t by dnl itself, we assume that will do so. AC_CACHE_CHECK([whether locale.h defines locale_t], [gl_cv_header_locale_has_locale_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include locale_t x;]], [[]])], [gl_cv_header_locale_has_locale_t=yes], [gl_cv_header_locale_has_locale_t=no]) ]) if test $gl_cv_header_locale_has_locale_t = yes; then gl_cv_header_locale_h_needs_xlocale_h=no else gl_cv_header_locale_h_needs_xlocale_h=yes fi else HAVE_XLOCALE_H=0 gl_cv_header_locale_h_needs_xlocale_h=no fi AC_SUBST([HAVE_XLOCALE_H]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_NEXT_HEADERS([locale.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some systems provide declarations in a non-standard header. */ #if HAVE_XLOCALE_H # include #endif ]], [setlocale duplocale]) ]) AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LOCALE_H_DEFAULTS], [ GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) ]) id-utils-4.6+git20120811/m4/getopt.m40000664000000000000000000002644312166360012013475 0ustar # getopt.m4 serial 39 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Request a POSIX compliant getopt function. AC_DEFUN([gl_FUNC_GETOPT_POSIX], [ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Other modules can request the gnulib implementation of the getopt dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. dnl argp.m4 does this. m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ gl_GETOPT_IFELSE([], []) REPLACE_GETOPT=1 ], [ REPLACE_GETOPT=0 gl_GETOPT_IFELSE([ REPLACE_GETOPT=1 ], []) ]) if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER fi ]) # Request a POSIX compliant getopt function with GNU extensions (such as # options with optional arguments) and the functions getopt_long, # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_IFELSE], [ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) ]) # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON dnl Persuade Solaris to declare optarg, optind, opterr, optopt. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_CHECK_NEXT_HEADERS([getopt.h]) if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi AC_SUBST([HAVE_GETOPT_H]) gl_replace_getopt= dnl Test whether is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) fi dnl Test whether the function getopt_long is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) fi dnl mingw's getopt (in libmingwex.a) does weird things when the options dnl strings starts with '+' and it's not the first call. Some internal state dnl is left over from earlier calls, and neither setting optind = 0 nor dnl setting optreset = 1 get rid of this internal state. dnl POSIX is silent on optind vs. optreset, so we allow either behavior. dnl POSIX 2008 does not specify leading '+' behavior, but see dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on dnl the next version of POSIX. For now, we only guarantee leading '+' dnl behavior with getopt-gnu. if test -z "$gl_replace_getopt"; then AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ dnl BSD getopt_long uses an incompatible method to reset option dnl processing. Existence of the optreset variable, in and of dnl itself, is not a reason to replace getopt, but knowledge dnl of the variable is needed to determine how to reset and dnl whether a reset reparses the environment. Solaris dnl supports neither optreset nor optind=0, but keeps no state dnl that needs a reset beyond setting optind=1; detect Solaris dnl by getopt_clip. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int *p = &optreset; return optreset;]])], [gl_optind_min=1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !getopt_clip;]])], [gl_optind_min=1], [gl_optind_min=0])]) dnl This test fails on mingw and succeeds on many other platforms. gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include int main () { { static char program[] = "program"; static char a[] = "-a"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, a, foo, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (4, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (4, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { static char program[] = "program"; static char donald[] = "donald"; static char p[] = "-p"; static char billy[] = "billy"; static char duck[] = "duck"; static char a[] = "-a"; static char bar[] = "bar"; char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (7, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { static char program[] = "program"; static char ab[] = "-ab"; char *argv[3] = { program, ab, NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } ]])], [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no], [case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac ]) CPPFLAGS=$gl_save_CPPFLAGS ]) case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. dnl GNU Coding Standards currently allow awk but not env; besides, env dnl is ambiguous with environment values that contain newlines. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" #include #include ]GL_NOCRASH[ ]], [[ int result = 0; nocrash_init(); /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { static char conftest[] = "conftest"; static char plus[] = "-+"; char *argv[3] = { conftest, plus, NULL }; opterr = 0; if (getopt (2, argv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { static char program[] = "program"; static char p[] = "-p"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { static char program[] = "program"; static char foo[] = "foo"; static char p[] = "-p"; char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { static char program[] = "program"; static char b[] = "-b"; static char a[] = "-a"; char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } /* This code dumps core on glibc 2.14. */ { static char program[] = "program"; static char w[] = "-W"; static char dummy[] = "dummy"; char *argv[] = { program, w, dummy, NULL }; optind = opterr = 1; if (getopt (3, argv, "W;") != 'W') result |= 128; } return result; ]])], [gl_cv_func_getopt_gnu=yes], [gl_cv_func_getopt_gnu=no], [dnl Cross compiling. Guess based on host and declarations. case $host_os:$ac_cv_have_decl_optreset in *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; *:yes) gl_cv_func_getopt_gnu=no;; *) gl_cv_func_getopt_gnu=yes;; esac ]) case $gl_had_POSIXLY_CORRECT in exported) ;; yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; *) AS_UNSET([POSIXLY_CORRECT]) ;; esac ]) if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) AC_SUBST([GETOPT_H]) ]) # Prerequisites of lib/getopt*. # emacs' configure.in uses this. AC_DEFUN([gl_PREREQ_GETOPT], [ AC_CHECK_DECLS_ONCE([getenv]) ]) id-utils-4.6+git20120811/m4/inttypes.m40000664000000000000000000001223112166360012014040 0ustar # inttypes.m4 serial 26 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Derek Price, Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_INTTYPES_H], [ AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) gl_INTTYPES_PRI_SCN ]) AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], [ AC_REQUIRE([gl_STDINT_H]) AC_CHECK_HEADERS_ONCE([inttypes.h]) dnl Override always, so that the portability warnings work. AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([inttypes.h]) AC_REQUIRE([gl_MULTIARCH]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [imaxabs imaxdiv strtoimax strtoumax]) ]) # Ensure that the PRI* and SCN* macros are defined appropriately. AC_DEFUN([gl_INTTYPES_PRI_SCN], [ AC_REQUIRE([gt_INTTYPES_PRI]) PRIPTR_PREFIX= if test -n "$STDINT_H"; then dnl Using the gnulib . It always defines intptr_t to 'long'. PRIPTR_PREFIX='"l"' else dnl Using the system's . for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include extern intptr_t foo; extern $gltype1 foo;]])], [PRIPTR_PREFIX='"'$glpfx'"']) test -n "$PRIPTR_PREFIX" && break done fi AC_SUBST([PRIPTR_PREFIX]) gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT32_MAX_LT_INTMAX_MAX], [defined INT32_MAX && defined INTMAX_MAX], [INT32_MAX < INTMAX_MAX], [sizeof (int) < sizeof (long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT64_MAX_EQ_LONG_MAX], [defined INT64_MAX], [INT64_MAX == LONG_MAX], [sizeof (long long int) == sizeof (long int)]) else INT64_MAX_EQ_LONG_MAX=-1 fi gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT32_MAX_LT_UINTMAX_MAX], [defined UINT32_MAX && defined UINTMAX_MAX], [UINT32_MAX < UINTMAX_MAX], [sizeof (unsigned int) < sizeof (unsigned long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT64_MAX_EQ_ULONG_MAX], [defined UINT64_MAX], [UINT64_MAX == ULONG_MAX], [sizeof (unsigned long long int) == sizeof (unsigned long int)]) else UINT64_MAX_EQ_ULONG_MAX=-1 fi ]) # Define the symbol $1 to be 1 if the condition is true, 0 otherwise. # If $2 is true, the condition is $3; otherwise if long long int is supported # approximate the condition with $4; otherwise, assume the condition is false. # The condition should work on all C99 platforms; the approximations should be # good enough to work on all practical pre-C99 platforms. # $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], [ AC_CACHE_CHECK([whether $3], [gl_cv_test_$1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if $2 #define CONDITION ($3) #elif HAVE_LONG_LONG_INT #define CONDITION ($4) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1];]])], [gl_cv_test_$1=yes], [gl_cv_test_$1=no])]) if test $gl_cv_test_$1 = yes; then $1=1; else $1=0; fi AC_SUBST([$1]) ]) AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) ]) id-utils-4.6+git20120811/m4/longlong.m40000664000000000000000000001120312166360012013776 0ustar # longlong.m4 serial 17 dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug is not important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [], [ac_cv_type_long_long_int=no], [:]) fi fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type 'long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [], [ac_cv_type_unsigned_long_long_int=no]) fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) id-utils-4.6+git20120811/m4/fseek.m40000664000000000000000000000100512166360012013253 0ustar # fseek.m4 serial 4 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSEEK], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FSEEKO]) dnl When fseeko needs fixes, fseek needs them too. if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then REPLACE_FSEEK=1 fi ]) id-utils-4.6+git20120811/m4/gnu-make.m40000664000000000000000000000114212166360012013664 0ustar # Determine whether recent-enough GNU Make is being used. # Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. # Set GNU_MAKE if we are using a recent-enough version of GNU make. # Use --version AND trailing junk, because SGI Make doesn't fail on --version. AC_DEFUN([gl_GNU_MAKE], [ AM_CONDITIONAL([GNU_MAKE], [${MAKE-make} --version /cannot/make/this >/dev/null 2>&1]) ]) id-utils-4.6+git20120811/m4/signbit.m40000664000000000000000000002552212166360012013627 0ustar # signbit.m4 serial 11 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNBIT], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* If signbit is defined as a function, don't use it, since calling it for 'float' or 'long double' arguments would involve conversions. If signbit is not declared at all but exists as a library function, don't use it, since the prototype may not match. If signbit is not declared at all but exists as a compiler built-in, don't use it, since it's preferable to use __builtin_signbit* (no warnings, no conversions). */ #ifndef signbit # error "signbit should be a macro" #endif #include ]gl_SIGNBIT_TEST_PROGRAM ])], [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no], [gl_cv_func_signbit="guessing no"]) ]) dnl GCC 4.0 and newer provides three built-ins for signbit. dnl They can be used without warnings, also in C++, regardless of . dnl But they may expand to calls to functions, which may or may not be in dnl libc. AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #if __GNUC__ >= 4 # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) #else # error "signbit should be three compiler built-ins" #endif #include ]gl_SIGNBIT_TEST_PROGRAM ])], [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no], [gl_cv_func_signbit_gcc="guessing no"]) ]) dnl Use the compiler built-ins whenever possible, because they are more dnl efficient than the system library functions (if they exist). if test "$gl_cv_func_signbit_gcc" = yes; then REPLACE_SIGNBIT_USING_GCC=1 else if test "$gl_cv_func_signbit" != yes; then dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built. REPLACE_SIGNBIT=1 gl_FLOAT_SIGN_LOCATION gl_DOUBLE_SIGN_LOCATION gl_LONG_DOUBLE_SIGN_LOCATION if test "$gl_cv_cc_float_signbit" = unknown; then dnl Test whether copysignf() is declared. AC_CHECK_DECLS([copysignf], , , [[#include ]]) if test "$ac_cv_have_decl_copysignf" = yes; then dnl Test whether copysignf() can be used without libm. AC_CACHE_CHECK([whether copysignf can be used without linking with libm], [gl_cv_func_copysignf_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include float x, y;]], [[return copysignf (x, y) < 0;]])], [gl_cv_func_copysignf_no_libm=yes], [gl_cv_func_copysignf_no_libm=no]) ]) if test $gl_cv_func_copysignf_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1], [Define if the copysignf function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_double_signbit" = unknown; then dnl Test whether copysign() is declared. AC_CHECK_DECLS([copysign], , , [[#include ]]) if test "$ac_cv_have_decl_copysign" = yes; then dnl Test whether copysign() can be used without libm. AC_CACHE_CHECK([whether copysign can be used without linking with libm], [gl_cv_func_copysign_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x, y;]], [[return copysign (x, y) < 0;]])], [gl_cv_func_copysign_no_libm=yes], [gl_cv_func_copysign_no_libm=no]) ]) if test $gl_cv_func_copysign_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1], [Define if the copysign function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_long_double_signbit" = unknown; then dnl Test whether copysignl() is declared. AC_CHECK_DECLS([copysignl], , , [[#include ]]) if test "$ac_cv_have_decl_copysignl" = yes; then dnl Test whether copysignl() can be used without libm. AC_CACHE_CHECK([whether copysignl can be used without linking with libm], [gl_cv_func_copysignl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x, y;]], [[return copysignl (x, y) < 0;]])], [gl_cv_func_copysignl_no_libm=yes], [gl_cv_func_copysignl_no_libm=no]) ]) if test $gl_cv_func_copysignl_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1], [Define if the copysignl function is declared in and available in libc.]) fi fi fi fi fi ]) AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[ /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif int result = 0; if (signbit (vf)) /* link check */ vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 1; } if (signbit (vd)) /* link check */ vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 2; } if (signbit (vl)) /* link check */ vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (signbit (255.0L)) result |= 4; if (!signbit (-255.0L)) result |= 4; if (signbit (p0l)) result |= 8; if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) result |= 16; if (signbit (plus_inf)) result |= 32; if (!signbit (minus_inf)) result |= 64; } return result; } ]]) AC_DEFUN([gl_FLOAT_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT]) ]) AC_DEFUN([gl_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL]) ]) AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL]) ]) AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION], [ AC_CACHE_CHECK([where to find the sign bit in a '$1'], [$2], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #define NWORDS \ ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { $1 value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0$3 }; static memory_float minus = { -1.0$3 }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 2; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 4; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); if (fclose (fp) != 0) return 5; return 0; } ]])], [$2=`cat conftest.out`], [$2="unknown"], [ dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. $2="unknown" ]) rm -f conftest.out ]) case "$]$2[" in word*bit*) word=`echo "$]$2[" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$]$2[" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word], [Define as the word index where to find the sign of '$1'.]) AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit], [Define as the bit index in the word where to find the sign of '$1'.]) ;; esac ]) # Expands to code that defines a function signbitf(float). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_FLOAT_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([float], [f], [f]) ]) # Expands to code that defines a function signbitd(double). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_DOUBLE_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([double], [d], []) ]) # Expands to code that defines a function signbitl(long double). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_LONG_DOUBLE_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([long double], [l], [L]) ]) AC_DEFUN([gl_FLOATTYPE_SIGNBIT_CODE], [[ static int signbit$2 ($1 value) { typedef union { $1 f; unsigned char b[sizeof ($1)]; } float_union; static float_union plus_one = { 1.0$3 }; /* unused bits are zero here */ static float_union minus_one = { -1.0$3 }; /* unused bits are zero here */ /* Compute the sign bit mask as the XOR of plus_one and minus_one. */ float_union u; unsigned int i; u.f = value; for (i = 0; i < sizeof ($1); i++) if (u.b[i] & (plus_one.b[i] ^ minus_one.b[i])) return 1; return 0; } ]]) id-utils-4.6+git20120811/m4/calloc.m40000664000000000000000000000436412166360012013426 0ustar # calloc.m4 serial 14 # Copyright (C) 2004-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Jim Meyering. # Determine whether calloc (N, S) returns non-NULL when N*S is zero, # and returns NULL when N*S overflows. # If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc # and arrange to use a calloc wrapper function that does work in that case. # _AC_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT]) # ------------------------------------- # If 'calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT. AC_DEFUN([_AC_FUNC_CALLOC_IF], [ AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_CACHE_CHECK([for GNU libc compatible calloc], [ac_cv_func_calloc_0_nonnull], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[int result = 0; if (!calloc (0, 0)) result |= 1; if (calloc ((size_t) -1 / 8 + 1, 8)) result |= 2; return result; ]])], [ac_cv_func_calloc_0_nonnull=yes], [ac_cv_func_calloc_0_nonnull=no], [ac_cv_func_calloc_0_nonnull=no])]) AS_IF([test $ac_cv_func_calloc_0_nonnull = yes], [$1], [$2]) ])# AC_FUNC_CALLOC # gl_FUNC_CALLOC_GNU # ------------------ # Report whether 'calloc (0, 0)' is properly handled, and replace calloc if # needed. AC_DEFUN([gl_FUNC_CALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) _AC_FUNC_CALLOC_IF( [AC_DEFINE([HAVE_CALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'calloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_CALLOC_GNU], [0]) REPLACE_CALLOC=1 ]) ])# gl_FUNC_CALLOC_GNU # gl_FUNC_CALLOC_POSIX # -------------------- # Test whether 'calloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace calloc if it is not. AC_DEFUN([gl_FUNC_CALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_CALLOC_POSIX], [1], [Define if the 'calloc' function is POSIX compliant.]) else REPLACE_CALLOC=1 fi ]) id-utils-4.6+git20120811/m4/localcharset.m40000664000000000000000000000112512166360012014625 0ustar # localcharset.m4 serial 7 dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_GLIBC21]) ]) id-utils-4.6+git20120811/m4/getcwd-abort-bug.m40000664000000000000000000000740112166360012015321 0ustar # serial 7 # Determine whether getcwd aborts when the length of the working directory # name is unusually large. Any length between 4k and 16k trigger the bug # when using glibc-2.4.90-9 or older. # Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # From Jim Meyering # gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], [ AC_CHECK_DECLS_ONCE([getcwd]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CHECK_FUNCS([getpagesize]) AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], gl_cv_func_getcwd_abort_bug, [# Remove any remnants of a previous test. rm -rf confdir-14B--- # Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir-14B---" dnl Please keep this in sync with tests/test-getcwd.c. AC_RUN_IFELSE( [AC_LANG_SOURCE( [[ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif #include #include ]gl_PATHMAX_SNIPPET[ /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ #undef mkdir #ifndef S_IRWXU # define S_IRWXU 0700 #endif /* FIXME: skip the run-test altogether on systems without getpagesize. */ #if ! HAVE_GETPAGESIZE # define getpagesize() 0 #endif /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than the 16kB pagesize on ia64 linux. Those conditions make the code below trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ #define TARGET_LEN (5 * 1024) int main () { char const *dir_name = "confdir-14B---"; char *cwd; size_t initial_cwd_len; int fail = 0; size_t desired_depth; size_t d; /* The bug is triggered when PATH_MAX < getpagesize (), so skip this relatively expensive and invasive test if that's not true. */ if (getpagesize () <= PATH_MAX) return 0; cwd = getcwd (NULL, 0); if (cwd == NULL) return 2; initial_cwd_len = strlen (cwd); free (cwd); desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) / (1 + strlen (dir_name))); for (d = 0; d < desired_depth; d++) { if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) { fail = 3; /* Unable to construct deep hierarchy. */ break; } } /* If libc has the bug in question, this invocation of getcwd results in a failed assertion. */ cwd = getcwd (NULL, 0); if (cwd == NULL) fail = 4; /* getcwd failed: it refuses to return a string longer than PATH_MAX. */ free (cwd); /* Call rmdir first, in case the above chdir failed. */ rmdir (dir_name); while (0 < d--) { if (chdir ("..") < 0) { fail = 5; break; } rmdir (dir_name); } return fail; } ]])], [gl_cv_func_getcwd_abort_bug=no], [dnl An abort will provoke an exit code of something like 134 (128 + 6). dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for dnl example): getcwd (NULL, 0) fails rather than returning a string dnl longer than PATH_MAX. This may be POSIX compliant (in some dnl interpretations of POSIX). But gnulib's getcwd module wants to dnl provide a non-NULL value in this case. ret=$? if test $ret -ge 128 || test $ret = 4; then gl_cv_func_getcwd_abort_bug=yes else gl_cv_func_getcwd_abort_bug=no fi], [gl_cv_func_getcwd_abort_bug=yes]) ]) AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) ]) id-utils-4.6+git20120811/m4/fdopendir.m40000664000000000000000000000257412166360012014144 0ustar # serial 9 # See if we need to provide fdopendir. dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Eric Blake. AC_DEFUN([gl_FUNC_FDOPENDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl FreeBSD 7.3 has the function, but failed to declare it. AC_CHECK_DECLS([fdopendir], [], [HAVE_DECL_FDOPENDIR=0], [[ #include ]]) AC_CHECK_FUNCS_ONCE([fdopendir]) if test $ac_cv_func_fdopendir = no; then HAVE_FDOPENDIR=0 else AC_CACHE_CHECK([whether fdopendir works], [gl_cv_func_fdopendir_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #if !HAVE_DECL_FDOPENDIR extern # ifdef __cplusplus "C" # endif DIR *fdopendir (int); #endif ]], [int result = 0; int fd = open ("conftest.c", O_RDONLY); if (fd < 0) result |= 1; if (fdopendir (fd)) result |= 2; if (close (fd)) result |= 4; return result;])], [gl_cv_func_fdopendir_works=yes], [gl_cv_func_fdopendir_works=no], [gl_cv_func_fdopendir_works="guessing no"])]) if test "$gl_cv_func_fdopendir_works" != yes; then REPLACE_FDOPENDIR=1 fi fi ]) id-utils-4.6+git20120811/m4/mbiter.m40000664000000000000000000000067612166360012013455 0ustar # mbiter.m4 serial 6 dnl Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbiter.h dnl From Bruno Haible. AC_DEFUN([gl_MBITER], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) : ]) id-utils-4.6+git20120811/m4/fstat.m40000664000000000000000000000144712166360012013311 0ustar # fstat.m4 serial 1 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_FSTAT=1 fi dnl Replace fstat() for supporting the gnulib-defined open() on directories. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0 \ && test "$gl_cv_func_open_directory_works" != yes; then REPLACE_FSTAT=1 fi ]) ]) # Prerequisites of lib/fstat.c. AC_DEFUN([gl_PREREQ_FSTAT], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/codeset.m40000664000000000000000000000150012166360012013604 0ustar # codeset.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char* cs = nl_langinfo(CODESET); return !cs;]])], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) id-utils-4.6+git20120811/m4/fnmatch.m40000664000000000000000000001357512166360012013615 0ustar # Check for fnmatch - serial 8. # Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent. # New applications should use the macros below instead. # Request a POSIX compliant fnmatch function. AC_DEFUN([gl_FUNC_FNMATCH_POSIX], [ m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) dnl Persuade glibc to declare FNM_CASEFOLD etc. dnl This is only needed if gl_fnmatch_required = GNU. It would be possible dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) FNMATCH_H= gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]' ` gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], [$gl_fnmatch_cache_var], [dnl Some versions of Solaris, SCO, and the GNU C Library dnl have a broken or incompatible fnmatch. dnl So we run a test program. If we are cross-compiling, take no chance. dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this dnl test. if test $gl_fnmatch_required = GNU; then gl_fnmatch_gnu_start= gl_fnmatch_gnu_end= else gl_fnmatch_gnu_start='#if 0' gl_fnmatch_gnu_end='#endif' fi AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include static int y (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == 0; } static int n (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == FNM_NOMATCH; } ]], [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; static char const A_1[] = { 'A' - 1, 0 }; static char const A01[] = { 'A' + 1, 0 }; static char const a_1[] = { 'a' - 1, 0 }; static char const a01[] = { 'a' + 1, 0 }; static char const bs_1[] = { '\\\\' - 1, 0 }; static char const bs01[] = { '\\\\' + 1, 0 }; int result = 0; if (!n ("a*", "", 0)) return 1; if (!y ("a*", "abc", 0)) return 1; if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ return 1; if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) return 2; if (!y ("a\\\\bc", "abc", 0)) return 3; if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) return 3; if (!y ("*x", ".x", 0)) return 4; if (!n ("*x", ".x", FNM_PERIOD)) return 4; if (!y (Apat, "\\\\", 0)) return 5; if (!y (Apat, "A", 0)) return 5; if (!y (apat, "\\\\", 0)) return 5; if (!y (apat, "a", 0)) return 5; if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) return 5; if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) return 5; if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) return 5; if (!(y (apat, a01, 0) == ('a' < '\\\\'))) return 5; if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) return 5; if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) return 5; if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) return 5; if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) return 5; $gl_fnmatch_gnu_start if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) result |= 8; if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) result |= 16; if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) result |= 32; if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; $gl_fnmatch_gnu_end return result; ]])], [eval "$gl_fnmatch_cache_var=yes"], [eval "$gl_fnmatch_cache_var=no"], [eval "$gl_fnmatch_cache_var=\"guessing no\""]) ]) eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" if test "$gl_fnmatch_result" = yes; then dnl Not strictly necessary. Only to avoid spurious leftover files if people dnl don't do "make distclean". rm -f "$gl_source_base/fnmatch.h" else FNMATCH_H=fnmatch.h fi AC_SUBST([FNMATCH_H]) AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. AC_DEFUN([gl_FUNC_FNMATCH_GNU], [ m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU]) AC_REQUIRE([gl_FUNC_FNMATCH_POSIX]) ]) AC_DEFUN([gl_PREREQ_FNMATCH], [ dnl We must choose a different name for our function, since on ELF systems dnl a broken fnmatch() in libc.so would override our fnmatch() if it is dnl compiled into a shared library. AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], [Define to a replacement function name for fnmatch().]) dnl Prerequisites of lib/fnmatch.c. AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) AC_CHECK_HEADERS_ONCE([wctype.h]) ]) id-utils-4.6+git20120811/m4/langinfo_h.m40000664000000000000000000000672112166360012014274 0ustar # langinfo_h.m4 serial 7 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LANGINFO_H], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) dnl Persuade glibc-2.0.6 to define CODESET. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([langinfo.h]) dnl Determine whether exists. It is missing on mingw and BeOS. HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_T_FMT_AMPM=0 HAVE_LANGINFO_ERA=0 HAVE_LANGINFO_YESEXPR=0 AC_CHECK_HEADERS_ONCE([langinfo.h]) if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 dnl Determine what defines. CODESET and ERA etc. are missing dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. AC_CACHE_CHECK([whether langinfo.h defines CODESET], [gl_cv_header_langinfo_codeset], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = CODESET; ]])], [gl_cv_header_langinfo_codeset=yes], [gl_cv_header_langinfo_codeset=no]) ]) if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], [gl_cv_header_langinfo_t_fmt_ampm], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = T_FMT_AMPM; ]])], [gl_cv_header_langinfo_t_fmt_ampm=yes], [gl_cv_header_langinfo_t_fmt_ampm=no]) ]) if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then HAVE_LANGINFO_T_FMT_AMPM=1 fi AC_CACHE_CHECK([whether langinfo.h defines ERA], [gl_cv_header_langinfo_era], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = ERA; ]])], [gl_cv_header_langinfo_era=yes], [gl_cv_header_langinfo_era=no]) ]) if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], [gl_cv_header_langinfo_yesexpr], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = YESEXPR; ]])], [gl_cv_header_langinfo_yesexpr=yes], [gl_cv_header_langinfo_yesexpr=no]) ]) if test $gl_cv_header_langinfo_yesexpr = yes; then HAVE_LANGINFO_YESEXPR=1 fi else HAVE_LANGINFO_H=0 fi AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) AC_SUBST([HAVE_LANGINFO_ERA]) AC_SUBST([HAVE_LANGINFO_YESEXPR]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [nl_langinfo]) ]) AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LANGINFO_H_DEFAULTS], [ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) ]) id-utils-4.6+git20120811/m4/gnulib-comp.m40000664000000000000000000014123412166360012014403 0ustar # DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file 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 file 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 file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects that use version control, this file can be treated like # other built files. # This macro should be invoked from ./configure.ac, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([gl_PROG_AR_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module alloca: # Code from module alloca-opt: # Code from module alloca-opt-tests: # Code from module announce-gen: # Code from module argmatch: # Code from module argmatch-tests: # Code from module argv-iter: # Code from module argv-iter-tests: # Code from module at-internal: # Code from module autobuild: AB_INIT # Code from module binary-io: # Code from module binary-io-tests: # Code from module bitrotate: # Code from module bitrotate-tests: # Code from module btowc: # Code from module btowc-tests: # Code from module c-ctype: # Code from module c-ctype-tests: # Code from module c-strcase: # Code from module c-strcase-tests: # Code from module c-strcaseeq: # Code from module calloc: # Code from module calloc-gnu: # Code from module calloc-gnu-tests: # Code from module calloc-posix: # Code from module chdir: # Code from module chdir-long: # Code from module chdir-tests: # Code from module cloexec: # Code from module cloexec-tests: # Code from module close: # Code from module close-stream: # Code from module close-tests: # Code from module closedir: # Code from module closeout: # Code from module configmake: # Code from module d-ino: # Code from module dirent: # Code from module dirent-tests: # Code from module dirfd: # Code from module dirname: # Code from module dirname-lgpl: # Code from module dirname-tests: # Code from module do-release-commit-and-tag: # Code from module dosname: # Code from module double-slash-root: # Code from module dup: # Code from module dup-tests: # Code from module dup2: # Code from module dup2-tests: # Code from module environ: # Code from module environ-tests: # Code from module errno: # Code from module errno-tests: # Code from module error: # Code from module exclude: # Code from module exclude-tests: # Code from module exitfail: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module fchdir: # Code from module fchdir-tests: # Code from module fcntl: # Code from module fcntl-h: # Code from module fcntl-h-tests: # Code from module fcntl-tests: # Code from module fd-hook: # Code from module fd-safer-flag: # Code from module fdopen: # Code from module fdopen-tests: # Code from module fdopendir: # Code from module fdopendir-tests: # Code from module fflush: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module fflush-tests: # Code from module fgetc-tests: # Code from module filename: # Code from module filenamecat-lgpl: # Code from module float: # Code from module float-tests: # Code from module fnmatch: # Code from module fnmatch-gnu: # Code from module fnmatch-tests: # Code from module fopen: # Code from module fopen-tests: # Code from module fpending: # Code from module fpending-tests: # Code from module fpieee: AC_REQUIRE([gl_FP_IEEE]) # Code from module fprintf-posix: # Code from module fprintf-posix-tests: # Code from module fpucw: # Code from module fpurge: # Code from module fpurge-tests: # Code from module fputc-tests: # Code from module fread-tests: # Code from module freading: # Code from module freading-tests: # Code from module freopen: # Code from module freopen-tests: # Code from module frexp-nolibm: # Code from module frexp-nolibm-tests: # Code from module frexpl-nolibm: # Code from module frexpl-nolibm-tests: # Code from module fseek: # Code from module fseek-tests: # Code from module fseeko: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module fseeko-tests: # Code from module fseterr: # Code from module fseterr-tests: # Code from module fstat: # Code from module fstat-tests: # Code from module fstatat: # Code from module fstatat-tests: # Code from module ftell: # Code from module ftell-tests: # Code from module ftello: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module ftello-tests: # Code from module fwrite-tests: # Code from module gendocs: # Code from module get-rusage-as: # Code from module getcwd: # Code from module getcwd-lgpl: # Code from module getcwd-lgpl-tests: # Code from module getcwd-tests: # Code from module getdelim: # Code from module getdelim-tests: # Code from module getdtablesize: # Code from module getdtablesize-tests: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module getopt-posix-tests: # Code from module getpagesize: # Code from module gettext-h: # Code from module git-version-gen: # Code from module gitlog-to-changelog: # Code from module gnu-make: # Code from module gnu-web-doc-update: # Code from module gnumakefile: # Code from module gnupload: # Code from module hash: # Code from module hash-pjw: # Code from module hash-tests: # Code from module havelib: # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: # Code from module inline: # Code from module intprops: # Code from module intprops-tests: # Code from module inttostr: # Code from module inttostr-tests: # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module inttypes-tests: # Code from module isnand-nolibm: # Code from module isnand-nolibm-tests: # Code from module isnanf-nolibm: # Code from module isnanf-nolibm-tests: # Code from module isnanl-nolibm: # Code from module isnanl-nolibm-tests: # Code from module iswblank: # Code from module iswblank-tests: # Code from module langinfo: # Code from module langinfo-tests: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) # Code from module localcharset: # Code from module locale: # Code from module locale-tests: # Code from module localename: # Code from module localename-tests: # Code from module lock: # Code from module lock-tests: # Code from module lseek: # Code from module lseek-tests: # Code from module lstat: # Code from module lstat-tests: # Code from module maintainer-makefile: # Code from module malloc: # Code from module malloc-gnu: # Code from module malloc-gnu-tests: # Code from module malloc-posix: # Code from module malloca: # Code from module malloca-tests: # Code from module manywarnings: # Code from module math: # Code from module math-tests: # Code from module mbchar: # Code from module mbrtowc: # Code from module mbrtowc-tests: # Code from module mbscasecmp: # Code from module mbscasecmp-tests: # Code from module mbsinit: # Code from module mbsinit-tests: # Code from module mbsrtowcs: # Code from module mbsrtowcs-tests: # Code from module mbtowc: # Code from module mbuiter: # Code from module memchr: # Code from module memchr-tests: # Code from module mempcpy: # Code from module memrchr: # Code from module memrchr-tests: # Code from module msvc-inval: # Code from module msvc-nothrow: # Code from module multiarch: # Code from module nl_langinfo: # Code from module nl_langinfo-tests: # Code from module nocrash: # Code from module obstack: # Code from module open: # Code from module open-tests: # Code from module openat: # Code from module openat-die: # Code from module openat-h: # Code from module openat-tests: # Code from module opendir: # Code from module pathmax: # Code from module pathmax-tests: # Code from module perl: # Code from module posix-shell: # Code from module printf-frexp: # Code from module printf-frexp-tests: # Code from module printf-frexpl: # Code from module printf-frexpl-tests: # Code from module printf-posix: # Code from module printf-posix-tests: # Code from module printf-safe: # Code from module progname: # Code from module putenv: # Code from module quote: # Code from module quotearg: # Code from module quotearg-simple: # Code from module quotearg-simple-tests: # Code from module readdir: # Code from module readme-release: # Code from module realloc: # Code from module realloc-gnu: # Code from module realloc-gnu-tests: # Code from module realloc-posix: # Code from module regex: # Code from module rewinddir: # Code from module same-inode: # Code from module save-cwd: # Code from module setenv: # Code from module setenv-tests: # Code from module setlocale: # Code from module setlocale-tests: # Code from module signbit: # Code from module signbit-tests: # Code from module size_max: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-tests: # Code from module sprintf-posix: # Code from module sprintf-posix-tests: # Code from module ssize_t: # Code from module stat: # Code from module stat-macros: # Code from module stat-tests: # Code from module stdbool: # Code from module stdbool-tests: # Code from module stddef: # Code from module stddef-tests: # Code from module stdint: # Code from module stdint-tests: # Code from module stdio: # Code from module stdio-tests: # Code from module stdlib: # Code from module stdlib-tests: # Code from module strcase: # Code from module strcasestr: # Code from module strcasestr-simple: # Code from module strcasestr-tests: # Code from module strdup-posix: # Code from module streq: # Code from module strerror: # Code from module strerror-override: # Code from module strerror-tests: # Code from module string: # Code from module string-tests: # Code from module strings: # Code from module strings-tests: # Code from module strndup: # Code from module strnlen: # Code from module strnlen-tests: # Code from module strnlen1: # Code from module strsep: # Code from module symlink: # Code from module symlink-tests: # Code from module sys_ioctl: # Code from module sys_ioctl-tests: # Code from module sys_stat: # Code from module sys_stat-tests: # Code from module sys_types: # Code from module sys_types-tests: # Code from module test-framework-sh: # Code from module test-framework-sh-tests: # Code from module thread: # Code from module thread-tests: # Code from module threadlib: gl_THREADLIB_EARLY # Code from module time: # Code from module time-tests: # Code from module unistd: # Code from module unistd-safer: # Code from module unistd-safer-tests: # Code from module unistd-tests: # Code from module unitypes: # Code from module uniwidth/base: # Code from module uniwidth/width: # Code from module uniwidth/width-tests: # Code from module unsetenv: # Code from module unsetenv-tests: # Code from module update-copyright: # Code from module update-copyright-tests: # Code from module useless-if-before-free: # Code from module vasnprintf: # Code from module vasnprintf-tests: # Code from module vc-list-files: # Code from module vc-list-files-tests: # Code from module verify: # Code from module verify-tests: # Code from module vfprintf-posix: # Code from module vfprintf-posix-tests: # Code from module vma-iter: # Code from module warnings: # Code from module wchar: # Code from module wchar-tests: # Code from module wcrtomb: # Code from module wcrtomb-tests: # Code from module wctob: # Code from module wctomb: # Code from module wctype-h: # Code from module wctype-h-tests: # Code from module wcwidth: # Code from module wcwidth-tests: # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-die-tests: # Code from module xalloc-oversized: # Code from module xgetcwd: # Code from module xsize: # Code from module xstrndup: # Code from module yield: ]) # This macro should be invoked from ./configure.ac, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_m4_base='m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib' gl_FUNC_ALLOCA AC_LIBOBJ([openat-proc]) AC_REQUIRE([AC_C_INLINE]) gl_FUNC_BTOWC if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then AC_LIBOBJ([btowc]) gl_PREREQ_BTOWC fi gl_WCHAR_MODULE_INDICATOR([btowc]) gl_FUNC_CALLOC_GNU if test $REPLACE_CALLOC = 1; then AC_LIBOBJ([calloc]) fi gl_MODULE_INDICATOR([calloc-gnu]) gl_FUNC_CALLOC_POSIX if test $REPLACE_CALLOC = 1; then AC_LIBOBJ([calloc]) fi gl_STDLIB_MODULE_INDICATOR([calloc-posix]) gl_UNISTD_MODULE_INDICATOR([chdir]) gl_FUNC_CHDIR_LONG if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then AC_LIBOBJ([chdir-long]) gl_PREREQ_CHDIR_LONG fi gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) gl_FUNC_CLOSE if test $REPLACE_CLOSE = 1; then AC_LIBOBJ([close]) fi gl_UNISTD_MODULE_INDICATOR([close]) gl_CLOSE_STREAM gl_MODULE_INDICATOR([close-stream]) gl_FUNC_CLOSEDIR if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then AC_LIBOBJ([closedir]) fi gl_DIRENT_MODULE_INDICATOR([closedir]) gl_CLOSEOUT gl_CONFIGMAKE_PREP gl_CHECK_TYPE_STRUCT_DIRENT_D_INO gl_DIRENT_H gl_FUNC_DIRFD if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then AC_LIBOBJ([dirfd]) gl_PREREQ_DIRFD fi gl_DIRENT_MODULE_INDICATOR([dirfd]) gl_DIRNAME gl_MODULE_INDICATOR([dirname]) gl_DIRNAME_LGPL gl_DOUBLE_SLASH_ROOT gl_FUNC_DUP if test $REPLACE_DUP = 1; then AC_LIBOBJ([dup]) gl_PREREQ_DUP fi gl_UNISTD_MODULE_INDICATOR([dup]) gl_FUNC_DUP2 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then AC_LIBOBJ([dup2]) gl_PREREQ_DUP2 fi gl_UNISTD_MODULE_INDICATOR([dup2]) gl_HEADER_ERRNO_H gl_ERROR if test $ac_cv_lib_error_at_line = no; then AC_LIBOBJ([error]) gl_PREREQ_ERROR fi m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) gl_FUNC_FCHDIR gl_UNISTD_MODULE_INDICATOR([fchdir]) gl_FUNC_FCNTL if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then AC_LIBOBJ([fcntl]) fi gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H gl_FUNC_FDOPENDIR if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then AC_LIBOBJ([fdopendir]) fi gl_DIRENT_MODULE_INDICATOR([fdopendir]) gl_MODULE_INDICATOR([fdopendir]) gl_FUNC_FFLUSH if test $REPLACE_FFLUSH = 1; then AC_LIBOBJ([fflush]) gl_PREREQ_FFLUSH fi gl_MODULE_INDICATOR([fflush]) gl_STDIO_MODULE_INDICATOR([fflush]) gl_FILE_NAME_CONCAT_LGPL gl_FLOAT_H if test $REPLACE_FLOAT_LDBL = 1; then AC_LIBOBJ([float]) fi if test $REPLACE_ITOLD = 1; then AC_LIBOBJ([itold]) fi gl_FUNC_FNMATCH_POSIX if test -n "$FNMATCH_H"; then AC_LIBOBJ([fnmatch]) gl_PREREQ_FNMATCH fi gl_FUNC_FNMATCH_GNU if test -n "$FNMATCH_H"; then AC_LIBOBJ([fnmatch]) gl_PREREQ_FNMATCH fi gl_FUNC_FOPEN if test $REPLACE_FOPEN = 1; then AC_LIBOBJ([fopen]) gl_PREREQ_FOPEN fi gl_STDIO_MODULE_INDICATOR([fopen]) gl_FUNC_FPENDING if test $ac_cv_func___fpending = no; then AC_LIBOBJ([fpending]) gl_PREREQ_FPENDING fi gl_FUNC_FPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([fprintf-posix]) gl_FUNC_FPURGE if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then AC_LIBOBJ([fpurge]) fi gl_STDIO_MODULE_INDICATOR([fpurge]) gl_FUNC_FREADING gl_FUNC_FREOPEN if test $REPLACE_FREOPEN = 1; then AC_LIBOBJ([freopen]) gl_PREREQ_FREOPEN fi gl_STDIO_MODULE_INDICATOR([freopen]) gl_FUNC_FREXP_NO_LIBM if test $gl_func_frexp_no_libm != yes; then AC_LIBOBJ([frexp]) fi gl_MATH_MODULE_INDICATOR([frexp]) gl_FUNC_FREXPL_NO_LIBM if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then AC_LIBOBJ([frexpl]) fi gl_MATH_MODULE_INDICATOR([frexpl]) gl_FUNC_FSEEK if test $REPLACE_FSEEK = 1; then AC_LIBOBJ([fseek]) fi gl_STDIO_MODULE_INDICATOR([fseek]) gl_FUNC_FSEEKO if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then AC_LIBOBJ([fseeko]) fi gl_STDIO_MODULE_INDICATOR([fseeko]) gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) gl_FUNC_FSTATAT if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then AC_LIBOBJ([fstatat]) fi AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/openat.h gl_MODULE_INDICATOR([fstatat]) dnl for lib/openat.h gl_SYS_STAT_MODULE_INDICATOR([fstatat]) gl_FUNC_FTELL if test $REPLACE_FTELL = 1; then AC_LIBOBJ([ftell]) fi gl_STDIO_MODULE_INDICATOR([ftell]) gl_FUNC_FTELLO if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then AC_LIBOBJ([ftello]) fi gl_STDIO_MODULE_INDICATOR([ftello]) gl_FUNC_GETCWD if test $REPLACE_GETCWD = 1; then AC_LIBOBJ([getcwd]) gl_PREREQ_GETCWD fi gl_MODULE_INDICATOR([getcwd]) gl_UNISTD_MODULE_INDICATOR([getcwd]) gl_FUNC_GETCWD_LGPL if test $REPLACE_GETCWD = 1; then AC_LIBOBJ([getcwd-lgpl]) fi gl_UNISTD_MODULE_INDICATOR([getcwd]) gl_FUNC_GETDELIM if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then AC_LIBOBJ([getdelim]) gl_PREREQ_GETDELIM fi gl_STDIO_MODULE_INDICATOR([getdelim]) gl_FUNC_GETDTABLESIZE if test $HAVE_GETDTABLESIZE = 0; then AC_LIBOBJ([getdtablesize]) gl_PREREQ_GETDTABLESIZE fi gl_UNISTD_MODULE_INDICATOR([getdtablesize]) gl_FUNC_GETOPT_GNU if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_GNU_MAKE # Autoconf 2.61a.99 and earlier don't support linking a file only # in VPATH builds. But since GNUmakefile is for maintainer use # only, it does not matter if we skip the link with older autoconf. # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH # builds, so use a shell variable to bypass this. GNUmakefile=GNUmakefile m4_if(m4_version_compare([2.61a.100], m4_defn([m4_PACKAGE_VERSION])), [1], [], [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], [GNUmakefile=$GNUmakefile])]) AC_REQUIRE([AC_C_INLINE]) gl_INLINE gl_INTTOSTR gl_FUNC_ISNAND_NO_LIBM if test $gl_func_isnand_no_libm != yes; then AC_LIBOBJ([isnand]) gl_PREREQ_ISNAND fi gl_FUNC_ISNANF_NO_LIBM if test $gl_func_isnanf_no_libm != yes; then AC_LIBOBJ([isnanf]) gl_PREREQ_ISNANF fi gl_FUNC_ISNANL_NO_LIBM if test $gl_func_isnanl_no_libm != yes; then AC_LIBOBJ([isnanl]) gl_PREREQ_ISNANL fi gl_FUNC_ISWBLANK if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then AC_LIBOBJ([iswblank]) fi fi gl_WCTYPE_MODULE_INDICATOR([iswblank]) gl_LANGINFO_H gl_LOCALCHARSET LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_FUNC_LSEEK if test $REPLACE_LSEEK = 1; then AC_LIBOBJ([lseek]) fi gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_LSTAT if test $REPLACE_LSTAT = 1; then AC_LIBOBJ([lstat]) gl_PREREQ_LSTAT fi gl_SYS_STAT_MODULE_INDICATOR([lstat]) AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) gl_FUNC_MALLOC_GNU if test $REPLACE_MALLOC = 1; then AC_LIBOBJ([malloc]) fi gl_MODULE_INDICATOR([malloc-gnu]) gl_FUNC_MALLOC_POSIX if test $REPLACE_MALLOC = 1; then AC_LIBOBJ([malloc]) fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_MATH_H gl_MBCHAR gl_FUNC_MBRTOWC if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then AC_LIBOBJ([mbrtowc]) gl_PREREQ_MBRTOWC fi gl_WCHAR_MODULE_INDICATOR([mbrtowc]) gl_STRING_MODULE_INDICATOR([mbscasecmp]) gl_FUNC_MBSINIT if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then AC_LIBOBJ([mbsinit]) gl_PREREQ_MBSINIT fi gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_FUNC_MBSRTOWCS if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then AC_LIBOBJ([mbsrtowcs]) AC_LIBOBJ([mbsrtowcs-state]) gl_PREREQ_MBSRTOWCS fi gl_WCHAR_MODULE_INDICATOR([mbsrtowcs]) gl_FUNC_MBTOWC if test $REPLACE_MBTOWC = 1; then AC_LIBOBJ([mbtowc]) gl_PREREQ_MBTOWC fi gl_STDLIB_MODULE_INDICATOR([mbtowc]) gl_MBITER gl_FUNC_MEMCHR if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then AC_LIBOBJ([memchr]) gl_PREREQ_MEMCHR fi gl_STRING_MODULE_INDICATOR([memchr]) gl_FUNC_MEMPCPY if test $HAVE_MEMPCPY = 0; then AC_LIBOBJ([mempcpy]) gl_PREREQ_MEMPCPY fi gl_STRING_MODULE_INDICATOR([mempcpy]) gl_FUNC_MEMRCHR if test $ac_cv_func_memrchr = no; then AC_LIBOBJ([memrchr]) gl_PREREQ_MEMRCHR fi gl_STRING_MODULE_INDICATOR([memrchr]) gl_MSVC_INVAL if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-inval]) fi gl_MSVC_NOTHROW if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-nothrow]) fi gl_MULTIARCH gl_FUNC_NL_LANGINFO if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then AC_LIBOBJ([nl_langinfo]) fi gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) AC_FUNC_OBSTACK dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]). gl_FUNC_OPEN if test $REPLACE_OPEN = 1; then AC_LIBOBJ([open]) gl_PREREQ_OPEN fi gl_FCNTL_MODULE_INDICATOR([open]) gl_FUNC_OPENAT if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then AC_LIBOBJ([openat]) gl_PREREQ_OPENAT fi gl_MODULE_INDICATOR([openat]) dnl for lib/getcwd.c gl_FCNTL_MODULE_INDICATOR([openat]) gl_FUNC_OPENDIR if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then AC_LIBOBJ([opendir]) fi gl_DIRENT_MODULE_INDICATOR([opendir]) gl_PATHMAX gl_PERL gl_POSIX_SHELL gl_FUNC_PRINTF_FREXP gl_FUNC_PRINTF_FREXPL gl_FUNC_PRINTF_POSIX gl_STDIO_MODULE_INDICATOR([printf-posix]) m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes]) AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) gl_QUOTE gl_QUOTEARG gl_FUNC_READDIR if test $HAVE_READDIR = 0; then AC_LIBOBJ([readdir]) fi gl_DIRENT_MODULE_INDICATOR([readdir]) gl_FUNC_REALLOC_GNU if test $REPLACE_REALLOC = 1; then AC_LIBOBJ([realloc]) fi gl_MODULE_INDICATOR([realloc-gnu]) gl_FUNC_REALLOC_POSIX if test $REPLACE_REALLOC = 1; then AC_LIBOBJ([realloc]) fi gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_REGEX if test $ac_use_included_regex = yes; then AC_LIBOBJ([regex]) gl_PREREQ_REGEX fi gl_FUNC_REWINDDIR if test $HAVE_REWINDDIR = 0; then AC_LIBOBJ([rewinddir]) fi gl_DIRENT_MODULE_INDICATOR([rewinddir]) gl_SAVE_CWD gl_SIGNBIT if test $REPLACE_SIGNBIT = 1; then AC_LIBOBJ([signbitf]) AC_LIBOBJ([signbitd]) AC_LIBOBJ([signbitl]) fi gl_MATH_MODULE_INDICATOR([signbit]) gl_SIZE_MAX gl_FUNC_SPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([sprintf-posix]) gt_TYPE_SSIZE_T gl_FUNC_STAT if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) gl_PREREQ_STAT fi gl_SYS_STAT_MODULE_INDICATOR([stat]) AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H gl_STDIO_H gl_STDLIB_H gl_STRCASE if test $HAVE_STRCASECMP = 0; then AC_LIBOBJ([strcasecmp]) gl_PREREQ_STRCASECMP fi if test $HAVE_STRNCASECMP = 0; then AC_LIBOBJ([strncasecmp]) gl_PREREQ_STRNCASECMP fi gl_FUNC_STRCASESTR if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi gl_FUNC_STRCASESTR_SIMPLE if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi gl_STRING_MODULE_INDICATOR([strcasestr]) gl_FUNC_STRDUP_POSIX if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then AC_LIBOBJ([strdup]) gl_PREREQ_STRDUP fi gl_STRING_MODULE_INDICATOR([strdup]) gl_FUNC_STRERROR if test $REPLACE_STRERROR = 1; then AC_LIBOBJ([strerror]) fi gl_MODULE_INDICATOR([strerror]) gl_STRING_MODULE_INDICATOR([strerror]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then AC_LIBOBJ([strerror-override]) gl_PREREQ_SYS_H_WINSOCK2 fi gl_HEADER_STRING_H gl_HEADER_STRINGS_H gl_FUNC_STRNDUP if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then AC_LIBOBJ([strndup]) fi gl_STRING_MODULE_INDICATOR([strndup]) gl_FUNC_STRNLEN if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then AC_LIBOBJ([strnlen]) gl_PREREQ_STRNLEN fi gl_STRING_MODULE_INDICATOR([strnlen]) gl_FUNC_STRSEP if test $HAVE_STRSEP = 0; then AC_LIBOBJ([strsep]) gl_PREREQ_STRSEP fi gl_STRING_MODULE_INDICATOR([strsep]) gl_SYS_IOCTL_H AC_PROG_MKDIR_P gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_SYS_TYPES_H AC_PROG_MKDIR_P gl_HEADER_TIME_H gl_UNISTD_H gl_UNISTD_SAFER gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h]) gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h]) gl_LIBUNISTRING_MODULE([0.9.4], [uniwidth/width]) gl_FUNC_VASNPRINTF gl_FUNC_VFPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([vfprintf-posix]) AC_SUBST([WARN_CFLAGS]) gl_WCHAR_H gl_FUNC_WCRTOMB if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then AC_LIBOBJ([wcrtomb]) gl_PREREQ_WCRTOMB fi gl_WCHAR_MODULE_INDICATOR([wcrtomb]) gl_WCTYPE_H gl_FUNC_WCWIDTH if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) fi gl_WCHAR_MODULE_INDICATOR([wcwidth]) gl_XALLOC gl_XGETCWD gl_XSIZE gl_XSTRNDUP # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib-tests' changequote(,)dnl gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS changequote([, ])dnl AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_FR gt_LOCALE_TR_UTF8 gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) gl_MODULE_INDICATOR([fd-safer-flag]) gl_FUNC_FDOPEN if test $REPLACE_FDOPEN = 1; then AC_LIBOBJ([fdopen]) gl_PREREQ_FDOPEN fi gl_STDIO_MODULE_INDICATOR([fdopen]) AC_CHECK_FUNCS_ONCE([getrlimit setrlimit]) gl_FUNC_UNGETC_WORKS gl_FUNC_UNGETC_WORKS gl_FUNC_UNGETC_WORKS gl_FUNC_UNGETC_WORKS AC_REQUIRE([AC_C_INLINE]) AC_CHECK_FUNCS_ONCE([setrlimit]) gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) gl_FUNC_GETPAGESIZE if test $REPLACE_GETPAGESIZE = 1; then AC_LIBOBJ([getpagesize]) fi gl_UNISTD_MODULE_INDICATOR([getpagesize]) gl_INTTYPES_H gl_INTTYPES_INCOMPLETE gl_DOUBLE_EXPONENT_LOCATION gl_FLOAT_EXPONENT_LOCATION gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) gl_LOCALE_H AC_CHECK_FUNCS_ONCE([newlocale]) gl_LOCALENAME AC_CHECK_FUNCS_ONCE([newlocale]) gl_LOCK gl_MALLOCA gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN gt_LOCALE_TR_UTF8 gt_LOCALE_FR_UTF8 gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 AC_CHECK_FUNCS_ONCE([getrlimit setrlimit]) gl_FUNC_PUTENV if test $REPLACE_PUTENV = 1; then AC_LIBOBJ([putenv]) fi gl_STDLIB_MODULE_INDICATOR([putenv]) gl_FUNC_SETENV if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then AC_LIBOBJ([setenv]) fi gl_STDLIB_MODULE_INDICATOR([setenv]) gl_FUNC_SETLOCALE if test $REPLACE_SETLOCALE = 1; then AC_LIBOBJ([setlocale]) gl_PREREQ_SETLOCALE fi gl_LOCALE_MODULE_INDICATOR([setlocale]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION]) gl_FUNC_SNPRINTF gl_STDIO_MODULE_INDICATOR([snprintf]) gl_MODULE_INDICATOR([snprintf]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) gt_TYPE_WCHAR_T gt_TYPE_WINT_T AC_CHECK_DECLS_ONCE([alarm]) dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) gl_FUNC_SYMLINK if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then AC_LIBOBJ([symlink]) fi gl_UNISTD_MODULE_INDICATOR([symlink]) gl_THREAD gl_THREADLIB gl_FUNC_UNSETENV if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then AC_LIBOBJ([unsetenv]) gl_PREREQ_UNSETENV fi gl_STDLIB_MODULE_INDICATOR([unsetenv]) abs_aux_dir=`cd "$ac_aux_dir"; pwd` AC_SUBST([abs_aux_dir]) abs_aux_dir=`cd "$ac_aux_dir"; pwd` AC_SUBST([abs_aux_dir]) gl_FUNC_MMAP_ANON AC_CHECK_FUNCS_ONCE([mquery]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN gl_FUNC_WCTOB if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then AC_LIBOBJ([wctob]) gl_PREREQ_WCTOB fi gl_WCHAR_MODULE_INDICATOR([wctob]) gl_FUNC_WCTOMB if test $REPLACE_WCTOMB = 1; then AC_LIBOBJ([wctomb]) gl_PREREQ_WCTOMB fi gl_STDLIB_MODULE_INDICATOR([wctomb]) gl_YIELD m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) LIBGNU_LIBDEPS="$gl_libdeps" AC_SUBST([LIBGNU_LIBDEPS]) LIBGNU_LTLIBDEPS="$gl_ltlibdeps" AC_SUBST([LIBGNU_LTLIBDEPS]) LIBTESTS_LIBDEPS="$gltests_libdeps" AC_SUBST([LIBTESTS_LIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [lib]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [gnulib-tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/announce-gen build-aux/config.rpath build-aux/do-release-commit-and-tag build-aux/gendocs.sh build-aux/git-version-gen build-aux/gitlog-to-changelog build-aux/gnu-web-doc-update build-aux/gnupload build-aux/snippet/_Noreturn.h build-aux/snippet/arg-nonnull.h build-aux/snippet/c++defs.h build-aux/snippet/warn-on-use.h build-aux/update-copyright build-aux/useless-if-before-free build-aux/vc-list-files doc/gendocs_template lib/alloca.c lib/alloca.in.h lib/anytostr.c lib/argv-iter.c lib/argv-iter.h lib/asnprintf.c lib/at-func.c lib/basename-lgpl.c lib/basename.c lib/bitrotate.h lib/btowc.c lib/c-ctype.c lib/c-ctype.h lib/c-strcase.h lib/c-strcasecmp.c lib/c-strcaseeq.h lib/c-strncasecmp.c lib/calloc.c lib/chdir-long.c lib/chdir-long.h lib/cloexec.c lib/cloexec.h lib/close-stream.c lib/close-stream.h lib/close.c lib/closedir.c lib/closeout.c lib/closeout.h lib/config.charset lib/dirent-private.h lib/dirent.in.h lib/dirfd.c lib/dirname-lgpl.c lib/dirname.c lib/dirname.h lib/dosname.h lib/dup-safer.c lib/dup.c lib/dup2.c lib/errno.in.h lib/error.c lib/error.h lib/exclude.c lib/exclude.h lib/exitfail.c lib/exitfail.h lib/fchdir.c lib/fcntl.c lib/fcntl.in.h lib/fd-hook.c lib/fd-hook.h lib/fd-safer.c lib/fdopendir.c lib/fflush.c lib/filename.h lib/filenamecat-lgpl.c lib/filenamecat.h lib/float+.h lib/float.c lib/float.in.h lib/fnmatch.c lib/fnmatch.in.h lib/fnmatch_loop.c lib/fopen.c lib/fpending.c lib/fpending.h lib/fprintf.c lib/fpucw.h lib/fpurge.c lib/freading.c lib/freading.h lib/freopen.c lib/frexp.c lib/frexpl.c lib/fseek.c lib/fseeko.c lib/fseterr.c lib/fseterr.h lib/fstat.c lib/fstatat.c lib/ftell.c lib/ftello.c lib/getcwd-lgpl.c lib/getcwd.c lib/getdelim.c lib/getdtablesize.c lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/gettext.h lib/hash.c lib/hash.h lib/ignore-value.h lib/imaxtostr.c lib/intprops.h lib/inttostr.c lib/inttostr.h lib/isnan.c lib/isnand-nolibm.h lib/isnand.c lib/isnanf-nolibm.h lib/isnanf.c lib/isnanl-nolibm.h lib/isnanl.c lib/iswblank.c lib/itold.c lib/langinfo.in.h lib/localcharset.c lib/localcharset.h lib/lseek.c lib/lstat.c lib/malloc.c lib/math.in.h lib/mbchar.c lib/mbchar.h lib/mbrtowc.c lib/mbscasecmp.c lib/mbsinit.c lib/mbsrtowcs-impl.h lib/mbsrtowcs-state.c lib/mbsrtowcs.c lib/mbtowc-impl.h lib/mbtowc.c lib/mbuiter.h lib/memchr.c lib/memchr.valgrind lib/mempcpy.c lib/memrchr.c lib/msvc-inval.c lib/msvc-inval.h lib/msvc-nothrow.c lib/msvc-nothrow.h lib/nl_langinfo.c lib/obstack.c lib/obstack.h lib/offtostr.c lib/open.c lib/openat-die.c lib/openat-priv.h lib/openat-proc.c lib/openat.c lib/openat.h lib/opendir.c lib/pathmax.h lib/pipe-safer.c lib/printf-args.c lib/printf-args.h lib/printf-frexp.c lib/printf-frexp.h lib/printf-frexpl.c lib/printf-frexpl.h lib/printf-parse.c lib/printf-parse.h lib/printf.c lib/progname.c lib/progname.h lib/quote.c lib/quote.h lib/quotearg.c lib/quotearg.h lib/readdir.c lib/realloc.c lib/ref-add.sin lib/ref-del.sin lib/regcomp.c lib/regex.c lib/regex.h lib/regex_internal.c lib/regex_internal.h lib/regexec.c lib/rewinddir.c lib/save-cwd.c lib/save-cwd.h lib/signbitd.c lib/signbitf.c lib/signbitl.c lib/size_max.h lib/sprintf.c lib/stat-macros.h lib/stat.c lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio-impl.h lib/stdio.in.h lib/stdlib.in.h lib/str-two-way.h lib/strcasecmp.c lib/strcasestr.c lib/strdup.c lib/streq.h lib/strerror-override.c lib/strerror-override.h lib/strerror.c lib/string.in.h lib/strings.in.h lib/stripslash.c lib/strncasecmp.c lib/strndup.c lib/strnlen.c lib/strnlen1.c lib/strnlen1.h lib/strsep.c lib/sys_ioctl.in.h lib/sys_stat.in.h lib/sys_types.in.h lib/time.in.h lib/uinttostr.c lib/umaxtostr.c lib/unistd--.h lib/unistd-safer.h lib/unistd.in.h lib/unitypes.in.h lib/uniwidth.in.h lib/uniwidth/cjk.h lib/uniwidth/width.c lib/vasnprintf.c lib/vasnprintf.h lib/verify.h lib/vfprintf.c lib/wchar.in.h lib/wcrtomb.c lib/wctype.in.h lib/wcwidth.c lib/xalloc-die.c lib/xalloc-oversized.h lib/xalloc.h lib/xgetcwd.c lib/xgetcwd.h lib/xmalloc.c lib/xsize.h lib/xstrndup.c lib/xstrndup.h m4/00gnulib.m4 m4/alloca.m4 m4/asm-underscore.m4 m4/autobuild.m4 m4/btowc.m4 m4/calloc.m4 m4/chdir-long.m4 m4/close-stream.m4 m4/close.m4 m4/closedir.m4 m4/closeout.m4 m4/codeset.m4 m4/configmake.m4 m4/d-ino.m4 m4/dirent_h.m4 m4/dirfd.m4 m4/dirname.m4 m4/double-slash-root.m4 m4/dup.m4 m4/dup2.m4 m4/eealloc.m4 m4/environ.m4 m4/errno_h.m4 m4/error.m4 m4/exponentd.m4 m4/exponentf.m4 m4/exponentl.m4 m4/extensions.m4 m4/fchdir.m4 m4/fcntl-o.m4 m4/fcntl.m4 m4/fcntl_h.m4 m4/fdopen.m4 m4/fdopendir.m4 m4/fflush.m4 m4/filenamecat.m4 m4/float_h.m4 m4/fnmatch.m4 m4/fopen.m4 m4/fpending.m4 m4/fpieee.m4 m4/fprintf-posix.m4 m4/fpurge.m4 m4/freading.m4 m4/freopen.m4 m4/frexp.m4 m4/frexpl.m4 m4/fseek.m4 m4/fseeko.m4 m4/fstat.m4 m4/fstatat.m4 m4/ftell.m4 m4/ftello.m4 m4/getcwd-abort-bug.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getdelim.m4 m4/getdtablesize.m4 m4/getopt.m4 m4/getpagesize.m4 m4/glibc21.m4 m4/gnu-make.m4 m4/gnulib-common.m4 m4/include_next.m4 m4/inline.m4 m4/intlmacosx.m4 m4/intmax_t.m4 m4/inttostr.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isnand.m4 m4/isnanf.m4 m4/isnanl.m4 m4/iswblank.m4 m4/langinfo_h.m4 m4/largefile.m4 m4/lcmessage.m4 m4/ldexpl.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/libunistring-base.m4 m4/localcharset.m4 m4/locale-fr.m4 m4/locale-ja.m4 m4/locale-tr.m4 m4/locale-zh.m4 m4/locale_h.m4 m4/localename.m4 m4/lock.m4 m4/longlong.m4 m4/lseek.m4 m4/lstat.m4 m4/malloc.m4 m4/malloca.m4 m4/manywarnings.m4 m4/math_h.m4 m4/mbchar.m4 m4/mbiter.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbsrtowcs.m4 m4/mbstate_t.m4 m4/mbtowc.m4 m4/memchr.m4 m4/mempcpy.m4 m4/memrchr.m4 m4/mmap-anon.m4 m4/mode_t.m4 m4/msvc-inval.m4 m4/msvc-nothrow.m4 m4/multiarch.m4 m4/nl_langinfo.m4 m4/nocrash.m4 m4/open.m4 m4/openat.m4 m4/opendir.m4 m4/pathmax.m4 m4/perl.m4 m4/posix-shell.m4 m4/printf-frexp.m4 m4/printf-frexpl.m4 m4/printf-posix-rpl.m4 m4/printf.m4 m4/putenv.m4 m4/quote.m4 m4/quotearg.m4 m4/readdir.m4 m4/realloc.m4 m4/regex.m4 m4/rewinddir.m4 m4/save-cwd.m4 m4/setenv.m4 m4/setlocale.m4 m4/signbit.m4 m4/size_max.m4 m4/snprintf.m4 m4/sprintf-posix.m4 m4/ssize_t.m4 m4/stat.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdint_h.m4 m4/stdio_h.m4 m4/stdlib_h.m4 m4/strcase.m4 m4/strcasestr.m4 m4/strdup.m4 m4/strerror.m4 m4/string_h.m4 m4/strings_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/strsep.m4 m4/symlink.m4 m4/sys_ioctl_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 m4/sys_types_h.m4 m4/thread.m4 m4/threadlib.m4 m4/time_h.m4 m4/ungetc.m4 m4/unistd-safer.m4 m4/unistd_h.m4 m4/vasnprintf.m4 m4/vfprintf-posix.m4 m4/warn-on-use.m4 m4/warnings.m4 m4/wchar_h.m4 m4/wchar_t.m4 m4/wcrtomb.m4 m4/wctob.m4 m4/wctomb.m4 m4/wctype_h.m4 m4/wcwidth.m4 m4/wint_t.m4 m4/xalloc.m4 m4/xgetcwd.m4 m4/xsize.m4 m4/xstrndup.m4 m4/yield.m4 tests/infinity.h tests/init.sh tests/macros.h tests/minus-zero.h tests/nan.h tests/signature.h tests/test-alloca-opt.c tests/test-argmatch.c tests/test-argv-iter.c tests/test-binary-io.c tests/test-binary-io.sh tests/test-bitrotate.c tests/test-btowc.c tests/test-btowc1.sh tests/test-btowc2.sh tests/test-c-ctype.c tests/test-c-strcase.sh tests/test-c-strcasecmp.c tests/test-c-strncasecmp.c tests/test-calloc-gnu.c tests/test-chdir.c tests/test-cloexec.c tests/test-close.c tests/test-dirent.c tests/test-dirname.c tests/test-dup-safer.c tests/test-dup.c tests/test-dup2.c tests/test-environ.c tests/test-errno.c tests/test-exclude.c tests/test-exclude1.sh tests/test-exclude2.sh tests/test-exclude3.sh tests/test-exclude4.sh tests/test-exclude5.sh tests/test-exclude6.sh tests/test-exclude7.sh tests/test-exclude8.sh tests/test-fchdir.c tests/test-fcntl-h.c tests/test-fcntl.c tests/test-fdopen.c tests/test-fdopendir.c tests/test-fflush.c tests/test-fflush2.c tests/test-fflush2.sh tests/test-fgetc.c tests/test-float.c tests/test-fnmatch.c tests/test-fopen.c tests/test-fopen.h tests/test-fpending.c tests/test-fpending.sh tests/test-fprintf-posix.c tests/test-fprintf-posix.h tests/test-fprintf-posix.sh tests/test-fprintf-posix2.c tests/test-fprintf-posix2.sh tests/test-fprintf-posix3.c tests/test-fprintf-posix3.sh tests/test-fpurge.c tests/test-fputc.c tests/test-fread.c tests/test-freading.c tests/test-freopen.c tests/test-frexp.c tests/test-frexpl.c tests/test-fseek.c tests/test-fseek.sh tests/test-fseek2.sh tests/test-fseeko.c tests/test-fseeko.sh tests/test-fseeko2.sh tests/test-fseeko3.c tests/test-fseeko3.sh tests/test-fseeko4.c tests/test-fseeko4.sh tests/test-fseterr.c tests/test-fstat.c tests/test-fstatat.c tests/test-ftell.c tests/test-ftell.sh tests/test-ftell2.sh tests/test-ftell3.c tests/test-ftello.c tests/test-ftello.sh tests/test-ftello2.sh tests/test-ftello3.c tests/test-ftello4.c tests/test-ftello4.sh tests/test-fwrite.c tests/test-getcwd-lgpl.c tests/test-getcwd.c tests/test-getcwd.sh tests/test-getdelim.c tests/test-getdtablesize.c tests/test-getopt.c tests/test-getopt.h tests/test-getopt_long.h tests/test-hash.c tests/test-ignore-value.c tests/test-init.sh tests/test-intprops.c tests/test-inttostr.c tests/test-inttypes.c tests/test-isnand-nolibm.c tests/test-isnand.h tests/test-isnanf-nolibm.c tests/test-isnanf.h tests/test-isnanl-nolibm.c tests/test-isnanl.h tests/test-iswblank.c tests/test-langinfo.c tests/test-locale.c tests/test-localename.c tests/test-lock.c tests/test-lseek.c tests/test-lseek.sh tests/test-lstat.c tests/test-lstat.h tests/test-malloc-gnu.c tests/test-malloca.c tests/test-math.c tests/test-mbrtowc-w32-1.sh tests/test-mbrtowc-w32-2.sh tests/test-mbrtowc-w32-3.sh tests/test-mbrtowc-w32-4.sh tests/test-mbrtowc-w32-5.sh tests/test-mbrtowc-w32.c tests/test-mbrtowc.c tests/test-mbrtowc1.sh tests/test-mbrtowc2.sh tests/test-mbrtowc3.sh tests/test-mbrtowc4.sh tests/test-mbscasecmp.c tests/test-mbscasecmp.sh tests/test-mbsinit.c tests/test-mbsinit.sh tests/test-mbsrtowcs.c tests/test-mbsrtowcs1.sh tests/test-mbsrtowcs2.sh tests/test-mbsrtowcs3.sh tests/test-mbsrtowcs4.sh tests/test-memchr.c tests/test-memrchr.c tests/test-nl_langinfo.c tests/test-nl_langinfo.sh tests/test-open.c tests/test-open.h tests/test-openat.c tests/test-pathmax.c tests/test-printf-frexp.c tests/test-printf-frexpl.c tests/test-printf-posix.c tests/test-printf-posix.h tests/test-printf-posix.output tests/test-printf-posix.sh tests/test-printf-posix2.c tests/test-printf-posix2.sh tests/test-quotearg-simple.c tests/test-quotearg.h tests/test-realloc-gnu.c tests/test-setenv.c tests/test-setlocale1.c tests/test-setlocale1.sh tests/test-setlocale2.c tests/test-setlocale2.sh tests/test-signbit.c tests/test-snprintf.c tests/test-sprintf-posix.c tests/test-sprintf-posix.h tests/test-stat.c tests/test-stat.h tests/test-stdbool.c tests/test-stddef.c tests/test-stdint.c tests/test-stdio.c tests/test-stdlib.c tests/test-strcasestr.c tests/test-strerror.c tests/test-string.c tests/test-strings.c tests/test-strnlen.c tests/test-symlink.c tests/test-symlink.h tests/test-sys_ioctl.c tests/test-sys_stat.c tests/test-sys_types.c tests/test-sys_wait.h tests/test-thread_create.c tests/test-thread_self.c tests/test-time.c tests/test-unistd.c tests/test-unsetenv.c tests/test-update-copyright.sh tests/test-vasnprintf.c tests/test-vc-list-files-cvs.sh tests/test-vc-list-files-git.sh tests/test-verify.c tests/test-verify.sh tests/test-vfprintf-posix.c tests/test-vfprintf-posix.sh tests/test-wchar.c tests/test-wcrtomb-w32-1.sh tests/test-wcrtomb-w32-2.sh tests/test-wcrtomb-w32-3.sh tests/test-wcrtomb-w32-4.sh tests/test-wcrtomb-w32-5.sh tests/test-wcrtomb-w32.c tests/test-wcrtomb.c tests/test-wcrtomb.sh tests/test-wctype-h.c tests/test-wcwidth.c tests/test-xalloc-die.c tests/test-xalloc-die.sh tests/uniwidth/test-uc_width.c tests/uniwidth/test-uc_width2.c tests/uniwidth/test-uc_width2.sh tests/zerosize-ptr.h tests=lib/argmatch.c tests=lib/argmatch.h tests=lib/binary-io.h tests=lib/dup-safer-flag.c tests=lib/fd-safer-flag.c tests=lib/fdopen.c tests=lib/get-rusage-as.c tests=lib/getpagesize.c tests=lib/glthread/lock.c tests=lib/glthread/lock.h tests=lib/glthread/thread.c tests=lib/glthread/thread.h tests=lib/glthread/threadlib.c tests=lib/glthread/yield.h tests=lib/hash-pjw.c tests=lib/hash-pjw.h tests=lib/inttypes.in.h tests=lib/locale.in.h tests=lib/localename.c tests=lib/localename.h tests=lib/malloca.c tests=lib/malloca.h tests=lib/malloca.valgrind tests=lib/putenv.c tests=lib/resource-ext.h tests=lib/same-inode.h tests=lib/setenv.c tests=lib/setlocale.c tests=lib/snprintf.c tests=lib/symlink.c tests=lib/unsetenv.c tests=lib/vma-iter.c tests=lib/vma-iter.h tests=lib/wctob.c tests=lib/wctomb-impl.h tests=lib/wctomb.c top/GNUmakefile top/README-release top/maint.mk ]) id-utils-4.6+git20120811/m4/close.m40000664000000000000000000000214612166360012013272 0ustar # close.m4 serial 8 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_CLOSE=1 fi m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ gl_PREREQ_SYS_H_WINSOCK2 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then dnl Even if the 'socket' module is not used here, another part of the dnl application may use it and pass file descriptors that refer to dnl sockets to the close() function. So enable the support for sockets. REPLACE_CLOSE=1 fi ]) dnl Replace close() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ if test $REPLACE_CLOSE = 0; then gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then REPLACE_CLOSE=1 fi fi ]) ]) id-utils-4.6+git20120811/m4/getpagesize.m40000664000000000000000000000172212166360012014473 0ustar # getpagesize.m4 serial 9 dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_GETPAGESIZE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS([getpagesize]) if test $ac_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 AC_CHECK_HEADERS([OS.h]) if test $ac_cv_header_OS_h = yes; then HAVE_OS_H=1 fi AC_CHECK_HEADERS([sys/param.h]) if test $ac_cv_header_sys_param_h = yes; then HAVE_SYS_PARAM_H=1 fi fi case "$host_os" in mingw*) REPLACE_GETPAGESIZE=1 ;; esac dnl Also check whether it's declared. dnl mingw has getpagesize() in libgcc.a but doesn't declare it. AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) ]) id-utils-4.6+git20120811/m4/perl.m40000664000000000000000000000256712166360012013136 0ustar # serial 9 dnl From Jim Meyering. dnl Find a new-enough version of Perl. # Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2012 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PERL], [ dnl FIXME: don't hard-code 5.005 AC_MSG_CHECKING([for perl5.005 or newer]) if test "${PERL+set}" = set; then # 'PERL' is set in the user's environment. candidate_perl_names="$PERL" perl_specified=yes else candidate_perl_names='perl perl5' perl_specified=no fi found=no AC_SUBST([PERL]) PERL="$am_missing_run perl" for perl in $candidate_perl_names; do # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. if ( $perl -e 'require 5.005; use File::Compare' ) > /dev/null 2>&1; then PERL=$perl found=yes break fi done AC_MSG_RESULT([$found]) test $found = no && AC_MSG_WARN([ WARNING: You don't seem to have perl5.005 or newer installed, or you lack a usable version of the Perl File::Compare module. As a result, you may be unable to run a few tests or to regenerate certain files if you modify the sources from which they are derived. ] ) ]) id-utils-4.6+git20120811/m4/getcwd.m40000664000000000000000000001132312166360012013437 0ustar # getcwd.m4 - check for working getcwd that is compatible with glibc # Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. # serial 11 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], [gl_cv_func_getcwd_null], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ # if HAVE_UNISTD_H # include # else /* on Windows with MSVC */ # include # endif # ifndef getcwd char *getcwd (); # endif ]], [[ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else if (chdir ("/") != 0) return 1; else { char *f = getcwd (NULL, 0); if (! f) return 2; if (f[0] != '/') return 3; if (f[1] != '\0') return 4; return 0; } #endif ]])], [gl_cv_func_getcwd_null=yes], [gl_cv_func_getcwd_null=no], [[ case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_getcwd_null="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_getcwd_null="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_getcwd_null="guessing no";; esac ]])]) ]) AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE], [ AC_CACHE_CHECK([for getcwd with POSIX signature], [gl_cv_func_getcwd_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[extern #ifdef __cplusplus "C" #endif char *getcwd (char *, size_t); ]]) ], [gl_cv_func_getcwd_posix_signature=yes], [gl_cv_func_getcwd_posix_signature=no]) ]) ]) dnl Guarantee that getcwd will malloc with a NULL first argument. Assumes dnl that either the system getcwd is robust, or that calling code is okay dnl with spurious failures when run from a directory with an absolute name dnl larger than 4k bytes. dnl dnl Assumes that getcwd exists; if you are worried about obsolete dnl platforms that lacked getcwd(), then you need to use the GPL module. AC_DEFUN([gl_FUNC_GETCWD_LGPL], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_GETCWD_NULL]) AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in *yes,yes) ;; *) dnl Minimal replacement lib/getcwd-lgpl.c. REPLACE_GETCWD=1 ;; esac ]) dnl Check for all known getcwd bugs; useful for a program likely to be dnl executed from an arbitrary location. AC_DEFUN([gl_FUNC_GETCWD], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_GETCWD_NULL]) AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles gl_abort_bug=no case "$host_os" in mingw*) gl_cv_func_getcwd_path_max=yes ;; *) gl_FUNC_GETCWD_PATH_MAX case "$gl_cv_func_getcwd_null" in *yes) gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]) ;; esac ;; esac dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD dnl if appropriate. case "$gl_cv_func_getcwd_path_max" in "no, it has the AIX bug") ;; *) AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1], [Define to 1 if getcwd minimally works, that is, its result can be trusted when it succeeds.]) ;; esac case "$gl_cv_func_getcwd_path_max" in "no, but it is partly working") AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1], [Define to 1 if getcwd works, except it sometimes fails when it shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]) ;; esac if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ || test $gl_cv_func_getcwd_posix_signature != yes \ || test "$gl_cv_func_getcwd_path_max" != yes \ || test $gl_abort_bug = yes; then REPLACE_GETCWD=1 fi ]) # Prerequisites of lib/getcwd.c, when full replacement is in effect. AC_DEFUN([gl_PREREQ_GETCWD], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) : ]) id-utils-4.6+git20120811/m4/eealloc.m40000664000000000000000000000172312166360012013571 0ustar # eealloc.m4 serial 2 dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EEALLOC], [ AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([gl_EEREALLOC]) AC_REQUIRE([AC_C_INLINE]) ]) AC_DEFUN([gl_EEMALLOC], [ _AC_FUNC_MALLOC_IF( [gl_cv_func_malloc_0_nonnull=1], [gl_cv_func_malloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], [If malloc(0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) AC_DEFUN([gl_EEREALLOC], [ _AC_FUNC_REALLOC_IF( [gl_cv_func_realloc_0_nonnull=1], [gl_cv_func_realloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) id-utils-4.6+git20120811/m4/lib-link.m40000664000000000000000000010044312166360012013665 0ustar # lib-link.m4 serial 26 (gettext-0.18.2) dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. dnl Otherwise, add it to the front of LIBS, because it may be a static dnl library that depends on another static library that is present in LIBS. dnl Static libraries benefit only from the static libraries listed after dnl it. case " $LIB[]NAME" in *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; *) LIBS="$LIB[]NAME $LIBS" ;; esac AC_LINK_IFELSE( [AC_LANG_PROGRAM([[$3]], [[$4]])], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_libname_spec, dnl acl_library_names_spec, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) id-utils-4.6+git20120811/m4/ftell.m40000664000000000000000000000100512166360012013264 0ustar # ftell.m4 serial 3 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FTELL], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FTELLO]) dnl When ftello needs fixes, ftell needs them too. if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then REPLACE_FTELL=1 fi ]) id-utils-4.6+git20120811/m4/setenv.m40000664000000000000000000000765412166360012013502 0ustar # setenv.m4 serial 25 dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SETENV], [ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else AC_CACHE_CHECK([whether setenv validates arguments], [gl_cv_func_setenv_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include ]], [[ int result = 0; { if (setenv ("", "", 0) != -1) result |= 1; else if (errno != EINVAL) result |= 2; } { if (setenv ("a", "=", 1) != 0) result |= 4; else if (strcmp (getenv ("a"), "=") != 0) result |= 8; } return result; ]])], [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], [gl_cv_func_setenv_works="guessing no"])]) if test "$gl_cv_func_setenv_works" != yes; then REPLACE_SETENV=1 fi fi ]) # Like gl_FUNC_SETENV, except prepare for separate compilation # (no REPLACE_SETENV, no AC_LIBOBJ). AC_DEFUN([gl_FUNC_SETENV_SEPARATE], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([setenv]) if test $ac_cv_have_decl_setenv = no; then HAVE_DECL_SETENV=0 fi AC_CHECK_FUNCS_ONCE([setenv]) gl_PREREQ_SETENV ]) AC_DEFUN([gl_FUNC_UNSETENV], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([unsetenv]) if test $ac_cv_have_decl_unsetenv = no; then HAVE_DECL_UNSETENV=0 fi AC_CHECK_FUNCS([unsetenv]) if test $ac_cv_func_unsetenv = no; then HAVE_UNSETENV=0 else HAVE_UNSETENV=1 dnl Some BSDs return void, failing to do error checking. AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #undef _BSD #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ #include extern #ifdef __cplusplus "C" #endif int unsetenv (const char *name); ]], [[]])], [gt_cv_func_unsetenv_ret='int'], [gt_cv_func_unsetenv_ret='void'])]) if test $gt_cv_func_unsetenv_ret = 'void'; then AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void instead of int.]) REPLACE_UNSETENV=1 fi dnl Solaris 10 unsetenv does not remove all copies of a name. dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. dnl OpenBSD 4.7 unsetenv("") does not fail. AC_CACHE_CHECK([whether unsetenv obeys POSIX], [gl_cv_func_unsetenv_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include extern char **environ; ]], [[ char entry1[] = "a=1"; char entry2[] = "b=2"; char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; if (putenv (entry2)) return 2; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; if (!unsetenv ("") || errno != EINVAL) return 4; entry2[0] = 'b'; environ = env; if (!getenv ("a")) return 5; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 6; ]])], [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], [gl_cv_func_unsetenv_works="guessing no"])]) if test "$gl_cv_func_unsetenv_works" != yes; then REPLACE_UNSETENV=1 fi fi ]) # Prerequisites of lib/setenv.c. AC_DEFUN([gl_PREREQ_SETENV], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([gl_ENVIRON]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS([search.h]) AC_CHECK_FUNCS([tsearch]) ]) # Prerequisites of lib/unsetenv.c. AC_DEFUN([gl_PREREQ_UNSETENV], [ AC_REQUIRE([gl_ENVIRON]) AC_CHECK_HEADERS_ONCE([unistd.h]) ]) id-utils-4.6+git20120811/m4/freading.m40000664000000000000000000000054112166360012013741 0ustar # freading.m4 serial 1 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREADING], [ AC_CHECK_FUNCS_ONCE([__freading]) ]) id-utils-4.6+git20120811/m4/memrchr.m40000664000000000000000000000125312166360012013620 0ustar # memrchr.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMRCHR], [ dnl Persuade glibc to declare memrchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([memrchr]) if test $ac_cv_have_decl_memrchr = no; then HAVE_DECL_MEMRCHR=0 fi AC_CHECK_FUNCS([memrchr]) ]) # Prerequisites of lib/memrchr.c. AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) id-utils-4.6+git20120811/m4/open.m40000664000000000000000000000510212166360012013121 0ustar # open.m4 serial 13 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 ;; *) dnl open("foo/") should not create a file when the file name has a dnl trailing slash. FreeBSD only has the problem on symlinks. AC_CHECK_FUNCS_ONCE([lstat]) AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [# Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then touch conftest.tmp ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if HAVE_UNISTD_H # include #endif int main () { int result = 0; #if HAVE_LSTAT if (open ("conftest.lnk/", O_RDONLY) != -1) result |= 1; #endif if (open ("conftest.sl/", O_CREAT, 0600) >= 0) result |= 2; return result; }]])], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no], [ changequote(,)dnl case "$host_os" in freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl conftest.tmp conftest.lnk ]) case "$gl_cv_func_open_slash" in *no) AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if open() fails to recognize a trailing slash.]) REPLACE_OPEN=1 ;; esac ;; esac dnl Replace open() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ if test $REPLACE_OPEN = 0; then gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then REPLACE_OPEN=1 fi fi ]) dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag. m4_ifdef([gl_NONBLOCKING_IO], [ if test $REPLACE_OPEN = 0; then gl_NONBLOCKING_IO if test $gl_cv_have_open_O_NONBLOCK != yes; then REPLACE_OPEN=1 fi fi ]) ]) # Prerequisites of lib/open.c. AC_DEFUN([gl_PREREQ_OPEN], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) : ]) id-utils-4.6+git20120811/m4/intmax_t.m40000664000000000000000000000416612166360012014014 0ustar # intmax_t.m4 serial 8 dnl Copyright (C) 1997-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. AC_PREREQ([2.53]) # Define intmax_t to 'long' or 'long long' # if it is not already defined in or . AC_DEFUN([gl_AC_TYPE_INTMAX_T], [ dnl For simplicity, we assume that a header file defines 'intmax_t' if and dnl only if it defines 'uintmax_t'. AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) else AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) fi ]) dnl An alternative would be to explicitly test for 'intmax_t'. AC_DEFUN([gt_AC_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ]], [[intmax_t x = -1; return !x;]])], [gt_cv_c_intmax_t=yes], [gt_cv_c_intmax_t=no])]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) else AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) fi ]) id-utils-4.6+git20120811/m4/nl_langinfo.m40000664000000000000000000000352412166360012014454 0ustar # nl_langinfo.m4 serial 5 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_NL_LANGINFO], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) AC_REQUIRE([gl_LANGINFO_H]) AC_CHECK_FUNCS_ONCE([nl_langinfo]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles if test $ac_cv_func_nl_langinfo = yes; then # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. AC_CACHE_CHECK([whether YESEXPR works], [gl_cv_func_nl_langinfo_yesexpr_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[return !*nl_langinfo(YESEXPR); ]])], [gl_cv_func_nl_langinfo_yesexpr_works=yes], [gl_cv_func_nl_langinfo_yesexpr_works=no], [ case "$host_os" in # Guess no on irix systems. irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; # Guess yes elsewhere. *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; esac ]) ]) case $gl_cv_func_nl_langinfo_yesexpr_works in *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; esac AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], [$FUNC_NL_LANGINFO_YESEXPR_WORKS], [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 AC_DEFINE([REPLACE_NL_LANGINFO], [1], [Define if nl_langinfo exists but is overridden by gnulib.]) fi else HAVE_NL_LANGINFO=0 fi ]) id-utils-4.6+git20120811/m4/wchar_t.m40000664000000000000000000000146212166360012013614 0ustar # wchar_t.m4 serial 4 (gettext-0.18.2) dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include wchar_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) id-utils-4.6+git20120811/m4/dup2.m40000664000000000000000000000511512166360012013036 0ustar #serial 17 dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_DUP2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ AC_CHECK_FUNCS_ONCE([dup2]) if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 fi ], [ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) ]) if test $HAVE_DUP2 = 1; then AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include #include ]], [int result = 0; #ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; #endif if (dup2 (1, 1) == 0) result |= 2; #ifdef FD_CLOEXEC if (fcntl (1, F_GETFD) != FD_CLOEXEC) result |= 4; #endif close (0); if (dup2 (0, 0) != -1) result |= 8; /* Many gnulib modules require POSIX conformance of EBADF. */ if (dup2 (2, 1000000) == -1 && errno != EBADF) result |= 16; return result; ]) ], [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], [case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works=no;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works=no;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. gl_cv_func_dup2_works=no;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. gl_cv_func_dup2_works=no;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. gl_cv_func_dup2_works=no;; *) gl_cv_func_dup2_works=yes;; esac]) ]) if test "$gl_cv_func_dup2_works" = no; then REPLACE_DUP2=1 fi fi dnl Replace dup2() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then if test $HAVE_DUP2 = 1; then REPLACE_DUP2=1 fi fi ]) ]) # Prerequisites of lib/dup2.c. AC_DEFUN([gl_PREREQ_DUP2], []) id-utils-4.6+git20120811/m4/lock.m40000664000000000000000000000240412166360012013112 0ustar # lock.m4 serial 11 (gettext-0.18.2) dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_THREADLIB]) if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. AC_CHECK_TYPE([pthread_rwlock_t], [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[#include ]], [[ #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif ]])], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) fi gl_PREREQ_LOCK ]) # Prerequisites of lib/lock.c. AC_DEFUN([gl_PREREQ_LOCK], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/sprintf-posix.m40000664000000000000000000001023312166360012015006 0ustar # sprintf-posix.m4 serial 12 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_sprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # sprintf exists and is # already POSIX compliant. gl_cv_func_sprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_sprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_SPRINTF fi ]) AC_DEFUN([gl_REPLACE_SPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([sprintf]) REPLACE_SPRINTF=1 gl_PREREQ_SPRINTF ]) AC_DEFUN([gl_PREREQ_SPRINTF], [:]) id-utils-4.6+git20120811/m4/fcntl.m40000664000000000000000000000600512166360012013271 0ustar # fcntl.m4 serial 5 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # For now, this module ensures that fcntl() # - supports F_DUPFD correctly # - supports or emulates F_DUPFD_CLOEXEC # - supports F_GETFD # Still to be ported to mingw: # - F_SETFD # - F_GETFL, F_SETFL # - F_GETOWN, F_SETOWN # - F_GETLK, F_SETLK, F_SETLKW AC_DEFUN([gl_FUNC_FCNTL], [ dnl Persuade glibc to expose F_DUPFD_CLOEXEC. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([fcntl]) if test $ac_cv_func_fcntl = no; then gl_REPLACE_FCNTL else dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target dnl haiku alpha 2 F_DUPFD has wrong errno AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly], [gl_cv_func_fcntl_f_dupfd_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[int result = 0; if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; if (errno != EINVAL) result |= 2; return result; ]])], [gl_cv_func_fcntl_f_dupfd_works=yes], [gl_cv_func_fcntl_f_dupfd_works=no], [# Guess that it works on glibc systems case $host_os in #(( *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; esac])]) case $gl_cv_func_fcntl_f_dupfd_works in *yes) ;; *) gl_REPLACE_FCNTL AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD behavior does not match POSIX]) ;; esac dnl Many systems lack F_DUPFD_CLOEXEC AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC], [gl_cv_func_fcntl_f_dupfd_cloexec], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef F_DUPFD_CLOEXEC choke me #endif ]])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef __linux__ /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace it to support the semantics on older kernels that failed with EINVAL. */ choke me #endif ]])], [gl_cv_func_fcntl_f_dupfd_cloexec=yes], [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])], [gl_cv_func_fcntl_f_dupfd_cloexec=no])]) if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then gl_REPLACE_FCNTL dnl No witness macro needed for this bug. fi fi dnl Replace fcntl() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then gl_REPLACE_FCNTL fi ]) ]) AC_DEFUN([gl_REPLACE_FCNTL], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([fcntl]) if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi ]) id-utils-4.6+git20120811/m4/setlocale.m40000664000000000000000000000154312166360012014140 0ustar # setlocale.m4 serial 4 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SETLOCALE], [ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in dnl On native Windows systems, setlocale(category,NULL) does not look at dnl the environment variables LC_ALL, category, and LANG. mingw*) REPLACE_SETLOCALE=1 ;; dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL) dnl is then still "C". cygwin*) case `uname -r` in 1.5.*) REPLACE_SETLOCALE=1 ;; esac ;; esac ]) # Prerequisites of lib/setlocale.c. AC_DEFUN([gl_PREREQ_SETLOCALE], [ : ]) id-utils-4.6+git20120811/m4/sys_ioctl_h.m40000664000000000000000000000460612166360012014507 0ustar # sys_ioctl_h.m4 serial 10 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Bruno Haible. AC_DEFUN([gl_SYS_IOCTL_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/ioctl.h]) if test $ac_cv_header_sys_ioctl_h = yes; then HAVE_SYS_IOCTL_H=1 dnl Test whether declares ioctl(), or whether some other dnl header file, such as or , is needed for that. AC_CACHE_CHECK([whether declares ioctl], [gl_cv_decl_ioctl_in_sys_ioctl_h], [dnl We cannot use AC_CHECK_DECL because it produces its own messages. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT([#include ])], [(void) ioctl;])], [gl_cv_decl_ioctl_in_sys_ioctl_h=yes], [gl_cv_decl_ioctl_in_sys_ioctl_h=no]) ]) else HAVE_SYS_IOCTL_H=0 fi AC_SUBST([HAVE_SYS_IOCTL_H]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([sys/ioctl.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some platforms declare ioctl in the wrong header. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif ]], [ioctl]) ]) AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS], [ GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL]) dnl Assume proper GNU behavior unless another module says otherwise. SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H]) SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL]) ]) id-utils-4.6+git20120811/m4/errno_h.m40000664000000000000000000000600612166360012013620 0ustar # errno_h.m4 serial 10 dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ENETRESET booboo #endif #if !defined ECONNABORTED booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) id-utils-4.6+git20120811/m4/fflush.m40000664000000000000000000000507512166360012013460 0ustar # fflush.m4 serial 13 # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Eric Blake dnl Find out how to obey POSIX semantics of fflush(stdin) discarding dnl unread input on seekable streams, rather than C99 undefined semantics. AC_DEFUN([gl_FUNC_FFLUSH], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_FUNC_FFLUSH_STDIN if test $gl_cv_func_fflush_stdin = no; then REPLACE_FFLUSH=1 fi ]) dnl Determine whether fflush works on input streams. dnl Sets gl_cv_func_fflush_stdin. AC_DEFUN([gl_FUNC_FFLUSH_STDIN], [ AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether fflush works on input streams], [gl_cv_func_fflush_stdin], [echo hello world > conftest.txt AC_RUN_IFELSE([AC_LANG_PROGRAM( [[ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif ]], [[FILE *f = fopen ("conftest.txt", "r"); char buffer[10]; int fd; int c; if (f == NULL) return 1; fd = fileno (f); if (fd < 0 || fread (buffer, 1, 5, f) != 5) return 2; /* For deterministic results, ensure f read a bigger buffer. */ if (lseek (fd, 0, SEEK_CUR) == 5) return 3; /* POSIX requires fflush-fseek to set file offset of fd. This fails on BSD systems and on mingw. */ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) return 4; if (lseek (fd, 0, SEEK_CUR) != 5) return 5; /* Verify behaviour of fflush after ungetc. See */ /* Verify behaviour of fflush after a backup ungetc. This fails on mingw. */ c = fgetc (f); ungetc (c, f); fflush (f); if (fgetc (f) != c) return 6; /* Verify behaviour of fflush after a non-backup ungetc. This fails on glibc 2.8 and on BSD systems. */ c = fgetc (f); ungetc ('@', f); fflush (f); if (fgetc (f) != c) return 7; return 0; ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no], [dnl Pessimistically assume fflush is broken. gl_cv_func_fflush_stdin=no]) rm conftest.txt ]) ]) # Prerequisites of lib/fflush.c. AC_DEFUN([gl_PREREQ_FFLUSH], [ AC_REQUIRE([AC_C_INLINE]) : ]) id-utils-4.6+git20120811/m4/lib-prefix.m40000664000000000000000000002042212166360012014223 0ustar # lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) id-utils-4.6+git20120811/m4/ssize_t.m40000664000000000000000000000146312166360012013646 0ustar # ssize_t.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether ssize_t is defined. AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x;]])], [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) if test $gt_cv_ssize_t = no; then AC_DEFINE([ssize_t], [int], [Define as a signed type of the same size as size_t.]) fi ]) id-utils-4.6+git20120811/m4/lcmessage.m40000664000000000000000000000253312166360012014130 0ustar # lcmessage.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1995-2002, 2004-2005, 2008-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([gt_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return LC_MESSAGES]])], [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) if test $gt_cv_val_LC_MESSAGES = yes; then AC_DEFINE([HAVE_LC_MESSAGES], [1], [Define if your file defines LC_MESSAGES.]) fi ]) id-utils-4.6+git20120811/m4/nls.m40000664000000000000000000000231511434330764012767 0ustar # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) id-utils-4.6+git20120811/m4/mbsrtowcs.m40000664000000000000000000001124612166360012014211 0ustar # mbsrtowcs.m4 serial 13 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSRTOWCS], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([mbsrtowcs]) if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 AC_CHECK_DECLS([mbsrtowcs],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_mbsrtowcs = yes; then dnl On Minix 3.1.8, the system's declares mbsrtowcs() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_MBSRTOWCS=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSRTOWCS=1 else gl_MBSRTOWCS_WORKS case "$gl_cv_func_mbsrtowcs_works" in *yes) ;; *) REPLACE_MBSRTOWCS=1 ;; esac fi fi ]) dnl Test whether mbsrtowcs works. dnl Result is gl_cv_func_mbsrtowcs_works. AC_DEFUN([gl_MBSRTOWCS_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbsrtowcs works], [gl_cv_func_mbsrtowcs_works], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on HP-UX, Solaris, mingw. hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; /* Test whether the function supports a NULL destination argument. This fails on native Windows. */ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { const char input[] = "\337er"; const char *src = input; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbsrtowcs (NULL, &src, 1, &state) != 3 || src != input) result |= 1; } /* Test whether the function works when started with a conversion state in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { const char input[] = "B\303\274\303\237er"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 2; if (mbsrtowcs (NULL, &src, 10, &state) != 4) result |= 2; } } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "<\306\374\313\334\270\354>"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 4; if (mbsrtowcs (NULL, &src, 10, &state) != 3) result |= 4; } } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { const char input[] = "B\250\271\201\060\211\070er"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 2; if (mbsrtowcs (NULL, &src, 10, &state) != 4) result |= 8; } } return result; }]])], [gl_cv_func_mbsrtowcs_works=yes], [gl_cv_func_mbsrtowcs_works=no], [:]) fi ]) ]) # Prerequisites of lib/mbsrtowcs.c. AC_DEFUN([gl_PREREQ_MBSRTOWCS], [ : ]) id-utils-4.6+git20120811/m4/multiarch.m40000664000000000000000000000367312166360012014163 0ustar # multiarch.m4 serial 6 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On MacOS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like # this: # # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CPP="gcc -E" CXXCPP="g++ -E" # # Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) id-utils-4.6+git20120811/m4/sys_stat_h.m40000664000000000000000000000652012166360012014345 0ustar # sys_stat_h.m4 serial 26 -*- Autoconf -*- dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Provide a GNU-like . AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include #include ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) ]) id-utils-4.6+git20120811/m4/wint_t.m40000664000000000000000000000203512166360012013466 0ustar # wint_t.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) fi ]) id-utils-4.6+git20120811/m4/strndup.m40000664000000000000000000000322212166360012013660 0ustar # strndup.m4 serial 20 dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNDUP], [ dnl Persuade glibc to declare strndup(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strndup]) AC_CHECK_FUNCS_ONCE([strndup]) if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then HAVE_STRNDUP=1 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ #ifndef HAVE_DECL_STRNDUP extern #ifdef __cplusplus "C" #endif char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0';]])], [gl_cv_func_strndup_works=yes], [gl_cv_func_strndup_works=no], [ changequote(,)dnl case $host_os in aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac changequote([,])dnl ])]) case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 ;; esac else HAVE_STRNDUP=0 fi ]) id-utils-4.6+git20120811/m4/d-ino.m40000664000000000000000000000260412166360012013172 0ustar # serial 12 dnl From Jim Meyering. dnl dnl Check whether struct dirent has a member named d_ino. dnl # Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2012 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], [AC_CACHE_CHECK([for d_ino member in directory struct], gl_cv_struct_dirent_d_ino, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include ]], [[DIR *dp = opendir ("."); struct dirent *e; struct stat st; if (! dp) return 1; e = readdir (dp); if (! e) return 2; if (stat (e->d_name, &st) != 0) return 3; if (e->d_ino != st.st_ino) return 4; return 0; ]])], [gl_cv_struct_dirent_d_ino=yes], [gl_cv_struct_dirent_d_ino=no], [gl_cv_struct_dirent_d_ino=no])]) if test $gl_cv_struct_dirent_d_ino = yes; then AC_DEFINE([D_INO_IN_DIRENT], [1], [Define if struct dirent has a member d_ino that actually works.]) fi ] ) id-utils-4.6+git20120811/m4/posix-shell.m40000664000000000000000000000336012166360012014433 0ustar # Find a POSIX-conforming shell. # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. # If a POSIX-conforming shell can be found, set POSIX_SHELL and # PREFERABLY_POSIX_SHELL to it. If not, set POSIX_SHELL to the # empty string and PREFERABLY_POSIX_SHELL to '/bin/sh'. AC_DEFUN([gl_POSIX_SHELL], [ AC_CACHE_CHECK([for a shell that conforms to POSIX], [gl_cv_posix_shell], [gl_test_posix_shell_script=' func_return () { (exit [$]1) } func_success () { func_return 0 } func_failure () { func_return 1 } func_ret_success () { return 0 } func_ret_failure () { return 1 } subshell_umask_sanity () { (umask 22; (umask 0); test $(umask) -eq 22) } test "[$](echo foo)" = foo && func_success && ! func_failure && func_ret_success && ! func_ret_failure && (set x && func_ret_success y && test x = "[$]1") && subshell_umask_sanity ' for gl_cv_posix_shell in \ "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do case $gl_cv_posix_shell in /*) "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \ && break;; esac done]) if test "$gl_cv_posix_shell" != no; then POSIX_SHELL=$gl_cv_posix_shell PREFERABLY_POSIX_SHELL=$POSIX_SHELL else POSIX_SHELL= PREFERABLY_POSIX_SHELL=/bin/sh fi AC_SUBST([POSIX_SHELL]) AC_SUBST([PREFERABLY_POSIX_SHELL]) ]) id-utils-4.6+git20120811/m4/thread.m40000664000000000000000000000101512166360012013426 0ustar # thread.m4 serial 2 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_THREAD], [ AC_REQUIRE([gl_THREADLIB]) AC_REQUIRE([AC_C_INLINE]) if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" AC_CHECK_FUNCS([pthread_atfork]) LIBS="$gl_save_LIBS" fi ]) id-utils-4.6+git20120811/m4/wctob.m40000664000000000000000000000667612166360012013317 0ustar # wctob.m4 serial 10 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCTOB], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([wctob]) if test $ac_cv_func_wctob = no; then HAVE_WCTOB=0 HAVE_DECL_WCTOB=0 else HAVE_WCTOB=1 dnl Solaris 9 has the wctob() function but it does not work. dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned dnl registers, see . AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether wctob works], [gl_cv_func_wctob_works], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris <= 9 and Cygwin. solaris2.[1-9] | solaris2.[1-9].* | cygwin*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac changequote([,])dnl case "$host_os" in cygwin*) AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include register long global __asm__ ("%ebx"); int main () { setlocale (LC_ALL, "en_US.UTF-8"); global = 0x12345678; if (wctob (0x00FC) != -1) return 1; if (global != 0x12345678) return 2; return 0; }]])], [:], [gl_cv_func_wctob_works=no], [:]) ;; esac if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { wchar_t wc; if (mbtowc (&wc, "\374", 1) == 1) if (wctob (wc) != (unsigned char) '\374') return 1; } return 0; }]])], [gl_cv_func_wctob_works=yes], [gl_cv_func_wctob_works=no], [:]) fi ]) case "$gl_cv_func_wctob_works" in *yes) ;; *) REPLACE_WCTOB=1 ;; esac if test $REPLACE_WCTOB = 0; then dnl IRIX 6.5 has the wctob() function but does not declare it. AC_CHECK_DECLS([wctob], [], [], [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 fi fi fi ]) # Prerequisites of lib/wctob.c. AC_DEFUN([gl_PREREQ_WCTOB], [ : ]) id-utils-4.6+git20120811/m4/snprintf.m40000664000000000000000000000305512166360012014030 0ustar # snprintf.m4 serial 6 dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Libintl 0.17 will replace snprintf only if it does not support %1$s, dnl but defers to any gnulib snprintf replacements. Therefore, gnulib dnl must guarantee that the decision for replacing snprintf is a superset dnl of the reasons checked by libintl. AC_DEFUN([gl_FUNC_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_snprintf_usable=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_SNPRINTF_RETVAL_C99 case "$gl_cv_func_snprintf_retval_c99" in *yes) gl_PRINTF_POSITIONS case "$gl_cv_func_printf_positions" in *yes) gl_cv_func_snprintf_usable=yes ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_REPLACE_SNPRINTF fi AC_CHECK_DECLS_ONCE([snprintf]) if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([snprintf]) if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi gl_PREREQ_SNPRINTF ]) # Prerequisites of lib/snprintf.c. AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) id-utils-4.6+git20120811/m4/stdlib_h.m40000664000000000000000000001260312166360012013754 0ustar # stdlib_h.m4 serial 41 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ]) id-utils-4.6+git20120811/m4/wcrtomb.m40000664000000000000000000000661012166360012013642 0ustar # wcrtomb.m4 serial 11 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCRTOMB], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([wcrtomb]) if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 AC_CHECK_DECLS([wcrtomb],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_wcrtomb = yes; then dnl On Minix 3.1.8, the system's declares wcrtomb() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_WCRTOMB=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 else dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes dnl returns 0 instead of 1. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether wcrtomb return value is correct], [gl_cv_func_wcrtomb_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 8; } return result; }]])], [gl_cv_func_wcrtomb_retval=yes], [gl_cv_func_wcrtomb_retval=no], [:]) fi ]) case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi fi ]) # Prerequisites of lib/wcrtomb.c. AC_DEFUN([gl_PREREQ_WCRTOMB], [ : ]) id-utils-4.6+git20120811/m4/ftello.m40000664000000000000000000000657612166360012013465 0ustar # ftello.m4 serial 10 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FTELLO], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) dnl Persuade glibc to declare ftello(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([ftello]) if test $ac_cv_have_decl_ftello = no; then HAVE_DECL_FTELLO=0 fi AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ftello (stdin);]])], [gl_cv_func_ftello=yes], [gl_cv_func_ftello=no]) ]) if test $gl_cv_func_ftello = no; then HAVE_FTELLO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FTELLO=1 else dnl Detect bug on Solaris. dnl ftell and ftello produce incorrect results after putc that followed a dnl getc call that reached EOF on Solaris. This is because the _IOREAD dnl flag does not get cleared in this case, even though _IOWRT gets set, dnl and ftell and ftello look whether the _IOREAD flag is set. AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether ftello works], [gl_cv_func_ftello_works], [ dnl Initial guess, used when cross-compiling or when /dev/tty cannot dnl be opened. changequote(,)dnl case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_ftello_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_ftello_works="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #define TESTFILE "conftest.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) return 70; if (fwrite ("foogarsh", 1, 8, fp) < 8) return 71; if (fclose (fp)) return 72; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) return 73; if (fseek (fp, -1, SEEK_END)) return 74; if (!(getc (fp) == 'h')) return 1; if (!(getc (fp) == EOF)) return 2; if (!(ftell (fp) == 8)) return 3; if (!(ftell (fp) == 8)) return 4; if (!(putc ('!', fp) == '!')) return 5; if (!(ftell (fp) == 9)) return 6; if (!(fclose (fp) == 0)) return 7; fp = fopen (TESTFILE, "r"); if (fp == NULL) return 75; { char buf[10]; if (!(fread (buf, 1, 10, fp) == 9)) return 10; if (!(memcmp (buf, "foogarsh!", 9) == 0)) return 11; } if (!(fclose (fp) == 0)) return 12; /* The file's contents is now "foogarsh!". */ return 0; }]])], [gl_cv_func_ftello_works=yes], [gl_cv_func_ftello_works=no], [:]) ]) case "$gl_cv_func_ftello_works" in *yes) ;; *) REPLACE_FTELLO=1 AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], [Define to 1 if the system's ftello function has the Solaris bug.]) ;; esac fi fi ]) id-utils-4.6+git20120811/m4/locale-fr.m40000664000000000000000000002422112166360012014027 0ustar # locale-fr.m4 serial 15 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a french locale with traditional encoding. AC_DEFUN([gt_LOCALE_FR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_FR=$gt_cv_locale_fr AC_SUBST([LOCALE_FR]) ]) dnl Determine the name of a french locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_FR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 AC_SUBST([LOCALE_FR_UTF8]) ]) id-utils-4.6+git20120811/m4/save-cwd.m40000664000000000000000000000057012166360012013675 0ustar # serial 10 dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites for lib/save-cwd.c. AC_DEFUN([gl_SAVE_CWD], [ AC_CHECK_FUNCS_ONCE([fchdir]) ]) id-utils-4.6+git20120811/m4/symlink.m40000664000000000000000000000277012166360012013656 0ustar # serial 5 # See if we need to provide symlink replacement. dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Eric Blake. AC_DEFUN([gl_FUNC_SYMLINK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([symlink]) dnl The best we can do on mingw is provide a dummy that always fails, so dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1, dnl and Solaris 9, we want to fix a bug with trailing slash handling. if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 else AC_CACHE_CHECK([whether symlink handles trailing slash correctly], [gl_cv_func_symlink_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int result = 0; if (!symlink ("a", "conftest.link/")) result |= 1; if (symlink ("conftest.f", "conftest.lnk2")) result |= 2; else if (!symlink ("a", "conftest.lnk2/")) result |= 4; return result; ]])], [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], [gl_cv_func_symlink_works="guessing no"]) rm -f conftest.f conftest.link conftest.lnk2]) if test "$gl_cv_func_symlink_works" != yes; then REPLACE_SYMLINK=1 fi fi ]) id-utils-4.6+git20120811/m4/strnlen.m40000664000000000000000000000156112166360012013652 0ustar # strnlen.m4 serial 13 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNLEN], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([strnlen]) if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else m4_pushdef([AC_LIBOBJ], [:]) dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). AC_FUNC_STRNLEN m4_popdef([AC_LIBOBJ]) if test $ac_cv_func_strnlen_working = no; then REPLACE_STRNLEN=1 fi fi ]) # Prerequisites of lib/strnlen.c. AC_DEFUN([gl_PREREQ_STRNLEN], [:]) id-utils-4.6+git20120811/m4/openat.m40000664000000000000000000000171412166360012013453 0ustar # serial 43 # See if we need to use our replacement for Solaris' openat et al functions. dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Jim Meyering. AC_DEFUN([gl_FUNC_OPENAT], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([openat]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in yes+yes) ;; yes+*) # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 ;; *) HAVE_OPENAT=0 ;; esac ]) # Prerequisites of lib/openat.c. AC_DEFUN([gl_PREREQ_OPENAT], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) : ]) id-utils-4.6+git20120811/m4/dup.m40000664000000000000000000000140712166360012012754 0ustar # dup.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_DUP], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_DUP=1 fi dnl Replace dup() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then REPLACE_DUP=1 fi ]) ]) # Prerequisites of lib/dup.c. AC_DEFUN([gl_PREREQ_DUP], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/mbtowc.m40000664000000000000000000000071412166360012013457 0ustar # mbtowc.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBTOWC], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) if false; then REPLACE_MBTOWC=1 fi ]) # Prerequisites of lib/mbtowc.c. AC_DEFUN([gl_PREREQ_MBTOWC], [ : ]) id-utils-4.6+git20120811/m4/lseek.m40000664000000000000000000000322212166360012013264 0ustar # lseek.m4 serial 8 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LSEEK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], [if test $cross_compiling = no; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include /* for off_t */ #include /* for SEEK_CUR */ #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif ]], [[ /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; ]])], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && test 1 = "`echo hi \ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi], [gl_cv_func_lseek_pipe=no]) else AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif]])], [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) fi]) if test $gl_cv_func_lseek_pipe = no; then REPLACE_LSEEK=1 AC_DEFINE([LSEEK_PIPE_BROKEN], [1], [Define to 1 if lseek does not detect pipes.]) fi ]) id-utils-4.6+git20120811/m4/largefile.m40000664000000000000000000000706112166360012014120 0ustar # Enable large files on systems where this is not the default. # Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # The following implementation works around a problem in autoconf <= 2.68; # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5. m4_version_prereq([2.69], [] ,[ # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [@%:@include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ @%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]];[]dnl ]) # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, # CACHE-VAR, # DESCRIPTION, # PROLOGUE, [FUNCTION-BODY]) # -------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], [while :; do m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([$5], [$6])], [$3=no; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([@%:@define $1 $2 $5], [$6])], [$3=$2; break]) $3=unknown break done]) case $$3 in #( no | unknown) ;; *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; esac rm -rf conftest*[]dnl ])# _AC_SYS_LARGEFILE_MACRO_VALUE # AC_SYS_LARGEFILE # ---------------- # By default, many hosts won't let programs access large files; # one must use special compiler options to get large-file access to work. # For more details about this brain damage please see: # http://www.unix-systems.org/version2/whatsnew/lfs20mar.html AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files]) if test "$enable_largefile" != no; then AC_CACHE_CHECK([for special C compiler options needed for large files], ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) AC_COMPILE_IFELSE([], [break]) CC="$CC -n32" AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) break done CC=$ac_save_CC rm -f conftest.$ac_ext fi]) if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) if test $ac_cv_sys_file_offset_bits = unknown; then _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi AH_VERBATIM([_DARWIN_USE_64_BIT_INODE], [/* Enable large inode numbers on Mac OS X. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif]) fi ])# AC_SYS_LARGEFILE ])# m4_version_prereq 2.69 id-utils-4.6+git20120811/m4/progtest.m40000664000000000000000000000557311434330764014053 0ustar # progtest.m4 serial 6 (gettext-0.18) dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) id-utils-4.6+git20120811/m4/lstat.m40000664000000000000000000000477712166360012013330 0ustar # serial 24 # Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi else HAVE_LSTAT=0 fi ]) # Prerequisites of lib/lstat.c. AC_DEFUN([gl_PREREQ_LSTAT], [ AC_REQUIRE([AC_C_INLINE]) : ]) AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [ dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. AC_CACHE_CHECK([whether lstat correctly handles trailing slash], [gl_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ]])], [gl_cv_func_lstat_dereferences_slashed_symlink=yes], [gl_cv_func_lstat_dereferences_slashed_symlink=no], [# When cross-compiling, be pessimistic so we will end up using the # replacement version of lstat that checks for trailing slashes and # calls lstat a second time when necessary. gl_cv_func_lstat_dereferences_slashed_symlink=no ]) else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. gl_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file ]) test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], [Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash.]) ]) id-utils-4.6+git20120811/m4/glibc21.m40000664000000000000000000000161312166360012013406 0ustar # glibc21.m4 serial 5 dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer, or uClibc. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) id-utils-4.6+git20120811/m4/sys_socket_h.m40000664000000000000000000001421712166360012014664 0ustar # sys_socket_h.m4 serial 22 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson. AC_DEFUN([gl_HEADER_SYS_SOCKET], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_C_INLINE]) dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have dnl old-style declarations (with return type 'int' instead of 'ssize_t') dnl unless _POSIX_PII_SOCKET is defined. case "$host_os" in osf*) AC_DEFINE([_POSIX_PII_SOCKET], [1], [Define to 1 in order to get the POSIX compatible declarations of socket functions.]) ;; esac AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_socket_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [gl_cv_header_sys_socket_h_selfcontained=yes], [gl_cv_header_sys_socket_h_selfcontained=no]) ]) if test $gl_cv_header_sys_socket_h_selfcontained = yes; then dnl If the shutdown function exists, should define dnl SHUT_RD, SHUT_WR, SHUT_RDWR. AC_CHECK_FUNCS([shutdown]) if test $ac_cv_func_shutdown = yes; then AC_CACHE_CHECK([whether defines the SHUT_* macros], [gl_cv_header_sys_socket_h_shut], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], [gl_cv_header_sys_socket_h_shut=yes], [gl_cv_header_sys_socket_h_shut=no]) ]) if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi fi # We need to check for ws2tcpip.h now. gl_PREREQ_SYS_H_SOCKET AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi if test $ac_cv_type_struct_sockaddr_storage != no; then AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], [], [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], [#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) fi if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then SYS_SOCKET_H='sys/socket.h' fi gl_PREREQ_SYS_H_WINSOCK2 dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include #include ]], [socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4]) ]) AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], [ dnl Check prerequisites of the replacement. AC_REQUIRE([gl_CHECK_SOCKET_HEADERS]) gl_CHECK_NEXT_HEADERS([sys/socket.h]) if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi AC_SUBST([HAVE_SYS_SOCKET_H]) AC_SUBST([HAVE_WS2TCPIP_H]) ]) # Common prerequisites of the replacement and of the # replacement. # Sets and substitutes HAVE_WINSOCK2_H. AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], [ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi AC_SUBST([HAVE_WINSOCK2_H]) ]) AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) ]) id-utils-4.6+git20120811/m4/float_h.m40000664000000000000000000000466312166360012013607 0ustar # float_h.m4 serial 9 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) FLOAT_H= REPLACE_FLOAT_LDBL=0 case "$host_os" in aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; freebsd*) case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl FLOAT_H=float.h ;; x86_64 ) # On x86_64 systems, the C compiler may still be generating # 32-bit code. AC_EGREP_CPP([yes], [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ yes #endif], [], [FLOAT_H=float.h]) ;; esac ;; linux*) case "$host_cpu" in powerpc*) FLOAT_H=float.h ;; esac ;; esac case "$host_os" in aix* | freebsd* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi ;; esac dnl Test against glibc-2.7 Linux/SPARC64 bug. REPLACE_ITOLD=0 AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], [gl_cv_func_itold_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ int i = -1; volatile long double ld; int main () { ld += i * 1.0L; if (ld > 0) return 1; return 0; }]])], [gl_cv_func_itold_works=yes], [gl_cv_func_itold_works=no], [case "$host" in sparc*-*-linux*) AC_EGREP_CPP([yes], [#if defined __LP64__ || defined __arch64__ yes #endif], [gl_cv_func_itold_works="guessing no"], [gl_cv_func_itold_works="guessing yes"]) ;; *) gl_cv_func_itold_works="guessing yes" ;; esac ]) ]) case "$gl_cv_func_itold_works" in *no) REPLACE_ITOLD=1 dnl We add the workaround to but also to , dnl to increase the chances that the fix function gets pulled in. FLOAT_H=float.h ;; esac if test -n "$FLOAT_H"; then gl_NEXT_HEADERS([float.h]) fi AC_SUBST([FLOAT_H]) AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) AC_SUBST([REPLACE_ITOLD]) ]) id-utils-4.6+git20120811/m4/fseeko.m40000664000000000000000000000367012166360012013444 0ustar # fseeko.m4 serial 15 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSEEKO], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) AC_REQUIRE([AC_PROG_CC]) dnl Persuade glibc to declare fseeko(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [fseeko (stdin, 0, 0);])], [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) ]) AC_CHECK_DECLS_ONCE([fseeko]) if test $ac_cv_have_decl_fseeko = no; then HAVE_DECL_FSEEKO=0 fi if test $gl_cv_func_fseeko = no; then HAVE_FSEEKO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FSEEKO=1 fi m4_ifdef([gl_FUNC_FFLUSH_STDIN], [ gl_FUNC_FFLUSH_STDIN if test $gl_cv_func_fflush_stdin = no; then REPLACE_FSEEKO=1 fi ]) fi ]) dnl Code shared by fseeko and ftello. Determine if large files are supported, dnl but stdin does not start as a large file by default. AC_DEFUN([gl_STDIN_LARGE_OFFSET], [ AC_CACHE_CHECK([whether stdin defaults to large file offsets], [gl_cv_var_stdin_large_offset], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[#if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif]])], [gl_cv_var_stdin_large_offset=yes], [gl_cv_var_stdin_large_offset=no])]) ]) id-utils-4.6+git20120811/m4/quotearg.m40000664000000000000000000000047412166360012014016 0ustar # quotearg.m4 serial 9 dnl Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_QUOTEARG], [ : ]) id-utils-4.6+git20120811/m4/fpurge.m40000664000000000000000000000320712166360012013454 0ustar # fpurge.m4 serial 7 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FPURGE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([fpurge]) AC_CHECK_FUNCS_ONCE([__fpurge]) AC_CHECK_DECLS([fpurge], , , [[#include ]]) if test "x$ac_cv_func_fpurge" = xyes; then HAVE_FPURGE=1 # Detect BSD bug. Only cygwin 1.7 is known to be immune. AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]], [FILE *f = fopen ("conftest.txt", "w+"); if (!f) return 1; if (fputc ('a', f) != 'a') return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != EOF) return 4; if (fpurge (f) != 0) return 5; if (putc ('b', f) != 'b') return 6; if (fclose (f) != 0) return 7; if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; if (fgetc (f) != 'a') return 9; if (fgetc (f) != 'b') return 10; if (fgetc (f) != EOF) return 11; if (fclose (f) != 0) return 12; if (remove ("conftest.txt") != 0) return 13; return 0;])], [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no], [gl_cv_func_fpurge_works='guessing no'])]) if test "x$gl_cv_func_fpurge_works" != xyes; then REPLACE_FPURGE=1 fi else HAVE_FPURGE=0 fi if test "x$ac_cv_have_decl_fpurge" = xno; then HAVE_DECL_FPURGE=0 fi ]) id-utils-4.6+git20120811/m4/getdtablesize.m40000664000000000000000000000111212166360012015003 0ustar # getdtablesize.m4 serial 3 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_GETDTABLESIZE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([getdtablesize]) if test $ac_cv_func_getdtablesize != yes; then HAVE_GETDTABLESIZE=0 fi ]) # Prerequisites of lib/getdtablesize.c. AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [ AC_REQUIRE([AC_C_INLINE]) ]) id-utils-4.6+git20120811/m4/vasnprintf.m40000664000000000000000000002116312166360012014357 0ustar # vasnprintf.m4 serial 34 dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) if test $ac_cv_func_vasnprintf = no; then gl_REPLACE_VASNPRINTF fi ]) AC_DEFUN([gl_REPLACE_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) AC_LIBOBJ([vasnprintf]) AC_LIBOBJ([printf-args]) AC_LIBOBJ([printf-parse]) AC_LIBOBJ([asnprintf]) if test $ac_cv_func_vasnprintf = yes; then AC_DEFINE([REPLACE_VASNPRINTF], [1], [Define if vasnprintf exists but is overridden by gnulib.]) fi gl_PREREQ_PRINTF_ARGS gl_PREREQ_PRINTF_PARSE gl_PREREQ_VASNPRINTF gl_PREREQ_ASNPRINTF ]) # Prequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) ]) # Prequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([gl_FEATURES_H]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) ]) # Prerequisites of lib/vasnprintf.c. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [[#include ]]) dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE. AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) dnl We can avoid a lot of code by assuming that snprintf's return value dnl conforms to ISO C99. So check that. AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) case "$gl_cv_func_snprintf_retval_c99" in *yes) AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], [Define if the return value of the snprintf function is the number of of bytes (excluding the terminating NUL) that would have been produced if the buffer had been large enough.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting 'long double' # arguments. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE]) case "$gl_cv_func_printf_infinite" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if dnl NEED_PRINTF_LONG_DOUBLE is already set. AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'long double' arguments.]) ;; esac ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) case "$gl_cv_func_printf_directive_a" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], [Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives.]) AC_CHECK_FUNCS([nl_langinfo]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) case "$gl_cv_func_printf_directive_f" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], [Define if the vasnprintf implementation needs special code for the 'F' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], [Define if the vasnprintf implementation needs special code for the 'ls' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], [ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], [Define if the vasnprintf implementation needs special code for the ' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], [Define if the vasnprintf implementation needs special code for the '-' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], [ AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], [Define if the vasnprintf implementation needs special code for the 0 flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting large precisions. AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], [ AC_REQUIRE([gl_PRINTF_PRECISION]) case "$gl_cv_func_printf_precision" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], [Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory # conditions. AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], [ AC_REQUIRE([gl_PRINTF_ENOMEM]) case "$gl_cv_func_printf_enomem" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_ENOMEM], [1], [Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], [ AC_REQUIRE([gl_PREREQ_VASNPRINTF]) gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM ]) # Prerequisites of lib/asnprintf.c. AC_DEFUN([gl_PREREQ_ASNPRINTF], [ ]) id-utils-4.6+git20120811/m4/msvc-nothrow.m40000664000000000000000000000053012166360012014626 0ustar # msvc-nothrow.m4 serial 1 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MSVC_NOTHROW], [ AC_REQUIRE([gl_MSVC_INVAL]) ]) id-utils-4.6+git20120811/m4/locale-zh.m40000664000000000000000000001222412166360012014041 0ustar # locale-zh.m4 serial 10 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a chinese locale with GB18030 encoding. AC_DEFUN([gt_LOCALE_ZH_CN], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* ]) LOCALE_ZH_CN=$gt_cv_locale_zh_CN AC_SUBST([LOCALE_ZH_CN]) ]) id-utils-4.6+git20120811/m4/environ.m40000664000000000000000000000261612166360012013647 0ustar # environ.m4 serial 6 dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_ENVIRON], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Persuade glibc to declare environ. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_HEADERS_ONCE([unistd.h]) gt_CHECK_VAR_DECL( [#if HAVE_UNISTD_H #include #endif /* mingw, BeOS, Haiku declare environ in , not in . */ #include ], [environ]) if test $gt_cv_var_environ_declaration != yes; then HAVE_DECL_ENVIRON=0 fi ]) # Check if a variable is properly declared. # gt_CHECK_VAR_DECL(includes,variable) AC_DEFUN([gt_CHECK_VAR_DECL], [ define([gt_cv_var], [gt_cv_var_]$2[_declaration]) AC_MSG_CHECKING([if $2 is properly declared]) AC_CACHE_VAL([gt_cv_var], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[$1 extern struct { int foo; } $2;]], [[$2.foo = 1;]])], [gt_cv_var=no], [gt_cv_var=yes])]) AC_MSG_RESULT([$gt_cv_var]) if test $gt_cv_var = yes; then AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, [Define if you have the declaration of $2.]) fi undefine([gt_cv_var]) ]) id-utils-4.6+git20120811/m4/putenv.m40000664000000000000000000000227312166360012013507 0ustar # putenv.m4 serial 18 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. dnl dnl Check whether putenv ("FOO") removes FOO from the environment. dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. AC_DEFUN([gl_FUNC_PUTENV], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CACHE_CHECK([for putenv compatible with GNU and SVID], [gl_cv_func_svid_putenv], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ /* Put it in env. */ if (putenv ("CONFTEST_putenv=val")) return 1; /* Try to remove it. */ if (putenv ("CONFTEST_putenv")) return 2; /* Make sure it was deleted. */ if (getenv ("CONFTEST_putenv") != 0) return 3; return 0; ]])], gl_cv_func_svid_putenv=yes, gl_cv_func_svid_putenv=no, dnl When crosscompiling, assume putenv is broken. gl_cv_func_svid_putenv=no) ]) if test $gl_cv_func_svid_putenv = no; then REPLACE_PUTENV=1 fi ]) id-utils-4.6+git20120811/m4/stdbool.m40000664000000000000000000000637112166360012013637 0ustar # Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. #serial 5 # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This version of the macro is needed in autoconf <= 2.68. AC_DEFUN([AC_CHECK_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ]], [[ bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) ]) id-utils-4.6+git20120811/m4/fpending.m40000664000000000000000000000775112166360012013766 0ustar # serial 18 # Copyright (C) 2000-2001, 2004-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering dnl Using code from emacs, based on suggestions from Paul Eggert dnl and Ulrich Drepper. dnl Find out how to determine the number of pending output bytes on a stream. dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, dnl we have to grub around in the FILE struct. AC_DEFUN([gl_FUNC_FPENDING], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h]) AC_CHECK_FUNCS_ONCE([__fpending]) fp_headers=' # include # if HAVE_STDIO_EXT_H # include # endif ' AC_CHECK_DECLS([__fpending], , , $fp_headers) ]) AC_DEFUN([gl_PREREQ_FPENDING], [ AC_CACHE_CHECK( [how to determine the number of pending output bytes on a stream], ac_cv_sys_pending_output_n_bytes, [ for ac_expr in \ \ '# glibc2' \ 'fp->_IO_write_ptr - fp->_IO_write_base' \ \ '# traditional Unix' \ 'fp->_ptr - fp->_base' \ \ '# BSD' \ 'fp->_p - fp->_bf._base' \ \ '# SCO, Unixware' \ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ \ '# QNX' \ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ \ '# old glibc?' \ 'fp->__bufp - fp->__buffer' \ \ '# old glibc iostream?' \ 'fp->_pptr - fp->_pbase' \ \ '# emx+gcc' \ 'fp->_ptr - fp->_buffer' \ \ '# Minix' \ 'fp->_ptr - fp->_buf' \ \ '# VMS' \ '(*fp)->_ptr - (*fp)->_base' \ \ '# e.g., DGUX R4.11; the info is not available' \ 1 \ ; do # Skip each embedded comment. case "$ac_expr" in '#'*) continue;; esac AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[FILE *fp = stdin; (void) ($ac_expr);]])], [fp_done=yes] ) test "$fp_done" = yes && break done ac_cv_sys_pending_output_n_bytes=$ac_expr ] ) AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], $ac_cv_sys_pending_output_n_bytes, [the number of pending output bytes on stream 'fp']) ]) id-utils-4.6+git20120811/m4/rewinddir.m40000664000000000000000000000070212166360012014150 0ustar # rewinddir.m4 serial 1 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_REWINDDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_CHECK_FUNCS([rewinddir]) if test $ac_cv_func_rewinddir = no; then HAVE_REWINDDIR=0 fi ]) id-utils-4.6+git20120811/m4/xalloc.m40000664000000000000000000000101512166360012013441 0ustar # xalloc.m4 serial 17 dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XALLOC], [ gl_PREREQ_XALLOC gl_PREREQ_XMALLOC ]) # Prerequisites of lib/xalloc.h. AC_DEFUN([gl_PREREQ_XALLOC], [ AC_REQUIRE([gl_INLINE]) : ]) # Prerequisites of lib/xmalloc.c. AC_DEFUN([gl_PREREQ_XMALLOC], [ : ]) id-utils-4.6+git20120811/m4/mbstate_t.m40000664000000000000000000000256712166360012014156 0ustar # mbstate_t.m4 serial 13 dnl Copyright (C) 2000-2002, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # From Paul Eggert. # BeOS 5 has but does not define mbstate_t, # so you can't declare an object of that type. # Check for this incompatibility with Standard C. # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]], [[mbstate_t x; return sizeof x;]])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], [1], [Define to 1 if declares mbstate_t.]) else AC_DEFINE([mbstate_t], [int], [Define to a type if does not define.]) fi ]) id-utils-4.6+git20120811/m4/getdelim.m40000664000000000000000000000464412166360012013764 0ustar # getdelim.m4 serial 9 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.59]) AC_DEFUN([gl_FUNC_GETDELIM], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) dnl Persuade glibc to declare getdelim(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getdelim]) AC_CHECK_FUNCS_ONCE([getdelim]) if test $ac_cv_func_getdelim = yes; then HAVE_GETDELIM=1 dnl Found it in some library. Verify that it works. AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 3; } return 0; } ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. , dnl We're cross compiling. Assume it works on glibc2 systems. [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif ], [gl_cv_func_working_getdelim=yes], [gl_cv_func_working_getdelim=no])] )]) if test $gl_cv_func_working_getdelim = no; then REPLACE_GETDELIM=1 fi else HAVE_GETDELIM=0 fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi ]) # Prerequisites of lib/getdelim.c. AC_DEFUN([gl_PREREQ_GETDELIM], [ AC_CHECK_FUNCS([flockfile funlockfile]) AC_CHECK_DECLS([getc_unlocked]) ]) id-utils-4.6+git20120811/m4/yield.m40000664000000000000000000000135712166360012013276 0ustar # yield.m4 serial 2 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_YIELD], [ AC_REQUIRE([gl_THREADLIB]) dnl On some systems, sched_yield is in librt, rather than in libpthread. YIELD_LIB= if test $gl_threads_api = posix; then dnl Solaris has sched_yield in librt, not in libpthread or libc. AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) fi AC_SUBST([YIELD_LIB]) ]) id-utils-4.6+git20120811/m4/malloca.m40000664000000000000000000000110112166360012013563 0ustar # malloca.m4 serial 1 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MALLOCA], [ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables dnl @ALLOCA@ and @LTALLOCA@. dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) id-utils-4.6+git20120811/m4/wcwidth.m40000664000000000000000000000545412166360012013643 0ustar # wcwidth.m4 serial 21 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCWIDTH], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare wcwidth(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_HEADERS_ONCE([wchar.h]) AC_CHECK_FUNCS_ONCE([wcwidth]) AC_CHECK_DECLS([wcwidth], [], [], [[ /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = yes; then HAVE_WCWIDTH=1 dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. dnl This leads to bugs in 'ls' (coreutils). AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], [gl_cv_func_wcwidth_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if !HAVE_DECL_WCWIDTH extern # ifdef __cplusplus "C" # endif int wcwidth (int); #endif int main () { int result = 0; if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) { if (wcwidth (0x0301) > 0) result |= 1; if (wcwidth (0x200B) > 0) result |= 2; } return result; }]])], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc and AIX 7 systems. *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; *) gl_cv_func_wcwidth_works="guessing no";; esac changequote([,])dnl ]) ]) case "$gl_cv_func_wcwidth_works" in *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac else HAVE_WCWIDTH=0 fi dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not dnl have the wcwidth function, then it does not declare it. ]) id-utils-4.6+git20120811/m4/fstatat.m40000664000000000000000000000367012166360012013636 0ustar # fstatat.m4 serial 2 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Jim Meyering. # If we have the fstatat function, and it has the bug (in AIX 7.1) # that it does not fill in st_size correctly, use the replacement function. AC_DEFUN([gl_FUNC_FSTATAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([fstatat]) if test $ac_cv_func_fstatat = no; then HAVE_FSTATAT=0 else dnl Test for an AIX 7.1 bug; see dnl . AC_CACHE_CHECK([whether fstatat (..., 0) works], [gl_cv_func_fstatat_zero_flag], [AC_RUN_IFELSE( [AC_LANG_SOURCE( [[ #include #include int main (void) { struct stat a; return fstatat (AT_FDCWD, ".", &a, 0) != 0; } ]])], [gl_cv_func_fstatat_zero_flag=yes], [gl_cv_func_fstatat_zero_flag=no], [case "$host_os" in aix*) gl_cv_func_fstatat_zero_flag="guessing no";; *) gl_cv_func_fstatat_zero_flag="guessing yes";; esac ]) ]) case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+yes) ;; *) REPLACE_FSTATAT=1 case $gl_cv_func_fstatat_zero_flag in *yes) AC_DEFINE([HAVE_WORKING_FSTATAT_ZERO_FLAG], [1], [Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX 7.1.]) ;; esac ;; esac fi ]) id-utils-4.6+git20120811/m4/size_max.m40000664000000000000000000000577012166360012014012 0ustar # size_max.m4 serial 10 dnl Copyright (C) 2003, 2005-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], [gl_cv_size_max=yes]) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include #include ], [size_t_bits_minus_1=]) AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], [#include ], [fits_in_uint=]) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include extern size_t foo; extern unsigned long foo; ]], [[]])], [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else dnl Shouldn't happen, but who knows... gl_cv_size_max='((size_t)~(size_t)0)' fi fi ]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after dnl . Remember that the #undef in AH_VERBATIM gets replaced with dnl #define by AC_DEFINE_UNQUOTED. AH_VERBATIM([SIZE_MAX], [/* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) id-utils-4.6+git20120811/m4/stdint_h.m40000664000000000000000000000174312166360012014003 0ustar # stdint_h.m4 serial 9 dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[uintmax_t i = (uintmax_t) -1; return !i;]])], [gl_cv_header_stdint_h=yes], [gl_cv_header_stdint_h=no])]) if test $gl_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) id-utils-4.6+git20120811/m4/unistd-safer.m40000664000000000000000000000053012166360012014564 0ustar #serial 9 dnl Copyright (C) 2002, 2005-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_UNISTD_SAFER], [ AC_CHECK_FUNCS_ONCE([pipe]) ]) id-utils-4.6+git20120811/m4/mempcpy.m40000664000000000000000000000134612166360012013640 0ustar # mempcpy.m4 serial 11 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMPCPY], [ dnl Persuade glibc to declare mempcpy(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([mempcpy]) if test $ac_cv_func_mempcpy = no; then HAVE_MEMPCPY=0 fi ]) # Prerequisites of lib/mempcpy.c. AC_DEFUN([gl_PREREQ_MEMPCPY], [ : ]) id-utils-4.6+git20120811/m4/fpieee.m40000664000000000000000000000404212166360012013417 0ustar # fpieee.m4 serial 1 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl IEEE 754 standardized three items: dnl - The formats of single-float and double-float - nowadays commonly dnl available as 'float' and 'double' in C and C++. dnl No autoconf test needed. dnl - The overflow and division by zero behaviour: The result are values dnl '±Inf' and 'NaN', rather than exceptions as it was before. dnl This file provides an autoconf macro for ensuring this behaviour of dnl floating-point operations. dnl - A set of conditions (overflow, underflow, inexact, etc.) which can dnl be configured to trigger an exception. dnl This cannot be done in a portable way: it depends on the compiler, dnl libc, kernel, and CPU. No autoconf macro is provided for this. dnl Ensure non-trapping behaviour of floating-point overflow and dnl floating-point division by zero. dnl (For integer overflow, see gcc's -ftrapv option; for integer division by dnl zero, see the autoconf macro in intdiv0.m4.) AC_DEFUN([gl_FP_IEEE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 # and the GCC 4.1.2 manual). case "$host_cpu" in alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at # if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" else # Compaq (ex-DEC) C has the option -ieee. CPPFLAGS="$CPPFLAGS -ieee" fi ;; sh*) if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" fi ;; esac ]) id-utils-4.6+git20120811/m4/strdup.m40000664000000000000000000000165712166360012013514 0ustar # strdup.m4 serial 13 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([strdup]) AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) AC_DEFUN([gl_FUNC_STRDUP_POSIX], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) AC_CHECK_FUNCS_ONCE([strdup]) if test $ac_cv_func_strdup = yes; then if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 fi fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) # Prerequisites of lib/strdup.c. AC_DEFUN([gl_PREREQ_STRDUP], [:]) id-utils-4.6+git20120811/m4/stat.m40000664000000000000000000000454412166360012013144 0ustar # serial 8 # Copyright (C) 2009-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STAT], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) dnl mingw is the only known platform where stat(".") and stat("./") differ AC_CACHE_CHECK([whether stat handles trailing slashes on directories], [gl_cv_func_stat_dir_slash], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], [case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac])]) dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/") dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/") AC_CACHE_CHECK([whether stat handles trailing slashes on files], [gl_cv_func_stat_file_slash], [touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int result = 0; struct stat st; if (!stat ("conftest.tmp/", &st)) result |= 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) result |= 2; #endif return result; ]])], [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], [gl_cv_func_stat_file_slash="guessing no"]) rm -f conftest.tmp conftest.lnk]) case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs help when passed a directory name with a trailing slash]);; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac ]) # Prerequisites of lib/stat.c. AC_DEFUN([gl_PREREQ_STAT], [ AC_REQUIRE([AC_C_INLINE]) : ]) id-utils-4.6+git20120811/m4/frexpl.m40000664000000000000000000001537012166360012013470 0ustar # frexpl.m4 serial 18 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) FREXPL_LIBM= if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = no; then AC_CACHE_CHECK([whether frexpl() can be used with libm], [gl_cv_func_frexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[int e; return frexpl (x, &e) > 0;]])], [gl_cv_func_frexpl_in_libm=yes], [gl_cv_func_frexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexpl_in_libm = yes; then FREXPL_LIBM=-lm fi fi if test $gl_cv_func_frexpl_no_libm = yes \ || test $gl_cv_func_frexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXPL_LIBM" gl_FUNC_FREXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl=yes ;; *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl=no fi if test $gl_func_frexpl = yes; then AC_DEFINE([HAVE_FREXPL], [1], [Define if the frexpl() function is available.]) fi fi if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then dnl Find libraries needed to link lib/frexpl.c. if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then AC_REQUIRE([gl_FUNC_FREXP]) FREXPL_LIBM="$FREXP_LIBM" else FREXPL_LIBM= fi fi AC_SUBST([FREXPL_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl() function is available in libc.]) fi fi ]) dnl Test whether frexpl() can be used without linking with libm. dnl Set gl_cv_func_frexpl_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM], [ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], [gl_cv_func_frexpl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[int e; return frexpl (x, &e) > 0;]])], [gl_cv_func_frexpl_no_libm=yes], [gl_cv_func_frexpl_no_libm=no]) ]) ]) dnl Test whether frexpl() works on finite numbers (this fails on dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this dnl fails e.g. on IRIX 6.5 and mingw). AC_DEFUN([gl_FUNC_FREXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if defined __i386__ && defined __FreeBSD__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP #endif #if defined __sgi && (LDBL_MANT_DIG >= 106) # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # endif #endif extern #ifdef __cplusplus "C" #endif long double frexpl (long double, int *); int main() { int result = 0; volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) result |= 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) result |= 2; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) { result |= 4; break; } } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) result |= 8; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) result |= 16; } return result; }]])], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no], [ changequote(,)dnl case "$host_os" in aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac changequote([,])dnl ]) ]) ]) id-utils-4.6+git20120811/m4/opendir.m40000664000000000000000000000133612166360012013625 0ustar # opendir.m4 serial 2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPENDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_CHECK_FUNCS([opendir]) if test $ac_cv_func_opendir = no; then HAVE_OPENDIR=0 fi dnl Replace opendir() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then if test $HAVE_OPENDIR = 1; then REPLACE_OPENDIR=1 fi fi ]) ]) id-utils-4.6+git20120811/m4/inttypes-pri.m40000664000000000000000000000234512166360012014635 0ustar # inttypes-pri.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.53]) # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_CHECK_HEADERS([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], [gt_cv_inttypes_pri_broken], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifdef PRId32 char *p = PRId32; #endif ]], [[]])], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], [Define if exists and defines unusable PRI* macros.]) PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi AC_SUBST([PRI_MACROS_BROKEN]) ]) id-utils-4.6+git20120811/m4/inttypes_h.m40000664000000000000000000000177412166360012014361 0ustar # inttypes_h.m4 serial 10 dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[uintmax_t i = (uintmax_t) -1; return !i;]])], [gl_cv_header_inttypes_h=yes], [gl_cv_header_inttypes_h=no])]) if test $gl_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) id-utils-4.6+git20120811/m4/wchar_h.m40000664000000000000000000002224012166360012013575 0ustar dnl A placeholder for ISO C99 , for platforms that have issues. dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. # wchar_h.m4 serial 39 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) dnl Prepare for creating substitute . dnl Check for (missing in Linux uClibc when built without wide dnl character support). dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) AC_REQUIRE([gl_FEATURES_H]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include #endif #include ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ]) ]) dnl Check whether is usable at all. AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to dnl 'gnu_inline'. See dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], [gl_cv_header_wchar_h_correct_inline], [gl_cv_header_wchar_h_correct_inline=yes AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include extern int zero (void); int main () { return zero(); } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest1.$ac_objext AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int zero (void) { return 0; } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) fi ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP]) GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY]) GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE]) GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET]) GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR]) HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP]) HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY]) HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE]) HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET]) HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY]) HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY]) HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT]) HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT]) HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP]) HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP]) HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP]) HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP]) HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK]) HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) ]) id-utils-4.6+git20120811/m4/extensions.m40000664000000000000000000001073612166360012014370 0ustar # serial 11 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for 'stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on MacOS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) id-utils-4.6+git20120811/idutils.spec.in0000664000000000000000000000341011434330764014344 0ustar Name: idutils Version: @VERSION@ Release: 1%{?dist} Summary: A simple, fast, high-capacity, language-independent identifier database tool Group: Development/Tools License: GPLv3+ URL: http://www.gnu.org/software/idutils/ Source0: http://ftp.gnu.org/gnu/idutils/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: emacs, gettext-devel Requires(post): info Requires(preun): info %description `mkid' is a simple, fast, high-capacity, language-independent identifier database tool. Actually, the term `identifier' is too limiting--`mkid' stores tokens, be they program identifiers of any form, literal numbers, or words of human-readable text. Database queries can be issued from the command-line, or from within emacs, serving as an augmented tags facility. %prep %setup -q %build %configure make %{?_smp_mflags} %check make check %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} rm -f $RPM_BUILD_ROOT%{_infodir}/dir %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root,-) %doc ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README* THANKS TODO %doc %{_mandir}/man1/*.1.gz %{_bindir}/* %{_datadir}/emacs/site-lisp/ %{_datadir}/id-lang.map %{_infodir}/idutils.info* %post /sbin/install-info %{_infodir}/idutils.info.gz %{_infodir}/dir || : %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/idutils.info.gz %{_infodir}/dir || : fi %changelog * Sat Oct 18 2008 Jim Meyering - Newer version of gnulib to fix test-program build failure on ppc. * Fri Oct 17 2008 Jim Meyering - Include man1/*.1.gz and tweak Source0. * Fri Sep 12 2008 Markus Armbruster - Initial build for Fedora id-utils-4.6+git20120811/README-release0000664000000000000000000000566112166360012013706 0ustar Here are most of the steps we (maintainers) follow when making a release. * start from a clean, up-to-date git directory. make -k maintainer-clean || { ./configure && make maintainer-clean; } git checkout master git pull origin master * Ensure that the latest stable versions of autoconf, automake, etc. are in your PATH. See the buildreq list in bootstrap.conf for the complete list of tools. * Ensure that you're on "master" with no uncommitted diffs. This should produce no output: git checkout master; git diff * Ensure that you've pushed all changes that belong in the release and that the NixOS/Hydra autobuilder is reporting all is well: http://hydra.nixos.org/jobset/gnu/idutils-master * Run "./bootstrap && ./configure". This downloads any new translations. * Pre-release testing: Ensure that "make check syntax-check" succeeds. * Run "make distcheck" * Set the date, version number, and release type [stable/alpha/beta] on line 3 of NEWS, commit that, and tag the release by running e.g., build-aux/do-release-commit-and-tag X.Y stable * Run the following to create release tarballs. Your choice selects the corresponding upload-to destination in the emitted gnupload command. The different destinations are specified in cfg.mk. See the definitions of gnu_ftp_host-{alpha,beta,stable}. # "TYPE" must be stable, beta or alpha make TYPE * Test the tarball. Copy it to a few odd-ball systems and ensure that it builds and passes all tests. * While that's happening, write the release announcement that you will soon post. Start with the template, $HOME/announce-idutils-X.Y that was just created by that "make" command. Once all the builds and tests have passed, * Run the gnupload command that was suggested by your "make stable" run above. * Wait a few minutes (maybe up to 30?) and then use the release URLs to download all tarball/signature pairs and use gpg --verify to ensure that they're all valid. * Push the NEWS-updating changes and the new tag: v=$(cat .prev-version) git push origin master tag v$v * Announce it on Savannah first, so you can include the preferable savannah.org announcement link in the email message. From here: https://savannah.gnu.org/projects/idutils/ click on the "submit news", then write something like the following: (If there is no such button, then enable "News" for the project via the Main -> "Select Features" menu item, or via this link: https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=idutils) Subject: idutils-X.Y released [stable] +verbatim+ ...paste the announcement here... -verbatim- Then go here to approve it: https://savannah.gnu.org/news/approve.php?group=idutils * Send the announcement email message. * After each non-alpha release, update the on-line manual accessible via http://www.gnu.org/software/idutils/manual/ by running this: build-aux/gnu-web-doc-update id-utils-4.6+git20120811/configure0000775000000000000000000416663112166360012013330 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68.136-a1a00 for idutils 4.6. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bug-idutils@gnu.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='idutils' PACKAGE_TARNAME='idutils' PACKAGE_VERSION='4.6' PACKAGE_STRING='idutils 4.6' PACKAGE_BUGREPORT='bug-idutils@gnu.org' PACKAGE_URL='' ac_unique_file="src/mkid.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gl_use_threads_default= ac_func_list= ac_header_list= gl_fnmatch_required=POSIX gl_getopt_required=POSIX gl_getopt_required=POSIX gt_needs= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS CONFIG_INCLUDE am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS POSUB INTLLIBS LTLIBICONV LIBICONV XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS EMACSLOADPATH EMACS WERROR_CFLAGS LIBTESTS_LIBDEPS LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS YIELD_LIB abs_aux_dir LTLIBMULTITHREAD LIBMULTITHREAD LTLIBTHREAD LIBTHREAD LIBPTH_PREFIX LTLIBPTH LIBPTH INTL_MACOSX_LIBS NEXT_AS_FIRST_DIRECTIVE_LOCALE_H NEXT_LOCALE_H HAVE_XLOCALE_H REPLACE_DUPLOCALE REPLACE_SETLOCALE HAVE_DUPLOCALE GNULIB_DUPLOCALE GNULIB_SETLOCALE NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H UINT64_MAX_EQ_ULONG_MAX UINT32_MAX_LT_UINTMAX_MAX PRIPTR_PREFIX PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX REPLACE_STRTOIMAX HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV HAVE_DECL_IMAXABS GNULIB_STRTOUMAX GNULIB_STRTOIMAX GNULIB_IMAXDIV GNULIB_IMAXABS LOCALE_TR_UTF8 gltests_WITNESS NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H WARN_CFLAGS LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE LIBUNISTRING_UNIWIDTH_H LIBUNISTRING_UNITYPES_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME GNULIB_NANOSLEEP GNULIB_MKTIME NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H NEXT_SYS_TYPES_H NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H NEXT_SYS_IOCTL_H HAVE_SYS_IOCTL_H HAVE_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRINGS_H NEXT_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H HAVE_DECL_STRNCASECMP HAVE_STRCASECMP HAVE_FFS GNULIB_FFS NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H GL_GENERATE_STDINT_H_FALSE GL_GENERATE_STDINT_H_TRUE STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX PTRDIFF_T_SUFFIX HAVE_SIGNED_WINT_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_SIG_ATOMIC_T BITSIZEOF_WINT_T BITSIZEOF_WCHAR_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_PTRDIFF_T HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H ASM_SYMBOL_PREFIX PREFERABLY_POSIX_SHELL POSIX_SHELL PERL UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL REPLACE_STRNLEN REPLACE_STRNDUP REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR_R HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP HAVE_STRPBRK HAVE_DECL_STRNLEN HAVE_DECL_STRNDUP HAVE_DECL_STRDUP HAVE_STRCHRNUL HAVE_STPNCPY HAVE_STPCPY HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL GNULIB_STRERROR_R GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP GNULIB_MBSSPN GNULIB_MBSPBRK GNULIB_MBSCSPN GNULIB_MBSCASESTR GNULIB_MBSPCASECMP GNULIB_MBSNCASECMP GNULIB_MBSCASECMP GNULIB_MBSSTR GNULIB_MBSRCHR GNULIB_MBSCHR GNULIB_MBSNLEN GNULIB_MBSLEN GNULIB_STRTOK_R GNULIB_STRCASESTR GNULIB_STRSTR GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP GNULIB_STRNCAT GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY GNULIB_STPCPY GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR GNULIB_FFSLL GNULIB_FFSL LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 HAVE_LANGINFO_YESEXPR HAVE_LANGINFO_ERA HAVE_LANGINFO_T_FMT_AMPM HAVE_LANGINFO_CODESET HAVE_LANGINFO_H NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H NEXT_LANGINFO_H REPLACE_NL_LANGINFO HAVE_NL_LANGINFO GNULIB_NL_LANGINFO REPLACE_TOWLOWER REPLACE_ISWCNTRL HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H HAVE_WINT_T HAVE_ISWCNTRL REPLACE_ISWBLANK HAVE_WCTRANS_T HAVE_WCTYPE_T HAVE_ISWBLANK GNULIB_TOWCTRANS GNULIB_WCTRANS GNULIB_ISWCTYPE GNULIB_WCTYPE GNULIB_ISWBLANK GNU_MAKE_FALSE GNU_MAKE_TRUE LTLIBINTL LIBINTL GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H REPLACE_UTIMENSAT REPLACE_STAT REPLACE_MKNOD REPLACE_MKFIFO REPLACE_MKDIR REPLACE_LSTAT REPLACE_FUTIMENS REPLACE_FSTATAT REPLACE_FSTAT HAVE_UTIMENSAT HAVE_MKNODAT HAVE_MKNOD HAVE_MKFIFOAT HAVE_MKFIFO HAVE_MKDIRAT HAVE_LSTAT HAVE_LCHMOD HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT GNULIB_UTIMENSAT GNULIB_STAT GNULIB_MKNODAT GNULIB_MKNOD GNULIB_MKFIFOAT GNULIB_MKFIFO GNULIB_MKDIRAT GNULIB_LSTAT GNULIB_LCHMOD GNULIB_FUTIMENS GNULIB_FSTATAT GNULIB_FSTAT GNULIB_FCHMODAT REPLACE_TRUNCL REPLACE_TRUNCF REPLACE_TRUNC REPLACE_SIGNBIT_USING_GCC REPLACE_SIGNBIT REPLACE_ROUNDL REPLACE_ROUNDF REPLACE_ROUND REPLACE_NAN REPLACE_LDEXPL REPLACE_ISNAN REPLACE_ISINF REPLACE_ISFINITE REPLACE_HUGE_VAL REPLACE_FREXPL REPLACE_FREXP REPLACE_FREXPF REPLACE_FMAL REPLACE_FMAF REPLACE_FMA REPLACE_FLOORL REPLACE_FLOORF REPLACE_FLOOR REPLACE_CEILL REPLACE_CEILF REPLACE_CEIL HAVE_DECL_TRUNCL HAVE_DECL_TRUNCF HAVE_DECL_TRUNC HAVE_DECL_TANL HAVE_DECL_SQRTL HAVE_DECL_SINL HAVE_DECL_ROUNDL HAVE_DECL_ROUNDF HAVE_DECL_ROUND HAVE_DECL_LOGL HAVE_DECL_LOGB HAVE_DECL_LDEXPL HAVE_DECL_FREXPL HAVE_DECL_FLOORL HAVE_DECL_FLOORF HAVE_DECL_EXPL HAVE_DECL_COSL HAVE_DECL_CEILL HAVE_DECL_CEILF HAVE_DECL_ATANL HAVE_DECL_ASINL HAVE_DECL_ACOSL HAVE_TANHF HAVE_TANL HAVE_TANF HAVE_SQRTL HAVE_SQRTF HAVE_SINHF HAVE_SINL HAVE_SINF HAVE_RINTL HAVE_RINTF HAVE_RINT HAVE_POWF HAVE_MODFF HAVE_LOG10F HAVE_LOGL HAVE_LOGF HAVE_LDEXPF HAVE_ISNANL HAVE_ISNAND HAVE_ISNANF HAVE_FREXPF HAVE_FMODF HAVE_FMAL HAVE_FMAF HAVE_FMA HAVE_FABSF HAVE_EXPL HAVE_EXPF HAVE_COSHF HAVE_COSL HAVE_COSF HAVE_COPYSIGNL HAVE_COPYSIGNF HAVE_COPYSIGN HAVE_ATAN2F HAVE_ATANL HAVE_ATANF HAVE_ASINL HAVE_ASINF HAVE_ACOSL HAVE_ACOSF GNULIB_TRUNCL GNULIB_TRUNCF GNULIB_TRUNC GNULIB_TANHF GNULIB_TANL GNULIB_TANF GNULIB_SQRTL GNULIB_SQRTF GNULIB_SINHF GNULIB_SINL GNULIB_SINF GNULIB_SIGNBIT GNULIB_ROUNDL GNULIB_ROUNDF GNULIB_ROUND GNULIB_RINTL GNULIB_RINTF GNULIB_RINT GNULIB_POWF GNULIB_MODFF GNULIB_LOG10F GNULIB_LOGL GNULIB_LOGF GNULIB_LOGB GNULIB_LDEXPL GNULIB_LDEXPF GNULIB_ISNANL GNULIB_ISNAND GNULIB_ISNANF GNULIB_ISNAN GNULIB_ISINF GNULIB_ISFINITE GNULIB_FREXPL GNULIB_FREXP GNULIB_FREXPF GNULIB_FMODF GNULIB_FMAL GNULIB_FMAF GNULIB_FMA GNULIB_FLOORL GNULIB_FLOORF GNULIB_FLOOR GNULIB_FABSF GNULIB_EXPL GNULIB_EXPF GNULIB_COSHF GNULIB_COSL GNULIB_COSF GNULIB_COPYSIGNL GNULIB_COPYSIGNF GNULIB_COPYSIGN GNULIB_CEILL GNULIB_CEILF GNULIB_CEIL GNULIB_ATAN2F GNULIB_ATANL GNULIB_ATANF GNULIB_ASINL GNULIB_ASINF GNULIB_ACOSL GNULIB_ACOSF HAVE_FEATURES_H APPLE_UNIVERSAL_BUILD HAVE_SAME_LONG_DOUBLE_AS_DOUBLE GL_GENERATE_FNMATCH_H_FALSE GL_GENERATE_FNMATCH_H_TRUE FNMATCH_H REPLACE_ITOLD GL_GENERATE_FLOAT_H_FALSE GL_GENERATE_FLOAT_H_TRUE FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF REPLACE_VFPRINTF REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS REPLACE_STDIO_READ_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT REPLACE_RENAME REPLACE_REMOVE REPLACE_PRINTF REPLACE_POPEN REPLACE_PERROR REPLACE_OBSTACK_PRINTF REPLACE_GETLINE REPLACE_GETDELIM REPLACE_FTELLO REPLACE_FTELL REPLACE_FSEEKO REPLACE_FSEEK REPLACE_FREOPEN REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH REPLACE_FDOPEN REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT HAVE_POPEN HAVE_PCLOSE HAVE_FTELLO HAVE_FSEEKO HAVE_DPRINTF HAVE_DECL_VSNPRINTF HAVE_DECL_SNPRINTF HAVE_DECL_OBSTACK_PRINTF HAVE_DECL_GETLINE HAVE_DECL_GETDELIM HAVE_DECL_FTELLO HAVE_DECL_FSEEKO HAVE_DECL_FPURGE GNULIB_VSPRINTF_POSIX GNULIB_VSNPRINTF GNULIB_VPRINTF_POSIX GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF GNULIB_VSCANF GNULIB_VFSCANF GNULIB_VASPRINTF GNULIB_TMPFILE GNULIB_STDIO_H_SIGPIPE GNULIB_STDIO_H_NONBLOCKING GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF GNULIB_SCANF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE GNULIB_PUTS GNULIB_PUTCHAR GNULIB_PUTC GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR GNULIB_PCLOSE GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETS GNULIB_GETLINE GNULIB_GETDELIM GNULIB_GETCHAR GNULIB_GETC GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK GNULIB_FSCANF GNULIB_FREOPEN GNULIB_FREAD GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN GNULIB_FGETS GNULIB_FGETC GNULIB_FFLUSH GNULIB_FDOPEN GNULIB_FCLOSE GNULIB_DPRINTF NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPENAT REPLACE_OPEN REPLACE_FCNTL HAVE_OPENAT HAVE_FCNTL GNULIB_OPENAT GNULIB_OPEN GNULIB_NONBLOCKING GNULIB_FCNTL EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN GL_GENERATE_ERRNO_H_FALSE GL_GENERATE_ERRNO_H_TRUE ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H HAVE_DIRENT_H NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT pkglibexecdir lispdir REPLACE_FDOPENDIR REPLACE_DIRFD REPLACE_CLOSEDIR REPLACE_OPENDIR HAVE_ALPHASORT HAVE_SCANDIR HAVE_FDOPENDIR HAVE_DECL_FDOPENDIR HAVE_DECL_DIRFD HAVE_CLOSEDIR HAVE_REWINDDIR HAVE_READDIR HAVE_OPENDIR GNULIB_ALPHASORT GNULIB_SCANDIR GNULIB_FDOPENDIR GNULIB_DIRFD GNULIB_CLOSEDIR GNULIB_REWINDDIR GNULIB_READDIR GNULIB_OPENDIR HAVE_WINSOCK2_H REPLACE_IOCTL SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS SYS_IOCTL_H_HAVE_WINSOCK2_H GNULIB_IOCTL HAVE_MSVC_INVALID_PARAMETER_HANDLER UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK REPLACE_READ REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_ISATTY REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_GETDOMAINNAME HAVE_DECL_FDATASYNC HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GROUP_MEMBER HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 HAVE_DUP2 HAVE_CHOWN GNULIB_WRITE GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_SETHOSTNAME GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK GNULIB_READ GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 GNULIB_PIPE GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN GNULIB_ISATTY GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME GNULIB_GETGROUPS GNULIB_GETDTABLESIZE GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC GNULIB_FDATASYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 GNULIB_DUP GNULIB_CLOSE GNULIB_CHOWN GNULIB_CHDIR REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_RANDOM_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME REPLACE_CALLOC HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H HAVE_RANDOM HAVE_PTSNAME_R HAVE_PTSNAME HAVE_POSIX_OPENPT HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME HAVE_ATOLL HAVE__EXIT GNULIB_WCTOMB GNULIB_UNSETENV GNULIB_UNLOCKPT GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_RANDOM GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME GNULIB_POSIX_OPENPT GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MBTOWC GNULIB_MALLOC_POSIX GNULIB_GRANTPT GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT LOCALE_FR REPLACE_WCSWIDTH REPLACE_WCWIDTH REPLACE_WCSNRTOMBS REPLACE_WCSRTOMBS REPLACE_WCRTOMB REPLACE_MBSNRTOWCS REPLACE_MBSRTOWCS REPLACE_MBRLEN REPLACE_MBRTOWC REPLACE_MBSINIT REPLACE_WCTOB REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB HAVE_WCSWIDTH HAVE_WCSTOK HAVE_WCSSTR HAVE_WCSPBRK HAVE_WCSSPN HAVE_WCSCSPN HAVE_WCSRCHR HAVE_WCSCHR HAVE_WCSDUP HAVE_WCSXFRM HAVE_WCSCOLL HAVE_WCSNCASECMP HAVE_WCSCASECMP HAVE_WCSNCMP HAVE_WCSCMP HAVE_WCSNCAT HAVE_WCSCAT HAVE_WCPNCPY HAVE_WCSNCPY HAVE_WCPCPY HAVE_WCSCPY HAVE_WCSNLEN HAVE_WCSLEN HAVE_WMEMSET HAVE_WMEMMOVE HAVE_WMEMCPY HAVE_WMEMCMP HAVE_WMEMCHR HAVE_WCSNRTOMBS HAVE_WCSRTOMBS HAVE_WCRTOMB HAVE_MBSNRTOWCS HAVE_MBSRTOWCS HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC GNULIB_WCSWIDTH GNULIB_WCSTOK GNULIB_WCSSTR GNULIB_WCSPBRK GNULIB_WCSSPN GNULIB_WCSCSPN GNULIB_WCSRCHR GNULIB_WCSCHR GNULIB_WCSDUP GNULIB_WCSXFRM GNULIB_WCSCOLL GNULIB_WCSNCASECMP GNULIB_WCSCASECMP GNULIB_WCSNCMP GNULIB_WCSCMP GNULIB_WCSNCAT GNULIB_WCSCAT GNULIB_WCPNCPY GNULIB_WCSNCPY GNULIB_WCPCPY GNULIB_WCSCPY GNULIB_WCSNLEN GNULIB_WCSLEN GNULIB_WMEMSET GNULIB_WMEMMOVE GNULIB_WMEMCPY GNULIB_WMEMCMP GNULIB_WMEMCHR GNULIB_WCWIDTH GNULIB_WCSNRTOMBS GNULIB_WCSRTOMBS GNULIB_WCRTOMB GNULIB_MBSNRTOWCS GNULIB_MBSRTOWCS GNULIB_MBRLEN GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE host_os host_vendor host_cpu host build_os build_vendor build_cpu build RANLIB ARFLAGS AR EGREP GREP CPP LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC HELP2MAN AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_largefile enable_threads with_included_regex with_gnu_ld enable_rpath with_libpth_prefix enable_gcc_warnings with_lispdir enable_nls with_libiconv_prefix with_libintl_prefix ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP EMACS EMACSLOADPATH' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures idutils 4.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/idutils] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of idutils 4.6:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files --enable-threads={posix|solaris|pth|windows} specify multithreading API --disable-threads build without multithread safety --disable-rpath do not hardcode runtime library paths --enable-gcc-warnings turn on lots of GCC warnings (for developers) --disable-nls do not use Native Language Support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems). --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib --without-libpth-prefix don't search for libpth in includedir and libdir --with-lispdir override the default lisp directory --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF idutils configure 4.6 generated by GNU Autoconf 2.68.136-a1a00 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bug-idutils@gnu.org ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by idutils $as_me 4.6, which was generated by GNU Autoconf 2.68.136-a1a00. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_func_list " btowc" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" as_fn_append ac_func_list " _set_invalid_parameter_handler" as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_func_list " fchdir" as_fn_append ac_header_list " dirent.h" as_fn_append ac_func_list " fcntl" as_fn_append ac_func_list " symlink" as_fn_append ac_func_list " fdopendir" as_fn_append ac_func_list " mempcpy" as_fn_append ac_func_list " isblank" as_fn_append ac_func_list " iswctype" as_fn_append ac_func_list " mbsrtowcs" as_fn_append ac_func_list " wmemchr" as_fn_append ac_func_list " wmemcpy" as_fn_append ac_func_list " wmempcpy" as_fn_append ac_header_list " wctype.h" gl_fnmatch_required=GNU as_fn_append ac_header_list " stdio_ext.h" as_fn_append ac_func_list " __fpending" as_fn_append ac_func_list " vasnprintf" as_fn_append ac_header_list " features.h" as_fn_append ac_func_list " snprintf" as_fn_append ac_func_list " fpurge" as_fn_append ac_func_list " __fpurge" as_fn_append ac_func_list " __freading" as_fn_append ac_func_list " alarm" as_fn_append ac_func_list " fstatat" as_fn_append ac_func_list " getdelim" as_fn_append ac_func_list " getdtablesize" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " iswcntrl" as_fn_append ac_func_list " iswblank" as_fn_append ac_header_list " langinfo.h" as_fn_append ac_func_list " lstat" as_fn_append ac_header_list " math.h" as_fn_append ac_func_list " mbsinit" as_fn_append ac_func_list " mbrtowc" as_fn_append ac_header_list " sys/mman.h" as_fn_append ac_func_list " mprotect" as_fn_append ac_func_list " nl_langinfo" as_fn_append ac_func_list " openat" gl_printf_safe=yes as_fn_append ac_func_list " wcscoll" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_func_list " strdup" as_fn_append ac_func_list " strerror_r" as_fn_append ac_func_list " __xpg_strerror_r" as_fn_append ac_header_list " strings.h" as_fn_append ac_func_list " strndup" as_fn_append ac_header_list " sys/ioctl.h" as_fn_append ac_header_list " sys/stat.h" as_fn_append ac_header_list " sys/time.h" as_fn_append ac_func_list " pipe" as_fn_append ac_func_list " wcrtomb" as_fn_append ac_func_list " wcwidth" as_fn_append ac_func_list " getrlimit" as_fn_append ac_func_list " setrlimit" as_fn_append ac_header_list " inttypes.h" as_fn_append ac_header_list " xlocale.h" as_fn_append ac_func_list " newlocale" as_fn_append ac_func_list " setenv" as_fn_append ac_func_list " mquery" as_fn_append ac_func_list " wctob" gt_needs="$gt_needs need-ngettext" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11a' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='idutils' VERSION='4.6' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # make --enable-silent-rules the default. ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin" # Checks for programs. HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } if ${gl_cv_c_amsterdam_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ACK__ Amsterdam #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Amsterdam" >/dev/null 2>&1; then : gl_cv_c_amsterdam_compiler=yes else gl_cv_c_amsterdam_compiler=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } if test -z "$AR"; then if test $gl_cv_c_amsterdam_compiler = yes; then AR='cc -c.a' if test -z "$ARFLAGS"; then ARFLAGS='-o' fi else if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="ar" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi else if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi if test -z "$RANLIB"; then if test $gl_cv_c_amsterdam_compiler = yes; then RANLIB=':' else if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi fi fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi case "$host_os" in hpux*) $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 # and the GCC 4.1.2 manual). case "$host_cpu" in alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at # if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" else # Compaq (ex-DEC) C has the option -ieee. CPPFLAGS="$CPPFLAGS -ieee" fi ;; sh*) if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" fi ;; esac # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then : enableval=$enable_threads; gl_use_threads=$enableval else if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else case "$host_os" in osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac fi fi if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_LINK_IFELSE test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi # Code from module alloca: # Code from module alloca-opt: # Code from module alloca-opt-tests: # Code from module announce-gen: # Code from module argmatch: # Code from module argmatch-tests: # Code from module argv-iter: # Code from module argv-iter-tests: # Code from module at-internal: # Code from module autobuild: if test -z "$AB_PACKAGE"; then AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} fi { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5 $as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;} if test -z "$AB_VERSION"; then AB_VERSION=${PACKAGE_VERSION:-$VERSION} fi { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5 $as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;} hostname=`hostname` if test "$hostname"; then { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5 $as_echo "$as_me: autobuild hostname... $hostname" >&6;} fi date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` if test "$?" != 0; then date=`date` fi if test "$date"; then { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5 $as_echo "$as_me: autobuild timestamp... $date" >&6;} fi # Code from module binary-io: # Code from module binary-io-tests: # Code from module bitrotate: # Code from module bitrotate-tests: # Code from module btowc: # Code from module btowc-tests: # Code from module c-ctype: # Code from module c-ctype-tests: # Code from module c-strcase: # Code from module c-strcase-tests: # Code from module c-strcaseeq: # Code from module calloc: # Code from module calloc-gnu: # Code from module calloc-gnu-tests: # Code from module calloc-posix: # Code from module chdir: # Code from module chdir-long: # Code from module chdir-tests: # Code from module cloexec: # Code from module cloexec-tests: # Code from module close: # Code from module close-stream: # Code from module close-tests: # Code from module closedir: # Code from module closeout: # Code from module configmake: # Code from module d-ino: # Code from module dirent: # Code from module dirent-tests: # Code from module dirfd: # Code from module dirname: # Code from module dirname-lgpl: # Code from module dirname-tests: # Code from module do-release-commit-and-tag: # Code from module dosname: # Code from module double-slash-root: # Code from module dup: # Code from module dup-tests: # Code from module dup2: # Code from module dup2-tests: # Code from module environ: # Code from module environ-tests: # Code from module errno: # Code from module errno-tests: # Code from module error: # Code from module exclude: # Code from module exclude-tests: # Code from module exitfail: # Code from module extensions: # Code from module fchdir: # Code from module fchdir-tests: # Code from module fcntl: # Code from module fcntl-h: # Code from module fcntl-h-tests: # Code from module fcntl-tests: # Code from module fd-hook: # Code from module fd-safer-flag: # Code from module fdopen: # Code from module fdopen-tests: # Code from module fdopendir: # Code from module fdopendir-tests: # Code from module fflush: # Code from module fflush-tests: # Code from module fgetc-tests: # Code from module filename: # Code from module filenamecat-lgpl: # Code from module float: # Code from module float-tests: # Code from module fnmatch: # Code from module fnmatch-gnu: # Code from module fnmatch-tests: # Code from module fopen: # Code from module fopen-tests: # Code from module fpending: # Code from module fpending-tests: # Code from module fpieee: # Code from module fprintf-posix: # Code from module fprintf-posix-tests: # Code from module fpucw: # Code from module fpurge: # Code from module fpurge-tests: # Code from module fputc-tests: # Code from module fread-tests: # Code from module freading: # Code from module freading-tests: # Code from module freopen: # Code from module freopen-tests: # Code from module frexp-nolibm: # Code from module frexp-nolibm-tests: # Code from module frexpl-nolibm: # Code from module frexpl-nolibm-tests: # Code from module fseek: # Code from module fseek-tests: # Code from module fseeko: # Code from module fseeko-tests: # Code from module fseterr: # Code from module fseterr-tests: # Code from module fstat: # Code from module fstat-tests: # Code from module fstatat: # Code from module fstatat-tests: # Code from module ftell: # Code from module ftell-tests: # Code from module ftello: # Code from module ftello-tests: # Code from module fwrite-tests: # Code from module gendocs: # Code from module get-rusage-as: # Code from module getcwd: # Code from module getcwd-lgpl: # Code from module getcwd-lgpl-tests: # Code from module getcwd-tests: # Code from module getdelim: # Code from module getdelim-tests: # Code from module getdtablesize: # Code from module getdtablesize-tests: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module getopt-posix-tests: # Code from module getpagesize: # Code from module gettext-h: # Code from module git-version-gen: # Code from module gitlog-to-changelog: # Code from module gnu-make: # Code from module gnu-web-doc-update: # Code from module gnumakefile: # Code from module gnupload: # Code from module hash: # Code from module hash-pjw: # Code from module hash-tests: # Code from module havelib: # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: # Code from module inline: # Code from module intprops: # Code from module intprops-tests: # Code from module inttostr: # Code from module inttostr-tests: # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module inttypes-tests: # Code from module isnand-nolibm: # Code from module isnand-nolibm-tests: # Code from module isnanf-nolibm: # Code from module isnanf-nolibm-tests: # Code from module isnanl-nolibm: # Code from module isnanl-nolibm-tests: # Code from module iswblank: # Code from module iswblank-tests: # Code from module langinfo: # Code from module langinfo-tests: # Code from module largefile: # Code from module localcharset: # Code from module locale: # Code from module locale-tests: # Code from module localename: # Code from module localename-tests: # Code from module lock: # Code from module lock-tests: # Code from module lseek: # Code from module lseek-tests: # Code from module lstat: # Code from module lstat-tests: # Code from module maintainer-makefile: # Code from module malloc: # Code from module malloc-gnu: # Code from module malloc-gnu-tests: # Code from module malloc-posix: # Code from module malloca: # Code from module malloca-tests: # Code from module manywarnings: # Code from module math: # Code from module math-tests: # Code from module mbchar: # Code from module mbrtowc: # Code from module mbrtowc-tests: # Code from module mbscasecmp: # Code from module mbscasecmp-tests: # Code from module mbsinit: # Code from module mbsinit-tests: # Code from module mbsrtowcs: # Code from module mbsrtowcs-tests: # Code from module mbtowc: # Code from module mbuiter: # Code from module memchr: # Code from module memchr-tests: # Code from module mempcpy: # Code from module memrchr: # Code from module memrchr-tests: # Code from module msvc-inval: # Code from module msvc-nothrow: # Code from module multiarch: # Code from module nl_langinfo: # Code from module nl_langinfo-tests: # Code from module nocrash: # Code from module obstack: # Code from module open: # Code from module open-tests: # Code from module openat: # Code from module openat-die: # Code from module openat-h: # Code from module openat-tests: # Code from module opendir: # Code from module pathmax: # Code from module pathmax-tests: # Code from module perl: # Code from module posix-shell: # Code from module printf-frexp: # Code from module printf-frexp-tests: # Code from module printf-frexpl: # Code from module printf-frexpl-tests: # Code from module printf-posix: # Code from module printf-posix-tests: # Code from module printf-safe: # Code from module progname: # Code from module putenv: # Code from module quote: # Code from module quotearg: # Code from module quotearg-simple: # Code from module quotearg-simple-tests: # Code from module readdir: # Code from module readme-release: # Code from module realloc: # Code from module realloc-gnu: # Code from module realloc-gnu-tests: # Code from module realloc-posix: # Code from module regex: # Code from module rewinddir: # Code from module same-inode: # Code from module save-cwd: # Code from module setenv: # Code from module setenv-tests: # Code from module setlocale: # Code from module setlocale-tests: # Code from module signbit: # Code from module signbit-tests: # Code from module size_max: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-tests: # Code from module sprintf-posix: # Code from module sprintf-posix-tests: # Code from module ssize_t: # Code from module stat: # Code from module stat-macros: # Code from module stat-tests: # Code from module stdbool: # Code from module stdbool-tests: # Code from module stddef: # Code from module stddef-tests: # Code from module stdint: # Code from module stdint-tests: # Code from module stdio: # Code from module stdio-tests: # Code from module stdlib: # Code from module stdlib-tests: # Code from module strcase: # Code from module strcasestr: # Code from module strcasestr-simple: # Code from module strcasestr-tests: # Code from module strdup-posix: # Code from module streq: # Code from module strerror: # Code from module strerror-override: # Code from module strerror-tests: # Code from module string: # Code from module string-tests: # Code from module strings: # Code from module strings-tests: # Code from module strndup: # Code from module strnlen: # Code from module strnlen-tests: # Code from module strnlen1: # Code from module strsep: # Code from module symlink: # Code from module symlink-tests: # Code from module sys_ioctl: # Code from module sys_ioctl-tests: # Code from module sys_stat: # Code from module sys_stat-tests: # Code from module sys_types: # Code from module sys_types-tests: # Code from module test-framework-sh: # Code from module test-framework-sh-tests: # Code from module thread: # Code from module thread-tests: # Code from module threadlib: # Code from module time: # Code from module time-tests: # Code from module unistd: # Code from module unistd-safer: # Code from module unistd-safer-tests: # Code from module unistd-tests: # Code from module unitypes: # Code from module uniwidth/base: # Code from module uniwidth/width: # Code from module uniwidth/width-tests: # Code from module unsetenv: # Code from module unsetenv-tests: # Code from module update-copyright: # Code from module update-copyright-tests: # Code from module useless-if-before-free: # Code from module vasnprintf: # Code from module vasnprintf-tests: # Code from module vc-list-files: # Code from module vc-list-files-tests: # Code from module verify: # Code from module verify-tests: # Code from module vfprintf-posix: # Code from module vfprintf-posix-tests: # Code from module vma-iter: # Code from module warnings: # Code from module wchar: # Code from module wchar-tests: # Code from module wcrtomb: # Code from module wcrtomb-tests: # Code from module wctob: # Code from module wctomb: # Code from module wctype-h: # Code from module wctype-h-tests: # Code from module wcwidth: # Code from module wcwidth-tests: # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-die-tests: # Code from module xalloc-oversized: # Code from module xgetcwd: # Code from module xsize: # Code from module xstrndup: # Code from module yield: LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac GNULIB_BTOWC=0; GNULIB_WCTOB=0; GNULIB_MBSINIT=0; GNULIB_MBRTOWC=0; GNULIB_MBRLEN=0; GNULIB_MBSRTOWCS=0; GNULIB_MBSNRTOWCS=0; GNULIB_WCRTOMB=0; GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; GNULIB_WMEMCHR=0; GNULIB_WMEMCMP=0; GNULIB_WMEMCPY=0; GNULIB_WMEMMOVE=0; GNULIB_WMEMSET=0; GNULIB_WCSLEN=0; GNULIB_WCSNLEN=0; GNULIB_WCSCPY=0; GNULIB_WCPCPY=0; GNULIB_WCSNCPY=0; GNULIB_WCPNCPY=0; GNULIB_WCSCAT=0; GNULIB_WCSNCAT=0; GNULIB_WCSCMP=0; GNULIB_WCSNCMP=0; GNULIB_WCSCASECMP=0; GNULIB_WCSNCASECMP=0; GNULIB_WCSCOLL=0; GNULIB_WCSXFRM=0; GNULIB_WCSDUP=0; GNULIB_WCSCHR=0; GNULIB_WCSRCHR=0; GNULIB_WCSCSPN=0; GNULIB_WCSSPN=0; GNULIB_WCSPBRK=0; GNULIB_WCSSTR=0; GNULIB_WCSTOK=0; GNULIB_WCSWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; HAVE_MBRLEN=1; HAVE_MBSRTOWCS=1; HAVE_MBSNRTOWCS=1; HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; HAVE_WMEMCHR=1; HAVE_WMEMCMP=1; HAVE_WMEMCPY=1; HAVE_WMEMMOVE=1; HAVE_WMEMSET=1; HAVE_WCSLEN=1; HAVE_WCSNLEN=1; HAVE_WCSCPY=1; HAVE_WCPCPY=1; HAVE_WCSNCPY=1; HAVE_WCPNCPY=1; HAVE_WCSCAT=1; HAVE_WCSNCAT=1; HAVE_WCSCMP=1; HAVE_WCSNCMP=1; HAVE_WCSCASECMP=1; HAVE_WCSNCASECMP=1; HAVE_WCSCOLL=1; HAVE_WCSXFRM=1; HAVE_WCSDUP=1; HAVE_WCSCHR=1; HAVE_WCSRCHR=1; HAVE_WCSCSPN=1; HAVE_WCSSPN=1; HAVE_WCSPBRK=1; HAVE_WCSSTR=1; HAVE_WCSTOK=1; HAVE_WCSWIDTH=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; REPLACE_WCTOB=0; REPLACE_MBSINIT=0; REPLACE_MBRTOWC=0; REPLACE_MBRLEN=0; REPLACE_MBSRTOWCS=0; REPLACE_MBSNRTOWCS=0; REPLACE_WCRTOMB=0; REPLACE_WCSRTOMBS=0; REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } if ${gl_cv_header_wchar_h_correct_inline+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include extern int zero (void); int main () { return zero(); } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then mv conftest.$ac_objext conftest1.$ac_objext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int zero (void) { return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } if test $gl_cv_header_wchar_h_correct_inline = no; then as_fn_error $? " cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." "$LINENO" 5 fi for ac_func in $ac_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MBTOWC=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; GNULIB_POSIX_OPENPT=0; GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_SYSTEM_POSIX=0; GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; GNULIB_WCTOMB=0; HAVE__EXIT=1; HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; HAVE_PTSNAME_R=1; HAVE_RANDOM=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; HAVE_DECL_UNSETENV=1; REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; REPLACE_WCTOMB=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } if ${gl_cv_func_malloc_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_malloc_posix=yes else gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 $as_echo "$gl_cv_func_malloc_posix" >&6; } GNULIB_CHDIR=0; GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; GNULIB_FDATASYNC=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETGROUPS=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_GROUP_MEMBER=0; GNULIB_ISATTY=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; GNULIB_PIPE=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; GNULIB_READ=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SETHOSTNAME=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; GNULIB_USLEEP=0; GNULIB_WRITE=0; HAVE_CHOWN=1; HAVE_DUP2=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; HAVE_FDATASYNC=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; HAVE_GROUP_MEMBER=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_FCHDIR=1; HAVE_DECL_FDATASYNC=1; HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; HAVE_DECL_SETHOSTNAME=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_ISATTY=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func__set_invalid_parameter_handler = yes; then HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h else HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 fi GNULIB_IOCTL=0; SYS_IOCTL_H_HAVE_WINSOCK2_H=0; SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; REPLACE_IOCTL=0; GNULIB_OPENDIR=0; GNULIB_READDIR=0; GNULIB_REWINDDIR=0; GNULIB_CLOSEDIR=0; GNULIB_DIRFD=0; GNULIB_FDOPENDIR=0; GNULIB_SCANDIR=0; GNULIB_ALPHASORT=0; HAVE_OPENDIR=1; HAVE_READDIR=1; HAVE_REWINDDIR=1; HAVE_CLOSEDIR=1; HAVE_DECL_DIRFD=1; HAVE_DECL_FDOPENDIR=1; HAVE_FDOPENDIR=1; HAVE_SCANDIR=1; HAVE_ALPHASORT=1; REPLACE_OPENDIR=0; REPLACE_CLOSEDIR=0; REPLACE_DIRFD=0; REPLACE_FDOPENDIR=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_have_include_next=yes else CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_have_include_next=buggy else gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __TANDEM choke me #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "choke me" >/dev/null 2>&1; then : gl_cv_pragma_columns=yes else gl_cv_pragma_columns=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 $as_echo "$gl_cv_pragma_columns" >&6; } if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 $as_echo "$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } if ${gl_cv_header_errno_h_complete+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ENETRESET booboo #endif #if !defined ECONNABORTED booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then : gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 $as_echo "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_errno_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'errno.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_errno_h fi NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then GL_GENERATE_ERRNO_H_TRUE= GL_GENERATE_ERRNO_H_FALSE='#' else GL_GENERATE_ERRNO_H_TRUE='#' GL_GENERATE_ERRNO_H_FALSE= fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } if ${gl_cv_header_errno_h_ENOLINK+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R $ac_have_decl _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi XGETTEXT_EXTRA_OPTIONS= ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" if test "x$ac_cv_have_decl_fchdir" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FCHDIR $ac_have_decl _ACEOF GNULIB_FCNTL=0; GNULIB_NONBLOCKING=0; GNULIB_OPEN=0; GNULIB_OPENAT=0; HAVE_FCNTL=1; HAVE_OPENAT=1; REPLACE_FCNTL=0; REPLACE_OPEN=0; REPLACE_OPENAT=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 $as_echo_n "checking for working fcntl.h... " >&6; } if ${gl_cv_header_working_fcntl_h+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_header_working_fcntl_h=cross-compiling else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include # include # defined sleep(n) _sleep ((n) * 1000) #endif #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; int main () { int result = !constants; #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_fcntl_h=yes else case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 $as_echo "$gl_cv_header_working_fcntl_h" >&6; } case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOATIME $ac_val _ACEOF case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FDOPEN=0; GNULIB_FFLUSH=0; GNULIB_FGETC=0; GNULIB_FGETS=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; GNULIB_FREAD=0; GNULIB_FREOPEN=0; GNULIB_FSCANF=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; GNULIB_GETC=0; GNULIB_GETCHAR=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_GETS=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; GNULIB_PCLOSE=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; GNULIB_PRINTF_POSIX=0; GNULIB_PUTC=0; GNULIB_PUTCHAR=0; GNULIB_PUTS=0; GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; GNULIB_SCANF=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; GNULIB_STDIO_H_NONBLOCKING=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_TMPFILE=0; GNULIB_VASPRINTF=0; GNULIB_VFSCANF=0; GNULIB_VSCANF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; GNULIB_VPRINTF=0; GNULIB_VPRINTF_POSIX=0; GNULIB_VSNPRINTF=0; GNULIB_VSPRINTF_POSIX=0; HAVE_DECL_FPURGE=1; HAVE_DECL_FSEEKO=1; HAVE_DECL_FTELLO=1; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; HAVE_DECL_OBSTACK_PRINTF=1; HAVE_DECL_SNPRINTF=1; HAVE_DECL_VSNPRINTF=1; HAVE_DPRINTF=1; HAVE_FSEEKO=1; HAVE_FTELLO=1; HAVE_PCLOSE=1; HAVE_POPEN=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; REPLACE_FDOPEN=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; REPLACE_FPURGE=0; REPLACE_FREOPEN=0; REPLACE_FSEEK=0; REPLACE_FSEEKO=0; REPLACE_FTELL=0; REPLACE_FTELLO=0; REPLACE_GETDELIM=0; REPLACE_GETLINE=0; REPLACE_OBSTACK_PRINTF=0; REPLACE_PERROR=0; REPLACE_POPEN=0; REPLACE_PRINTF=0; REPLACE_REMOVE=0; REPLACE_RENAME=0; REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; REPLACE_STDIO_READ_FUNCS=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_TMPFILE=0; REPLACE_VASPRINTF=0; REPLACE_VDPRINTF=0; REPLACE_VFPRINTF=0; REPLACE_VPRINTF=0; REPLACE_VSNPRINTF=0; REPLACE_VSPRINTF=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } if ${ac_cv_type_mbstate_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { mbstate_t x; return sizeof x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_mbstate_t=yes else ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 $as_echo "$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h else $as_echo "#define mbstate_t int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_stdint_h=yes else gl_cv_header_stdint_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 $as_echo "$gl_cv_header_stdint_h" >&6; } if test $gl_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_inttypes_h=yes else gl_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 $as_echo "$gl_cv_header_inttypes_h" >&6; } if test $gl_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; } if ${gl_cv_func_printf_sizes_c99+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { int result = 0; #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) result |= 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) result |= 4; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) result |= 8; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_sizes_c99=yes else gl_cv_func_printf_sizes_c99=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; } if ${gl_cv_func_printf_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; *) gl_cv_func_printf_long_double="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[10000]; int main () { int result = 0; buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) result |= 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) result |= 4; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_long_double=yes else gl_cv_func_printf_long_double=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5 $as_echo "$gl_cv_func_printf_long_double" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; } if ${gl_cv_func_printf_infinite+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%f", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%f", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%e", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 4; if (sprintf (buf, "%e", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 4; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%g", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 16; if (sprintf (buf, "%g", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 16; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) result |= 64; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_infinite=yes else gl_cv_func_printf_infinite=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5 $as_echo "$gl_cv_func_printf_infinite" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 $as_echo_n "checking whether long double and double are the same... " >&6; } if ${gl_cv_long_double_equals_double+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { typedef int check[sizeof (long double) == sizeof (double) && LDBL_MANT_DIG == DBL_MANT_DIG && LDBL_MAX_EXP == DBL_MAX_EXP && LDBL_MIN_EXP == DBL_MIN_EXP ? 1 : -1]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_long_double_equals_double=yes else gl_cv_long_double_equals_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 $as_echo "$gl_cv_long_double_equals_double" >&6; } if test $gl_cv_long_double_equals_double = yes; then $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 else HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 fi if test -n "$gl_printf_safe"; then $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h fi case "$gl_cv_func_printf_long_double" in *yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; } if ${gl_cv_func_printf_infinite_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include #include static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { int result = 0; nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 4; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 16; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 64; } #endif return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_infinite_long_double=yes else gl_cv_func_printf_infinite_long_double=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; } ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; } if ${gl_cv_func_printf_directive_a+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ BZ2908 #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "BZ2908" >/dev/null 2>&1; then : gl_cv_func_printf_directive_a="guessing yes" else gl_cv_func_printf_directive_a="guessing no" fi rm -f conftest* ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) result |= 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) result |= 2; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) result |= 4; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 || buf[0] == '0') result |= 8; /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 16; /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 32; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_directive_a=yes else gl_cv_func_printf_directive_a=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5 $as_echo "$gl_cv_func_printf_directive_a" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; } if ${gl_cv_func_printf_directive_f+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) result |= 1; if (sprintf (buf, "%F", 1.0 / zero) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) result |= 2; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) result |= 4; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_directive_f=yes else gl_cv_func_printf_directive_f=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5 $as_echo "$gl_cv_func_printf_directive_f" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; } if ${gl_cv_func_printf_directive_n+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) gl_cv_func_printf_directive_n="guessing no";; *) gl_cv_func_printf_directive_n="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef _MSC_VER /* See page about "Parameter Validation" on msdn.microsoft.com. */ static void cdecl invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { exit (1); } #endif static char fmtstring[10]; static char buf[100]; int main () { int count = -1; #ifdef _MSC_VER _set_invalid_parameter_handler (invalid_parameter_handler); #endif /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_directive_n=yes else gl_cv_func_printf_directive_n=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5 $as_echo "$gl_cv_func_printf_directive_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; } if ${gl_cv_func_printf_directive_ls+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { int result = 0; char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) result |= 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) result |= 2; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) result |= 8; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_directive_ls=yes else gl_cv_func_printf_directive_ls=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5 $as_echo "$gl_cv_func_printf_directive_ls" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } if ${gl_cv_func_printf_positions+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_positions=yes else gl_cv_func_printf_positions=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 $as_echo "$gl_cv_func_printf_positions" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5 $as_echo_n "checking whether printf supports the grouping flag... " >&6; } if ${gl_cv_func_printf_flag_grouping+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_flag_grouping=yes else gl_cv_func_printf_flag_grouping=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; } if ${gl_cv_func_printf_flag_leftadjust+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_flag_leftadjust=yes else gl_cv_func_printf_flag_leftadjust=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; } if ${gl_cv_func_printf_flag_zero+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[100]; static double zero = 0.0; int main () { if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_flag_zero=yes else gl_cv_func_printf_flag_zero=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5 $as_echo "$gl_cv_func_printf_flag_zero" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5 $as_echo_n "checking whether printf supports large precisions... " >&6; } if ${gl_cv_func_printf_precision+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess no only on Solaris, native Windows, and BeOS systems. solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include static char buf[5000]; int main () { int result = 0; #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) result |= 1; if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) result |= 2; if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 || buf[0] != '1') result |= 4; if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 || buf[0] != '1') result |= 4; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_precision=yes else gl_cv_func_printf_precision=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5 $as_echo "$gl_cv_func_printf_precision" >&6; } gl_cv_c_multiarch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; } if ${gl_cv_func_printf_enomem+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data1024; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include #include static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then (./conftest result=$? if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5 $as_echo "$gl_cv_func_printf_enomem" >&6; } case "$gl_cv_func_printf_long_double" in *yes) ;; *) $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_type_long_long_int=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_wchar_t=yes else gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_wint_t=yes else gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then $as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } if ${gt_cv_c_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif int main () { intmax_t x = -1; return !x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_intmax_t=yes else gt_cv_c_intmax_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 $as_echo "$gt_cv_c_intmax_t" >&6; } if test $gt_cv_c_intmax_t = yes; then $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h else test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' cat >>confdefs.h <<_ACEOF #define intmax_t $ac_type _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } if ${gl_cv_cc_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "mixed_endianness" >/dev/null 2>&1; then : gl_cv_cc_double_expbit0="unknown" else : if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi : case $ac_cv_c_bigendian in #( yes) gl_cv_cc_double_expbit0="word 0 bit 20";; #( no) gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) gl_cv_cc_double_expbit0="unknown" ;; esac fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_double_expbit0=`cat conftest.out` else gl_cv_cc_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 $as_echo "$gl_cv_cc_double_expbit0" >&6; } case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } if ${gl_cv_func_snprintf_retval_c99+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) return 2; if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) return 3; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_snprintf_retval_c99=yes else gl_cv_func_snprintf_retval_c99=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include " if test "x$ac_cv_have_decl__snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF $ac_have_decl _ACEOF case "$gl_cv_func_snprintf_retval_c99" in *yes) $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h ;; esac GNULIB_ACOSF=0; GNULIB_ACOSL=0; GNULIB_ASINF=0; GNULIB_ASINL=0; GNULIB_ATANF=0; GNULIB_ATANL=0; GNULIB_ATAN2F=0; GNULIB_CEIL=0; GNULIB_CEILF=0; GNULIB_CEILL=0; GNULIB_COPYSIGN=0; GNULIB_COPYSIGNF=0; GNULIB_COPYSIGNL=0; GNULIB_COSF=0; GNULIB_COSL=0; GNULIB_COSHF=0; GNULIB_EXPF=0; GNULIB_EXPL=0; GNULIB_FABSF=0; GNULIB_FLOOR=0; GNULIB_FLOORF=0; GNULIB_FLOORL=0; GNULIB_FMA=0; GNULIB_FMAF=0; GNULIB_FMAL=0; GNULIB_FMODF=0; GNULIB_FREXPF=0; GNULIB_FREXP=0; GNULIB_FREXPL=0; GNULIB_ISFINITE=0; GNULIB_ISINF=0; GNULIB_ISNAN=0; GNULIB_ISNANF=0; GNULIB_ISNAND=0; GNULIB_ISNANL=0; GNULIB_LDEXPF=0; GNULIB_LDEXPL=0; GNULIB_LOGB=0; GNULIB_LOGF=0; GNULIB_LOGL=0; GNULIB_LOG10F=0; GNULIB_MODFF=0; GNULIB_POWF=0; GNULIB_RINT=0; GNULIB_RINTF=0; GNULIB_RINTL=0; GNULIB_ROUND=0; GNULIB_ROUNDF=0; GNULIB_ROUNDL=0; GNULIB_SIGNBIT=0; GNULIB_SINF=0; GNULIB_SINL=0; GNULIB_SINHF=0; GNULIB_SQRTF=0; GNULIB_SQRTL=0; GNULIB_TANF=0; GNULIB_TANL=0; GNULIB_TANHF=0; GNULIB_TRUNC=0; GNULIB_TRUNCF=0; GNULIB_TRUNCL=0; HAVE_ACOSF=1; HAVE_ACOSL=1; HAVE_ASINF=1; HAVE_ASINL=1; HAVE_ATANF=1; HAVE_ATANL=1; HAVE_ATAN2F=1; HAVE_COPYSIGN=1; HAVE_COPYSIGNF=1; HAVE_COPYSIGNL=1; HAVE_COSF=1; HAVE_COSL=1; HAVE_COSHF=1; HAVE_EXPF=1; HAVE_EXPL=1; HAVE_FABSF=1; HAVE_FMA=1; HAVE_FMAF=1; HAVE_FMAL=1; HAVE_FMODF=1; HAVE_FREXPF=1; HAVE_ISNANF=1; HAVE_ISNAND=1; HAVE_ISNANL=1; HAVE_LDEXPF=1; HAVE_LOGF=1; HAVE_LOGL=1; HAVE_LOG10F=1; HAVE_MODFF=1; HAVE_POWF=1; HAVE_RINT=1; HAVE_RINTF=1; HAVE_RINTL=1; HAVE_SINF=1; HAVE_SINL=1; HAVE_SINHF=1; HAVE_SQRTF=1; HAVE_SQRTL=1; HAVE_TANF=1; HAVE_TANL=1; HAVE_TANHF=1; HAVE_DECL_ACOSL=1; HAVE_DECL_ASINL=1; HAVE_DECL_ATANL=1; HAVE_DECL_CEILF=1; HAVE_DECL_CEILL=1; HAVE_DECL_COSL=1; HAVE_DECL_EXPL=1; HAVE_DECL_FLOORF=1; HAVE_DECL_FLOORL=1; HAVE_DECL_FREXPL=1; HAVE_DECL_LDEXPL=1; HAVE_DECL_LOGB=1; HAVE_DECL_LOGL=1; HAVE_DECL_ROUND=1; HAVE_DECL_ROUNDF=1; HAVE_DECL_ROUNDL=1; HAVE_DECL_SINL=1; HAVE_DECL_SQRTL=1; HAVE_DECL_TANL=1; HAVE_DECL_TRUNC=1; HAVE_DECL_TRUNCF=1; HAVE_DECL_TRUNCL=1; REPLACE_CEIL=0; REPLACE_CEILF=0; REPLACE_CEILL=0; REPLACE_FLOOR=0; REPLACE_FLOORF=0; REPLACE_FLOORL=0; REPLACE_FMA=0; REPLACE_FMAF=0; REPLACE_FMAL=0; REPLACE_FREXPF=0; REPLACE_FREXP=0; REPLACE_FREXPL=0; REPLACE_HUGE_VAL=0; REPLACE_ISFINITE=0; REPLACE_ISINF=0; REPLACE_ISNAN=0; REPLACE_LDEXPL=0; REPLACE_NAN=0; REPLACE_ROUND=0; REPLACE_ROUNDF=0; REPLACE_ROUNDL=0; REPLACE_SIGNBIT=0; REPLACE_SIGNBIT_USING_GCC=0; REPLACE_TRUNC=0; REPLACE_TRUNCF=0; REPLACE_TRUNCL=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } if ${gl_cv_func_frexp_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include double x; int main () { int e; return frexp (x, &e) > 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_frexp_no_libm=yes else gl_cv_func_frexp_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 $as_echo "$gl_cv_func_frexp_no_libm" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; } if ${gl_cv_var_stdin_large_offset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_var_stdin_large_offset=yes else gl_cv_var_stdin_large_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5 $as_echo "$gl_cv_var_stdin_large_offset" >&6; } ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" if test "x$ac_cv_have_decl_fseeko" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FSEEKO $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 $as_echo_n "checking for fseeko... " >&6; } if ${gl_cv_func_fseeko+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { fseeko (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_fseeko=yes else gl_cv_func_fseeko=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 $as_echo "$gl_cv_func_fseeko" >&6; } if test $ac_cv_have_decl_fseeko = no; then HAVE_DECL_FSEEKO=0 fi if test $gl_cv_func_fseeko = no; then HAVE_FSEEKO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FSEEKO=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 $as_echo_n "checking whether fflush works on input streams... " >&6; } if ${gl_cv_func_fflush_stdin+:} false; then : $as_echo_n "(cached) " >&6 else echo hello world > conftest.txt if test "$cross_compiling" = yes; then : gl_cv_func_fflush_stdin=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif int main () { FILE *f = fopen ("conftest.txt", "r"); char buffer[10]; int fd; int c; if (f == NULL) return 1; fd = fileno (f); if (fd < 0 || fread (buffer, 1, 5, f) != 5) return 2; /* For deterministic results, ensure f read a bigger buffer. */ if (lseek (fd, 0, SEEK_CUR) == 5) return 3; /* POSIX requires fflush-fseek to set file offset of fd. This fails on BSD systems and on mingw. */ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) return 4; if (lseek (fd, 0, SEEK_CUR) != 5) return 5; /* Verify behaviour of fflush after ungetc. See */ /* Verify behaviour of fflush after a backup ungetc. This fails on mingw. */ c = fgetc (f); ungetc (c, f); fflush (f); if (fgetc (f) != c) return 6; /* Verify behaviour of fflush after a non-backup ungetc. This fails on glibc 2.8 and on BSD systems. */ c = fgetc (f); ungetc ('@', f); fflush (f); if (fgetc (f) != c) return 7; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fflush_stdin=yes else gl_cv_func_fflush_stdin=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm conftest.txt fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 $as_echo "$gl_cv_func_fflush_stdin" >&6; } if test $gl_cv_func_fflush_stdin = no; then REPLACE_FSEEKO=1 fi fi GNULIB_FCHMODAT=0; GNULIB_FSTAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; GNULIB_LCHMOD=0; GNULIB_LSTAT=0; GNULIB_MKDIRAT=0; GNULIB_MKFIFO=0; GNULIB_MKFIFOAT=0; GNULIB_MKNOD=0; GNULIB_MKNODAT=0; GNULIB_STAT=0; GNULIB_UTIMENSAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; HAVE_LCHMOD=1; HAVE_LSTAT=1; HAVE_MKDIRAT=1; HAVE_MKFIFO=1; HAVE_MKFIFOAT=1; HAVE_MKNOD=1; HAVE_MKNODAT=1; HAVE_UTIMENSAT=1; REPLACE_FSTAT=0; REPLACE_FSTATAT=0; REPLACE_FUTIMENS=0; REPLACE_LSTAT=0; REPLACE_MKDIR=0; REPLACE_MKFIFO=0; REPLACE_MKNOD=0; REPLACE_STAT=0; REPLACE_UTIMENSAT=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : # When cross-compiling, be pessimistic so we will end up using the # replacement version of lstat that checks for trailing slashes and # calls lstat a second time when necessary. gl_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_lstat_dereferences_slashed_symlink=yes else gl_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. gl_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" if test "x$ac_cv_have_decl_ftello" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FTELLO $ac_have_decl _ACEOF if test $ac_cv_have_decl_ftello = no; then HAVE_DECL_FTELLO=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 $as_echo_n "checking for ftello... " >&6; } if ${gl_cv_func_ftello+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ftello (stdin); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_ftello=yes else gl_cv_func_ftello=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 $as_echo "$gl_cv_func_ftello" >&6; } if test $gl_cv_func_ftello = no; then HAVE_FTELLO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FTELLO=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 $as_echo_n "checking whether ftello works... " >&6; } if ${gl_cv_func_ftello_works+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_ftello_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_ftello_works="guessing yes" ;; esac if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #define TESTFILE "conftest.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) return 70; if (fwrite ("foogarsh", 1, 8, fp) < 8) return 71; if (fclose (fp)) return 72; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) return 73; if (fseek (fp, -1, SEEK_END)) return 74; if (!(getc (fp) == 'h')) return 1; if (!(getc (fp) == EOF)) return 2; if (!(ftell (fp) == 8)) return 3; if (!(ftell (fp) == 8)) return 4; if (!(putc ('!', fp) == '!')) return 5; if (!(ftell (fp) == 9)) return 6; if (!(fclose (fp) == 0)) return 7; fp = fopen (TESTFILE, "r"); if (fp == NULL) return 75; { char buf[10]; if (!(fread (buf, 1, 10, fp) == 9)) return 10; if (!(memcmp (buf, "foogarsh!", 9) == 0)) return 11; } if (!(fclose (fp) == 0)) return 12; /* The file's contents is now "foogarsh!". */ return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_ftello_works=yes else gl_cv_func_ftello_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 $as_echo "$gl_cv_func_ftello_works" >&6; } case "$gl_cv_func_ftello_works" in *yes) ;; *) REPLACE_FTELLO=1 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } if ${gl_cv_func_getcwd_null+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_getcwd_null="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_getcwd_null="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_getcwd_null="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # if HAVE_UNISTD_H # include # else /* on Windows with MSVC */ # include # endif # ifndef getcwd char *getcwd (); # endif int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else if (chdir ("/") != 0) return 1; else { char *f = getcwd (NULL, 0); if (! f) return 2; if (f[0] != '/') return 3; if (f[1] != '\0') return 4; return 0; } #endif ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getcwd_null=yes else gl_cv_func_getcwd_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 $as_echo "$gl_cv_func_getcwd_null" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 $as_echo_n "checking for getcwd with POSIX signature... " >&6; } if ${gl_cv_func_getcwd_posix_signature+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { extern #ifdef __cplusplus "C" #endif char *getcwd (char *, size_t); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_getcwd_posix_signature=yes else gl_cv_func_getcwd_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" if test "x$ac_cv_have_decl_getcwd" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETCWD $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" if test "x$ac_cv_have_decl_getdelim" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDELIM $ac_have_decl _ACEOF if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_getopt_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_getopt_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'getopt.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 $as_echo "$gl_cv_next_getopt_h" >&6; } fi NEXT_GETOPT_H=$gl_cv_next_getopt_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'getopt.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_getopt_h fi NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi gl_replace_getopt= if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" if test "x$ac_cv_func_getopt_long_only" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } if ${gl_cv_func_getopt_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int *p = &optreset; return optreset; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_optind_min=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !getopt_clip; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_optind_min=1 else gl_optind_min=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { { static char program[] = "program"; static char a[] = "-a"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, a, foo, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (4, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (4, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { static char program[] = "program"; static char donald[] = "donald"; static char p[] = "-p"; static char billy[] = "billy"; static char duck[] = "duck"; static char a[] = "-a"; static char bar[] = "bar"; char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (7, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { static char program[] = "program"; static char ab[] = "-ab"; char *argv[3] = { program, ab, NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getopt_posix=yes else gl_cv_func_getopt_posix=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CPPFLAGS=$gl_save_CPPFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 $as_echo "$gl_cv_func_getopt_posix" >&6; } case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } if ${gl_cv_func_getopt_gnu+:} false; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include #include static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif int main () { int result = 0; nocrash_init(); /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { static char conftest[] = "conftest"; static char plus[] = "-+"; char *argv[3] = { conftest, plus, NULL }; opterr = 0; if (getopt (2, argv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { static char program[] = "program"; static char p[] = "-p"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { static char program[] = "program"; static char foo[] = "foo"; static char p[] = "-p"; char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { static char program[] = "program"; static char b[] = "-b"; static char a[] = "-a"; char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } /* This code dumps core on glibc 2.14. */ { static char program[] = "program"; static char w[] = "-W"; static char dummy[] = "dummy"; char *argv[] = { program, w, dummy, NULL }; optind = opterr = 1; if (getopt (3, argv, "W;") != 'W') result |= 128; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getopt_gnu=yes else gl_cv_func_getopt_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi case $gl_had_POSIXLY_CORRECT in exported) ;; yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 $as_echo "$gl_cv_func_getopt_gnu" >&6; } if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then : REPLACE_GETOPT=1 fi if test $REPLACE_GETOPT = 1; then GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" if test "x$ac_cv_have_decl_getenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV $ac_have_decl _ACEOF ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if ${gl_cv_cc_float_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_float_expbit0="word 0 bit 23" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_float_expbit0=`cat conftest.out` else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac GNULIB_ISWBLANK=0; GNULIB_WCTYPE=0; GNULIB_ISWCTYPE=0; GNULIB_WCTRANS=0; GNULIB_TOWCTRANS=0; HAVE_ISWBLANK=1; HAVE_WCTYPE_T=1; HAVE_WCTRANS_T=1; REPLACE_ISWBLANK=0; if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_wctype_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wctype_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'wctype.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 $as_echo "$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wctype.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wctype_h fi NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 $as_echo_n "checking whether iswcntrl works... " >&6; } if ${gl_cv_func_iswcntrl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_iswcntrl_works=yes else gl_cv_func_iswcntrl_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_iswcntrl_works=yes else gl_cv_func_iswcntrl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : fi if test $REPLACE_ISWCNTRL = 1; then REPLACE_TOWLOWER=1 else for ac_func in towlower do : ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" if test "x$ac_cv_func_towlower" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOWLOWER 1 _ACEOF fi done if test $ac_cv_func_towlower = yes; then REPLACE_TOWLOWER=0 else ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif " if test "x$ac_cv_have_decl_towlower" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TOWLOWER $ac_have_decl _ACEOF if test $ac_cv_have_decl_towlower = yes; then REPLACE_TOWLOWER=1 else REPLACE_TOWLOWER=0 fi fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 $as_echo_n "checking for wctype_t... " >&6; } if ${gl_cv_type_wctype_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif wctype_t a; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_type_wctype_t=yes else gl_cv_type_wctype_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 $as_echo "$gl_cv_type_wctype_t" >&6; } if test $gl_cv_type_wctype_t = no; then HAVE_WCTYPE_T=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 $as_echo_n "checking for wctrans_t... " >&6; } if ${gl_cv_type_wctrans_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include wctrans_t a; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_type_wctrans_t=yes else gl_cv_type_wctrans_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 $as_echo "$gl_cv_type_wctrans_t" >&6; } if test $gl_cv_type_wctrans_t = no; then HAVE_WCTRANS_T=0 fi for gl_func in wctype iswctype wctrans towctrans ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done GNULIB_NL_LANGINFO=0; HAVE_NL_LANGINFO=1; REPLACE_NL_LANGINFO=0; ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky" >/dev/null 2>&1; then : ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 GNULIB_FFSL=0; GNULIB_FFSLL=0; GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNCAT=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRERROR_R=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; HAVE_FFSL=1; HAVE_FFSLL=1; HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR_R=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STPNCPY=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRCHRNUL=0; REPLACE_STRERROR=0; REPLACE_STRERROR_R=0; REPLACE_STRNCAT=0; REPLACE_STRNDUP=0; REPLACE_STRNLEN=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } if ${gl_cv_func_memchr_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_memchr_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif int main () { int result = 0; char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) result |= 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) result |= 2; if (memchr (fence - 1, 0, 3) != fence - 1) result |= 4; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_memchr_works=yes else gl_cv_func_memchr_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then REPLACE_MEMCHR=1 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" if test "x$ac_cv_have_decl_memrchr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMRCHR $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 $as_echo_n "checking for promoted mode_t type... " >&6; } if ${gl_cv_promoted_mode_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_promoted_mode_t='int' else gl_cv_promoted_mode_t='mode_t' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 $as_echo "$gl_cv_promoted_mode_t" >&6; } cat >>confdefs.h <<_ACEOF #define PROMOTED_MODE_T $gl_cv_promoted_mode_t _ACEOF gl_cv_func_vfprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # vfprintf exists and is # already POSIX compliant. gl_cv_func_vfprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vfprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else $as_echo "#define ptrdiff_t long" >>confdefs.h fi gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext" REPLACE_VFPRINTF=1 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h : fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _MSC_VER MicrosoftCompiler #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then : gl_asmext='asm' gl_c_asm_opt='-c -Fa' else gl_asmext='s' gl_c_asm_opt='-S' fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; } if ${gl_cv_prog_as_underscore+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } >/dev/null 2>&1 if grep _foo conftest.$gl_asmext >/dev/null ; then gl_cv_prog_as_underscore=yes else gl_cv_prog_as_underscore=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5 $as_echo "$gl_cv_prog_as_underscore" >&6; } if test $gl_cv_prog_as_underscore = yes; then USER_LABEL_PREFIX=_ else USER_LABEL_PREFIX= fi cat >>confdefs.h <<_ACEOF #define USER_LABEL_PREFIX $USER_LABEL_PREFIX _ACEOF ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stdint.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if ${gl_cv_header_working_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if test "$cross_compiling" = yes; then : gl_cv_header_working_stdint_h=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if eval \${gl_cv_type_${gltype}_signed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : result=yes else result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi eval ac_res=\$gl_cv_type_${gltype}_signed { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done if test $BITSIZEOF_WINT_T -lt 32; then BITSIZEOF_WINT_T=32 fi STDINT_H=stdint.h fi if test -n "$STDINT_H"; then GL_GENERATE_STDINT_H_TRUE= GL_GENERATE_STDINT_H_FALSE='#' else GL_GENERATE_STDINT_H_TRUE='#' GL_GENERATE_STDINT_H_FALSE= fi GNULIB_FFS=0; HAVE_FFS=1; HAVE_STRCASECMP=1; HAVE_DECL_STRNCASECMP=1; for ac_func in strcasestr do : ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRCASESTR 1 _ACEOF fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 $as_echo_n "checking whether strcasestr works... " >&6; } if ${gl_cv_func_strcasestr_works_always+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ || defined __UCLIBC__ Lucky user #endif #elif defined __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #else Lucky user #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then : gl_cv_func_strcasestr_works_always=yes else gl_cv_func_strcasestr_works_always="guessing no" fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for strcasestr */ #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P int main () { return !!strcasestr (HAYSTACK, NEEDLE); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strcasestr_works_always=yes else gl_cv_func_strcasestr_works_always=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; } if test "$gl_cv_func_strcasestr_works_always" != yes; then REPLACE_STRCASESTR=1 fi fi fi ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" if test "x$ac_cv_have_decl_strdup" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP $ac_have_decl _ACEOF REPLACE_STRERROR_0=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 $as_echo_n "checking whether strerror(0) succeeds... " >&6; } if ${gl_cv_func_strerror_0_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_strerror_0_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; char *str; errno = 0; str = strerror (0); if (!*str) result |= 1; if (errno) result |= 2; if (strstr (str, "nknown") || strstr (str, "ndefined")) result |= 4; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strerror_0_works=yes else gl_cv_func_strerror_0_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 $as_echo "$gl_cv_func_strerror_0_works" >&6; } if test "$gl_cv_func_strerror_0_works" != yes; then REPLACE_STRERROR_0=1 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h fi if test $ac_cv_func_strerror_r = yes; then if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; } if ${gl_cv_func_strerror_r_posix_signature+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int strerror_r (int, char *, size_t); int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_strerror_r_posix_signature=yes else gl_cv_func_strerror_r_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } if test $gl_cv_func_strerror_r_posix_signature = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 $as_echo_n "checking whether strerror_r works... " >&6; } if ${gl_cv_func_strerror_r_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess no on AIX. aix*) gl_cv_func_strerror_r_works="guessing no";; # Guess no on HP-UX. hpux*) gl_cv_func_strerror_r_works="guessing no";; # Guess no on BSD variants. *bsd*) gl_cv_func_strerror_r_works="guessing no";; # Guess yes otherwise. *) gl_cv_func_strerror_r_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; char buf[79]; if (strerror_r (EACCES, buf, 0) < 0) result |= 1; errno = 0; if (strerror_r (EACCES, buf, sizeof buf) != 0) result |= 2; strcpy (buf, "Unknown"); if (strerror_r (0, buf, sizeof buf) != 0) result |= 4; if (errno) result |= 8; if (strstr (buf, "nknown") || strstr (buf, "ndefined")) result |= 0x10; errno = 0; *buf = 0; if (strerror_r (-3, buf, sizeof buf) < 0) result |= 0x20; if (errno) result |= 0x40; if (!*buf) result |= 0x80; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strerror_r_works=yes else gl_cv_func_strerror_r_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 $as_echo "$gl_cv_func_strerror_r_works" >&6; } else if test $ac_cv_func___xpg_strerror_r = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; } if ${gl_cv_func_strerror_r_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_strerror_r_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif int __xpg_strerror_r(int, char *, size_t); int main () { int result = 0; char buf[256] = "^"; char copy[256]; char *str = strerror (-1); strcpy (copy, str); if (__xpg_strerror_r (-2, buf, 1) == 0) result |= 1; if (*buf) result |= 2; __xpg_strerror_r (-2, buf, 256); if (strcmp (str, copy)) result |= 4; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strerror_r_works=yes else gl_cv_func_strerror_r_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 $as_echo "$gl_cv_func_strerror_r_works" >&6; } fi fi fi fi if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_string_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'string.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_string_h fi NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $gl_cv_have_include_next = yes; then gl_cv_next_strings_h='<'strings.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_strings_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_strings_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'strings.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_strings_h='<'strings.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5 $as_echo "$gl_cv_next_strings_h" >&6; } fi NEXT_STRINGS_H=$gl_cv_next_strings_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'strings.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_strings_h fi NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive if test $ac_cv_header_strings_h = yes; then HAVE_STRINGS_H=1 else HAVE_STRINGS_H=0 fi for gl_func in ffs strcasecmp strncasecmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Minix 3.1.8 has a bug: must be included before . */ #include #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" if test "x$ac_cv_have_decl_strndup" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" if test "x$ac_cv_have_decl_strnlen" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; HAVE_TIMEGM=1; REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_time_h=yes else gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_sys_time_h=yes else gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_pthread_h=yes else gl_cv_sys_struct_timespec_in_pthread_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'time.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' if test "$HAVE_LIBUNISTRING" = yes; then LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 $as_echo_n "checking if environ is properly declared... " >&6; } if ${gt_cv_var_environ_declaration+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_UNISTD_H #include #endif /* mingw, BeOS, Haiku declare environ in , not in . */ #include extern struct { int foo; } environ; int main () { environ.foo = 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_var_environ_declaration=no else gt_cv_var_environ_declaration=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 $as_echo "$gt_cv_var_environ_declaration" >&6; } if test $gt_cv_var_environ_declaration = yes; then $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h fi if test $gt_cv_var_environ_declaration != yes; then HAVE_DECL_ENVIRON=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; } if ${gl_cv_func_ungetc_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_ungetc_works='guessing no' else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f; if (!(f = fopen ("conftest.tmp", "w+"))) return 1; if (fputs ("abc", f) < 0) return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != 'b') return 4; if (ungetc ('d', f) != 'd') return 5; if (ftell (f) != 1) return 6; if (fgetc (f) != 'd') return 7; if (ftell (f) != 2) return 8; if (fseek (f, 0, SEEK_CUR) != 0) return 9; if (ftell (f) != 2) return 10; if (fgetc (f) != 'c') return 11; fclose (f); remove ("conftest.tmp"); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_ungetc_works=yes else gl_cv_func_ungetc_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5 $as_echo "$gl_cv_func_ungetc_works" >&6; } if test "$gl_cv_func_ungetc_works" != yes; then $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h fi GNULIB_IMAXABS=0; GNULIB_IMAXDIV=0; GNULIB_STRTOIMAX=0; GNULIB_STRTOUMAX=0; HAVE_DECL_IMAXABS=1; HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; REPLACE_STRTOIMAX=0; INT32_MAX_LT_INTMAX_MAX=1; INT64_MAX_EQ_LONG_MAX='defined _LP64'; PRI_MACROS_BROKEN=0; PRIPTR_PREFIX=__PRIPTR_PREFIX; UINT32_MAX_LT_UINTMAX_MAX=1; UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; if test $gl_cv_have_include_next = yes; then gl_cv_next_inttypes_h='<'inttypes.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_inttypes_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'inttypes.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 $as_echo "$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'inttypes.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_inttypes_h fi NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive for gl_func in imaxabs imaxdiv strtoimax strtoumax; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi done if test $ac_cv_header_inttypes_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } if ${gt_cv_inttypes_pri_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_inttypes_pri_broken=no else gt_cv_inttypes_pri_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 $as_echo "$gt_cv_inttypes_pri_broken" >&6; } fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi GNULIB_SETLOCALE=0; GNULIB_DUPLOCALE=0; HAVE_DUPLOCALE=1; REPLACE_SETLOCALE=0; REPLACE_DUPLOCALE=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${gt_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_val_LC_MESSAGES=yes else gt_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; } if test $gt_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } if ${gl_cv_have_weak+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_have_weak=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern void xyzzy (); #pragma weak xyzzy int main () { xyzzy(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_have_weak=maybe fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $gl_cv_have_weak = maybe; then if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : gl_cv_have_weak="guessing yes" else gl_cv_have_weak="guessing no" fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #pragma weak fputs int main () { return (fputs == NULL); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_have_weak=yes else gl_cv_have_weak=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 $as_echo "$gl_cv_have_weak" >&6; } if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : gl_have_pthread_h=yes else gl_have_pthread_h=no fi if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_have_pthread=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_kill=yes else ac_cv_lib_pthread_pthread_kill=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h esac fi else # Some library is needed. Try libpthread and libc_r. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_kill=yes else ac_cv_lib_pthread_pthread_kill=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread fi if test -z "$gl_have_pthread"; then # For FreeBSD 4. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } if ${ac_cv_lib_c_r_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_kill=yes else ac_cv_lib_c_r_pthread_kill=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r fi fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { thr_self(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_have_solaristhread=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 $as_echo_n "checking how to link with libpth... " >&6; } if ${ac_cv_libpth_libs+:} false; then : $as_echo_n "(cached) " >&6 else use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libpth-prefix was given. if test "${with_libpth_prefix+set}" = set; then : withval=$with_libpth_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBPTH= LTLIBPTH= INCPTH= LIBPTH_PREFIX= HAVE_LIBPTH= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='pth ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" else LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" ;; esac done fi else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" done fi ac_cv_libpth_libs="$LIBPTH" ac_cv_libpth_ltlibs="$LTLIBPTH" ac_cv_libpth_cppflags="$INCPTH" ac_cv_libpth_prefix="$LIBPTH_PREFIX" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 $as_echo "$ac_cv_libpth_libs" >&6; } LIBPTH="$ac_cv_libpth_libs" LTLIBPTH="$ac_cv_libpth_ltlibs" INCPTH="$ac_cv_libpth_cppflags" LIBPTH_PREFIX="$ac_cv_libpth_prefix" for element in $INCPTH; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done HAVE_LIBPTH=yes gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBPTH" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pth_self(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_have_pth=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then case "$gl_use_threads" in yes | windows | win32) # The 'win32' is for backward compatibility. if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=windows $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h fi ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 $as_echo_n "checking for multithread API to use... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 $as_echo "$gl_threads_api" >&6; } for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : gl_cv_func_malloc_0_nonnull=1 else gl_cv_func_malloc_0_nonnull=0 fi cat >>confdefs.h <<_ACEOF #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull _ACEOF ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" if test "x$ac_cv_have_decl_setenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SETENV $ac_have_decl _ACEOF if test $ac_cv_have_decl_setenv = no; then HAVE_DECL_SETENV=0 fi for ac_header in search.h do : ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" if test "x$ac_cv_header_search_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SEARCH_H 1 _ACEOF fi done for ac_func in tsearch do : ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" if test "x$ac_cv_func_tsearch" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TSEARCH 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" if test "x$ac_cv_have_decl_snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" if test "x$ac_cv_have_decl_alarm" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ALARM $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" if test "x$ac_cv_have_decl_unsetenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_UNSETENV $ac_have_decl _ACEOF if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_m4_base='m4' gl_source_base='lib' if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } if ${gl_cv_rpl_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then : gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 $as_echo "$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi if test -n "$ALLOCA_H"; then GL_GENERATE_ALLOCA_H_TRUE= GL_GENERATE_ALLOCA_H_FALSE='#' else GL_GENERATE_ALLOCA_H_TRUE='#' GL_GENERATE_ALLOCA_H_FALSE= fi gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 $as_echo_n "checking whether btowc(0) is correct... " >&6; } if ${gl_cv_func_btowc_nul+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (btowc ('\0') != 0) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_btowc_nul=yes else gl_cv_func_btowc_nul=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 $as_echo "$gl_cv_func_btowc_nul" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } if ${gl_cv_func_btowc_eof+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac if test $LOCALE_FR != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_btowc_eof=yes else gl_cv_func_btowc_eof=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 $as_echo "$gl_cv_func_btowc_eof" >&6; } case "$gl_cv_func_btowc_nul" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" : fi GNULIB_BTOWC=1 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5 $as_echo_n "checking for GNU libc compatible calloc... " >&6; } if ${ac_cv_func_calloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_calloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { int result = 0; if (!calloc (0, 0)) result |= 1; if (calloc ((size_t) -1 / 8 + 1, 8)) result |= 2; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_calloc_0_nonnull=yes else ac_cv_func_calloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5 $as_echo "$ac_cv_func_calloc_0_nonnull" >&6; } if test $ac_cv_func_calloc_0_nonnull = yes; then : $as_echo "#define HAVE_CALLOC_GNU 1" >>confdefs.h else $as_echo "#define HAVE_CALLOC_GNU 0" >>confdefs.h REPLACE_CALLOC=1 fi if test $REPLACE_CALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext" fi cat >>confdefs.h <<_ACEOF #define GNULIB_CALLOC_GNU 1 _ACEOF if test $gl_cv_func_malloc_posix = yes; then $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h else REPLACE_CALLOC=1 fi if test $REPLACE_CALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext" fi GNULIB_CALLOC_POSIX=1 $as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h GNULIB_CHDIR=1 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Arrange to define PATH_MAX, like "pathmax.h" does. */ #if HAVE_UNISTD_H # include #endif #include #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifdef __hpux # undef PATH_MAX # define PATH_MAX 1024 #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif #ifdef PATH_MAX have_arbitrary_file_name_length_limit #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : gl_cv_have_arbitrary_file_name_length_limit=yes else gl_cv_have_arbitrary_file_name_length_limit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" : fi $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_CLOSE=1 fi if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then REPLACE_CLOSE=1 fi if test $REPLACE_CLOSE = 0; then if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then REPLACE_CLOSE=1 fi fi if test $REPLACE_CLOSE = 1; then gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" fi GNULIB_CLOSE=1 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h : cat >>confdefs.h <<_ACEOF #define GNULIB_CLOSE_STREAM 1 _ACEOF for ac_func in closedir do : ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" if test "x$ac_cv_func_closedir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CLOSEDIR 1 _ACEOF fi done if test $ac_cv_func_closedir = no; then HAVE_CLOSEDIR=0 fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then if test $HAVE_CLOSEDIR = 1; then REPLACE_CLOSEDIR=1 fi fi if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" fi GNULIB_CLOSEDIR=1 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h : if test "x$datarootdir" = x; then datarootdir='${datadir}' fi if test "x$docdir" = x; then docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' fi if test "x$htmldir" = x; then htmldir='${docdir}' fi if test "x$dvidir" = x; then dvidir='${docdir}' fi if test "x$pdfdir" = x; then pdfdir='${docdir}' fi if test "x$psdir" = x; then psdir='${docdir}' fi if test "x$lispdir" = x; then lispdir='${datarootdir}/emacs/site-lisp' fi if test "x$localedir" = x; then localedir='${datarootdir}/locale' fi pkglibexecdir='${libexecdir}/${PACKAGE}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 $as_echo_n "checking for d_ino member in directory struct... " >&6; } if ${gl_cv_struct_dirent_d_ino+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_struct_dirent_d_ino=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { DIR *dp = opendir ("."); struct dirent *e; struct stat st; if (! dp) return 1; e = readdir (dp); if (! e) return 2; if (stat (e->d_name, &st) != 0) return 3; if (e->d_ino != st.st_ino) return 4; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_struct_dirent_d_ino=yes else gl_cv_struct_dirent_d_ino=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; } if test $gl_cv_struct_dirent_d_ino = yes; then $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h fi if test $gl_cv_have_include_next = yes; then gl_cv_next_dirent_h='<'dirent.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_dirent_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_dirent_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'dirent.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_dirent_h='<'dirent.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 $as_echo "$gl_cv_next_dirent_h" >&6; } fi NEXT_DIRENT_H=$gl_cv_next_dirent_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'dirent.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_dirent_h fi NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive if test $ac_cv_header_dirent_h = yes; then HAVE_DIRENT_H=1 else HAVE_DIRENT_H=0 fi for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in dirfd do : ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" if test "x$ac_cv_func_dirfd" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DIRFD 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include #include " if test "x$ac_cv_have_decl_dirfd" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_DIRFD $ac_have_decl _ACEOF if test $ac_cv_have_decl_dirfd = no; then HAVE_DECL_DIRFD=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 $as_echo_n "checking whether dirfd is a macro... " >&6; } if ${gl_cv_func_dirfd_macro+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef dirfd dirent_header_defines_dirfd #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : gl_cv_func_dirfd_macro=yes else gl_cv_func_dirfd_macro=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 $as_echo "$gl_cv_func_dirfd_macro" >&6; } # Use the replacement only if we have no function or macro with that name. if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then if test $ac_cv_have_decl_dirfd = yes; then # If the system declares dirfd already, let's declare rpl_dirfd instead. REPLACE_DIRFD=1 fi fi if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } if ${gl_cv_sys_dir_fd_member_name+:} false; then : $as_echo_n "(cached) " >&6 else dirfd_save_CFLAGS=$CFLAGS for ac_expr in d_fd dd_fd; do CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : dir_fd_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$dirfd_save_CFLAGS test "$dir_fd_found" = yes && break done test "$dir_fd_found" = yes || ac_expr=no_such_member gl_cv_sys_dir_fd_member_name=$ac_expr fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } if test $gl_cv_sys_dir_fd_member_name != no_such_member; then cat >>confdefs.h <<_ACEOF #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name _ACEOF fi fi GNULIB_DIRFD=1 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define GNULIB_DIRNAME 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 $as_echo "$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_DUP=1 fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then REPLACE_DUP=1 fi if test $REPLACE_DUP = 1; then gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" fi GNULIB_DUP=1 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h $as_echo "#define HAVE_DUP2 1" >>confdefs.h if test $HAVE_DUP2 = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 $as_echo_n "checking whether dup2 works... " >&6; } if ${gl_cv_func_dup2_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works=no;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works=no;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. gl_cv_func_dup2_works=no;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. gl_cv_func_dup2_works=no;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. gl_cv_func_dup2_works=no;; *) gl_cv_func_dup2_works=yes;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int result = 0; #ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; #endif if (dup2 (1, 1) == 0) result |= 2; #ifdef FD_CLOEXEC if (fcntl (1, F_GETFD) != FD_CLOEXEC) result |= 4; #endif close (0); if (dup2 (0, 0) != -1) result |= 8; /* Many gnulib modules require POSIX conformance of EBADF. */ if (dup2 (2, 1000000) == -1 && errno != EBADF) result |= 16; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_dup2_works=yes else gl_cv_func_dup2_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 $as_echo "$gl_cv_func_dup2_works" >&6; } if test "$gl_cv_func_dup2_works" = no; then REPLACE_DUP2=1 fi fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then if test $HAVE_DUP2 = 1; then REPLACE_DUP2=1 fi fi if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" fi GNULIB_DUP2=1 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" : fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" if test $ac_cv_have_decl_fchdir = no; then HAVE_DECL_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" : $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 $as_echo_n "checking whether open can visit directories... " >&6; } if ${gl_cv_func_open_directory_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_open_directory_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return open(".", O_RDONLY) < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_open_directory_works=yes else gl_cv_func_open_directory_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 $as_echo "$gl_cv_func_open_directory_works" >&6; } if test "$gl_cv_func_open_directory_works" != yes; then $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h fi fi GNULIB_FCHDIR=1 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h if test $ac_cv_func_fcntl = no; then if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : # Guess that it works on glibc systems case $host_os in #(( *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; if (errno != EINVAL) result |= 2; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fcntl_f_dupfd_works=yes else gl_cv_func_fcntl_f_dupfd_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } case $gl_cv_func_fcntl_f_dupfd_works in *yes) ;; *) if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef F_DUPFD_CLOEXEC choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __linux__ /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace it to support the semantics on older kernels that failed with EINVAL. */ choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_fcntl_f_dupfd_cloexec=yes else gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else gl_cv_func_fcntl_f_dupfd_cloexec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi fi fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi fi if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" fi GNULIB_FCNTL=1 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_fcntl_h='<'fcntl.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_fcntl_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'fcntl.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 $as_echo "$gl_cv_next_fcntl_h" >&6; } fi NEXT_FCNTL_H=$gl_cv_next_fcntl_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'fcntl.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_fcntl_h fi NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive for gl_func in fcntl openat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " #include " if test "x$ac_cv_have_decl_fdopendir" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FDOPENDIR $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else HAVE_DECL_FDOPENDIR=0 fi if test $ac_cv_func_fdopendir = no; then HAVE_FDOPENDIR=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 $as_echo_n "checking whether fdopendir works... " >&6; } if ${gl_cv_func_fdopendir_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_fdopendir_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if !HAVE_DECL_FDOPENDIR extern # ifdef __cplusplus "C" # endif DIR *fdopendir (int); #endif int main () { int result = 0; int fd = open ("conftest.c", O_RDONLY); if (fd < 0) result |= 1; if (fdopendir (fd)) result |= 2; if (close (fd)) result |= 4; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fdopendir_works=yes else gl_cv_func_fdopendir_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 $as_echo "$gl_cv_func_fdopendir_works" >&6; } if test "$gl_cv_func_fdopendir_works" != yes; then REPLACE_FDOPENDIR=1 fi fi if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" fi GNULIB_FDOPENDIR=1 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define GNULIB_FDOPENDIR 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 $as_echo_n "checking whether fflush works on input streams... " >&6; } if ${gl_cv_func_fflush_stdin+:} false; then : $as_echo_n "(cached) " >&6 else echo hello world > conftest.txt if test "$cross_compiling" = yes; then : gl_cv_func_fflush_stdin=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif int main () { FILE *f = fopen ("conftest.txt", "r"); char buffer[10]; int fd; int c; if (f == NULL) return 1; fd = fileno (f); if (fd < 0 || fread (buffer, 1, 5, f) != 5) return 2; /* For deterministic results, ensure f read a bigger buffer. */ if (lseek (fd, 0, SEEK_CUR) == 5) return 3; /* POSIX requires fflush-fseek to set file offset of fd. This fails on BSD systems and on mingw. */ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) return 4; if (lseek (fd, 0, SEEK_CUR) != 5) return 5; /* Verify behaviour of fflush after ungetc. See */ /* Verify behaviour of fflush after a backup ungetc. This fails on mingw. */ c = fgetc (f); ungetc (c, f); fflush (f); if (fgetc (f) != c) return 6; /* Verify behaviour of fflush after a non-backup ungetc. This fails on glibc 2.8 and on BSD systems. */ c = fgetc (f); ungetc ('@', f); fflush (f); if (fgetc (f) != c) return 7; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fflush_stdin=yes else gl_cv_func_fflush_stdin=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm conftest.txt fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 $as_echo "$gl_cv_func_fflush_stdin" >&6; } if test $gl_cv_func_fflush_stdin = no; then REPLACE_FFLUSH=1 fi if test $REPLACE_FFLUSH = 1; then gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext" : fi cat >>confdefs.h <<_ACEOF #define GNULIB_FFLUSH 1 _ACEOF GNULIB_FFLUSH=1 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h FLOAT_H= REPLACE_FLOAT_LDBL=0 case "$host_os" in aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; freebsd*) case "$host_cpu" in i[34567]86 ) FLOAT_H=float.h ;; x86_64 ) # On x86_64 systems, the C compiler may still be generating # 32-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __x86_64__ || defined __amd64__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : else FLOAT_H=float.h fi rm -f conftest* ;; esac ;; linux*) case "$host_cpu" in powerpc*) FLOAT_H=float.h ;; esac ;; esac case "$host_os" in aix* | freebsd* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi ;; esac REPLACE_ITOLD=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } if ${gl_cv_func_itold_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host" in sparc*-*-linux*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __arch64__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_func_itold_works="guessing no" else gl_cv_func_itold_works="guessing yes" fi rm -f conftest* ;; *) gl_cv_func_itold_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i = -1; volatile long double ld; int main () { ld += i * 1.0L; if (ld > 0) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_itold_works=yes else gl_cv_func_itold_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 $as_echo "$gl_cv_func_itold_works" >&6; } case "$gl_cv_func_itold_works" in *no) REPLACE_ITOLD=1 FLOAT_H=float.h ;; esac if test -n "$FLOAT_H"; then if test $gl_cv_have_include_next = yes; then gl_cv_next_float_h='<'float.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_float_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'float.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 $as_echo "$gl_cv_next_float_h" >&6; } fi NEXT_FLOAT_H=$gl_cv_next_float_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'float.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_float_h fi NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive fi if test -n "$FLOAT_H"; then GL_GENERATE_FLOAT_H_TRUE= GL_GENERATE_FLOAT_H_FALSE='#' else GL_GENERATE_FLOAT_H_TRUE='#' GL_GENERATE_FLOAT_H_FALSE= fi if test $REPLACE_FLOAT_LDBL = 1; then gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" fi if test $REPLACE_ITOLD = 1; then gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" fi FNMATCH_H= gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' ` gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } if eval \${$gl_fnmatch_cache_var+:} false; then : $as_echo_n "(cached) " >&6 else if test $gl_fnmatch_required = GNU; then gl_fnmatch_gnu_start= gl_fnmatch_gnu_end= else gl_fnmatch_gnu_start='#if 0' gl_fnmatch_gnu_end='#endif' fi if test "$cross_compiling" = yes; then : eval "$gl_fnmatch_cache_var=\"guessing no\"" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static int y (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == 0; } static int n (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == FNM_NOMATCH; } int main () { char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; static char const A_1[] = { 'A' - 1, 0 }; static char const A01[] = { 'A' + 1, 0 }; static char const a_1[] = { 'a' - 1, 0 }; static char const a01[] = { 'a' + 1, 0 }; static char const bs_1[] = { '\\\\' - 1, 0 }; static char const bs01[] = { '\\\\' + 1, 0 }; int result = 0; if (!n ("a*", "", 0)) return 1; if (!y ("a*", "abc", 0)) return 1; if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ return 1; if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) return 2; if (!y ("a\\\\bc", "abc", 0)) return 3; if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) return 3; if (!y ("*x", ".x", 0)) return 4; if (!n ("*x", ".x", FNM_PERIOD)) return 4; if (!y (Apat, "\\\\", 0)) return 5; if (!y (Apat, "A", 0)) return 5; if (!y (apat, "\\\\", 0)) return 5; if (!y (apat, "a", 0)) return 5; if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) return 5; if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) return 5; if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) return 5; if (!(y (apat, a01, 0) == ('a' < '\\\\'))) return 5; if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) return 5; if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) return 5; if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) return 5; if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) return 5; $gl_fnmatch_gnu_start if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) result |= 8; if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) result |= 16; if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) result |= 32; if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) result |= 64; $gl_fnmatch_gnu_end return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : eval "$gl_fnmatch_cache_var=yes" else eval "$gl_fnmatch_cache_var=no" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi eval ac_res=\$$gl_fnmatch_cache_var { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" if test "$gl_fnmatch_result" = yes; then rm -f "$gl_source_base/fnmatch.h" else FNMATCH_H=fnmatch.h fi if test -n "$FNMATCH_H"; then GL_GENERATE_FNMATCH_H_TRUE= GL_GENERATE_FNMATCH_H_FALSE='#' else GL_GENERATE_FNMATCH_H_TRUE='#' GL_GENERATE_FNMATCH_H_FALSE= fi if test -n "$FNMATCH_H"; then gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" cat >>confdefs.h <<_ACEOF #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch _ACEOF ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include " if test "x$ac_cv_have_decl_isblank" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK $ac_have_decl _ACEOF fi if test -n "$FNMATCH_H"; then gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" cat >>confdefs.h <<_ACEOF #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch _ACEOF ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include " if test "x$ac_cv_have_decl_isblank" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK $ac_have_decl _ACEOF fi case "$host_os" in mingw* | pw*) REPLACE_FOPEN=1 gl_cv_func_fopen_slash="guessing no" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; } if ${gl_cv_func_fopen_slash+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) gl_cv_func_fopen_slash="guessing no" ;; *) gl_cv_func_fopen_slash="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return fopen ("conftest.sl/", "w") != NULL; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fopen_slash=yes else gl_cv_func_fopen_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.sl fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5 $as_echo "$gl_cv_func_fopen_slash" >&6; } ;; esac case "$gl_cv_func_fopen_slash" in *no) $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h REPLACE_FOPEN=1 ;; esac if test $REPLACE_FOPEN = 1; then gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext" fi GNULIB_FOPEN=1 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h fp_headers=' # include # if HAVE_STDIO_EXT_H # include # endif ' ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers " if test "x$ac_cv_have_decl___fpending" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL___FPENDING $ac_have_decl _ACEOF if test $ac_cv_func___fpending = no; then gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } if ${ac_cv_sys_pending_output_n_bytes+:} false; then : $as_echo_n "(cached) " >&6 else for ac_expr in \ \ '# glibc2' \ 'fp->_IO_write_ptr - fp->_IO_write_base' \ \ '# traditional Unix' \ 'fp->_ptr - fp->_base' \ \ '# BSD' \ 'fp->_p - fp->_bf._base' \ \ '# SCO, Unixware' \ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ \ '# QNX' \ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ \ '# old glibc?' \ 'fp->__bufp - fp->__buffer' \ \ '# old glibc iostream?' \ 'fp->_pptr - fp->_pbase' \ \ '# emx+gcc' \ 'fp->_ptr - fp->_buffer' \ \ '# Minix' \ 'fp->_ptr - fp->_buf' \ \ '# VMS' \ '(*fp)->_ptr - (*fp)->_base' \ \ '# e.g., DGUX R4.11; the info is not available' \ 1 \ ; do # Skip each embedded comment. case "$ac_expr" in '#'*) continue;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *fp = stdin; (void) ($ac_expr); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : fp_done=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$fp_done" = yes && break done ac_cv_sys_pending_output_n_bytes=$ac_expr fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } cat >>confdefs.h <<_ACEOF #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes _ACEOF fi gl_cv_func_fprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # fprintf exists and is # already POSIX compliant. gl_cv_func_fprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_fprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else $as_echo "#define ptrdiff_t long" >>confdefs.h fi gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext" REPLACE_FPRINTF=1 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h : fi GNULIB_FPRINTF_POSIX=1 $as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include " if test "x$ac_cv_have_decl_fpurge" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPURGE $ac_have_decl _ACEOF if test "x$ac_cv_func_fpurge" = xyes; then HAVE_FPURGE=1 # Detect BSD bug. Only cygwin 1.7 is known to be immune. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5 $as_echo_n "checking whether fpurge works... " >&6; } if ${gl_cv_func_fpurge_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_fpurge_works='guessing no' else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.txt", "w+"); if (!f) return 1; if (fputc ('a', f) != 'a') return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != EOF) return 4; if (fpurge (f) != 0) return 5; if (putc ('b', f) != 'b') return 6; if (fclose (f) != 0) return 7; if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; if (fgetc (f) != 'a') return 9; if (fgetc (f) != 'b') return 10; if (fgetc (f) != EOF) return 11; if (fclose (f) != 0) return 12; if (remove ("conftest.txt") != 0) return 13; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fpurge_works=yes else gl_cv_func_fpurge_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5 $as_echo "$gl_cv_func_fpurge_works" >&6; } if test "x$gl_cv_func_fpurge_works" != xyes; then REPLACE_FPURGE=1 fi else HAVE_FPURGE=0 fi if test "x$ac_cv_have_decl_fpurge" = xno; then HAVE_DECL_FPURGE=0 fi if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" fi GNULIB_FPURGE=1 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h case "$host_os" in mingw* | pw*) REPLACE_FREOPEN=1 ;; esac if test $REPLACE_FREOPEN = 1; then gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext" fi GNULIB_FREOPEN=1 $as_echo "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h if test $gl_cv_func_frexp_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 $as_echo_n "checking whether frexp works... " >&6; } if ${gl_cv_func_frexp_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_ALARM # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) { return -DBL_MIN * DBL_MIN; } # define minus_zero compute_minus_zero () #else double minus_zero = -0.0; #endif int main() { int result = 0; int i; volatile double x; double zero = 0.0; #if HAVE_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ alarm (5); #endif /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) result |= 1; } /* Test on infinite numbers. */ x = 1.0 / zero; { int exp; double y = frexp (x, &exp); if (y != x) result |= 2; } /* Test on negative zero. */ x = minus_zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) result |= 4; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_frexp_works=yes else gl_cv_func_frexp_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 $as_echo "$gl_cv_func_frexp_works" >&6; } case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp_no_libm=yes ;; *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; esac else gl_func_frexp_no_libm=no REPLACE_FREXP=1 fi if test $gl_func_frexp_no_libm = yes; then $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h fi if test $gl_func_frexp_no_libm != yes; then gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" fi GNULIB_FREXP=1 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include " if test "x$ac_cv_have_decl_frexpl" = xyes; then : else HAVE_DECL_FREXPL=0 fi if test $HAVE_DECL_FREXPL = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } if ${gl_cv_func_frexpl_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include long double x; int main () { int e; return frexpl (x, &e) > 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_frexpl_no_libm=yes else gl_cv_func_frexpl_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } if test $gl_cv_func_frexpl_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 $as_echo_n "checking whether frexpl works... " >&6; } if ${gl_cv_func_frexpl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if defined __i386__ && defined __FreeBSD__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP #endif #if defined __sgi && (LDBL_MANT_DIG >= 106) # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # endif #endif extern #ifdef __cplusplus "C" #endif long double frexpl (long double, int *); int main() { int result = 0; volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) result |= 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) result |= 2; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) { result |= 4; break; } } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) result |= 8; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) result |= 16; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_frexpl_works=yes else gl_cv_func_frexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 $as_echo "$gl_cv_func_frexpl_works" >&6; } case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h fi fi if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" fi GNULIB_FREXPL=1 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then REPLACE_FSEEK=1 fi if test $REPLACE_FSEEK = 1; then gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext" fi GNULIB_FSEEK=1 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 $as_echo_n "checking for fseeko... " >&6; } if ${gl_cv_func_fseeko+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { fseeko (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_fseeko=yes else gl_cv_func_fseeko=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 $as_echo "$gl_cv_func_fseeko" >&6; } if test $ac_cv_have_decl_fseeko = no; then HAVE_DECL_FSEEKO=0 fi if test $gl_cv_func_fseeko = no; then HAVE_FSEEKO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FSEEKO=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 $as_echo_n "checking whether fflush works on input streams... " >&6; } if ${gl_cv_func_fflush_stdin+:} false; then : $as_echo_n "(cached) " >&6 else echo hello world > conftest.txt if test "$cross_compiling" = yes; then : gl_cv_func_fflush_stdin=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif int main () { FILE *f = fopen ("conftest.txt", "r"); char buffer[10]; int fd; int c; if (f == NULL) return 1; fd = fileno (f); if (fd < 0 || fread (buffer, 1, 5, f) != 5) return 2; /* For deterministic results, ensure f read a bigger buffer. */ if (lseek (fd, 0, SEEK_CUR) == 5) return 3; /* POSIX requires fflush-fseek to set file offset of fd. This fails on BSD systems and on mingw. */ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) return 4; if (lseek (fd, 0, SEEK_CUR) != 5) return 5; /* Verify behaviour of fflush after ungetc. See */ /* Verify behaviour of fflush after a backup ungetc. This fails on mingw. */ c = fgetc (f); ungetc (c, f); fflush (f); if (fgetc (f) != c) return 6; /* Verify behaviour of fflush after a non-backup ungetc. This fails on glibc 2.8 and on BSD systems. */ c = fgetc (f); ungetc ('@', f); fflush (f); if (fgetc (f) != c) return 7; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fflush_stdin=yes else gl_cv_func_fflush_stdin=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm conftest.txt fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 $as_echo "$gl_cv_func_fflush_stdin" >&6; } if test $gl_cv_func_fflush_stdin = no; then REPLACE_FSEEKO=1 fi fi if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" fi GNULIB_FSEEKO=1 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_FSTAT=1 fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0 \ && test "$gl_cv_func_open_directory_works" != yes; then REPLACE_FSTAT=1 fi if test $REPLACE_FSTAT = 1; then gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" fi GNULIB_FSTAT=1 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h if test $ac_cv_func_fstatat = no; then HAVE_FSTATAT=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; } if ${gl_cv_func_fstatat_zero_flag+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in aix*) gl_cv_func_fstatat_zero_flag="guessing no";; *) gl_cv_func_fstatat_zero_flag="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { struct stat a; return fstatat (AT_FDCWD, ".", &a, 0) != 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fstatat_zero_flag=yes else gl_cv_func_fstatat_zero_flag=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+yes) ;; *) REPLACE_FSTATAT=1 case $gl_cv_func_fstatat_zero_flag in *yes) $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h ;; esac ;; esac fi if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" fi cat >>confdefs.h <<_ACEOF #define GNULIB_FSTATAT 1 _ACEOF GNULIB_FSTATAT=1 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then REPLACE_FTELL=1 fi if test $REPLACE_FTELL = 1; then gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext" fi GNULIB_FTELL=1 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h if test $ac_cv_have_decl_ftello = no; then HAVE_DECL_FTELLO=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 $as_echo_n "checking for ftello... " >&6; } if ${gl_cv_func_ftello+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ftello (stdin); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_ftello=yes else gl_cv_func_ftello=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 $as_echo "$gl_cv_func_ftello" >&6; } if test $gl_cv_func_ftello = no; then HAVE_FTELLO=0 else if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FTELLO=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 $as_echo_n "checking whether ftello works... " >&6; } if ${gl_cv_func_ftello_works+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_ftello_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_ftello_works="guessing yes" ;; esac if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #define TESTFILE "conftest.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) return 70; if (fwrite ("foogarsh", 1, 8, fp) < 8) return 71; if (fclose (fp)) return 72; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) return 73; if (fseek (fp, -1, SEEK_END)) return 74; if (!(getc (fp) == 'h')) return 1; if (!(getc (fp) == EOF)) return 2; if (!(ftell (fp) == 8)) return 3; if (!(ftell (fp) == 8)) return 4; if (!(putc ('!', fp) == '!')) return 5; if (!(ftell (fp) == 9)) return 6; if (!(fclose (fp) == 0)) return 7; fp = fopen (TESTFILE, "r"); if (fp == NULL) return 75; { char buf[10]; if (!(fread (buf, 1, 10, fp) == 9)) return 10; if (!(memcmp (buf, "foogarsh!", 9) == 0)) return 11; } if (!(fclose (fp) == 0)) return 12; /* The file's contents is now "foogarsh!". */ return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_ftello_works=yes else gl_cv_func_ftello_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 $as_echo "$gl_cv_func_ftello_works" >&6; } case "$gl_cv_func_ftello_works" in *yes) ;; *) REPLACE_FTELLO=1 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h ;; esac fi fi if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext" fi GNULIB_FTELLO=1 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h gl_abort_bug=no case "$host_os" in mingw*) gl_cv_func_getcwd_path_max=yes ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; } if ${gl_cv_func_getcwd_path_max+:} false; then : $as_echo_n "(cached) " >&6 else # Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir3" if test "$cross_compiling" = yes; then : case "$host_os" in aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; *) gl_cv_func_getcwd_path_max=no;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_UNISTD_H # include #else # include #endif #include #include #include #include #include /* Arrange to define PATH_MAX, like "pathmax.h" does. */ #if HAVE_UNISTD_H # include #endif #include #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifdef __hpux # undef PATH_MAX # define PATH_MAX 1024 #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif #ifndef AT_FDCWD # define AT_FDCWD 0 #endif #ifdef ENAMETOOLONG # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) #else # define is_ENAMETOOLONG(x) 0 #endif /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ #undef mkdir #ifndef S_IRWXU # define S_IRWXU 0700 #endif /* The length of this name must be 8. */ #define DIR_NAME "confdir3" #define DIR_NAME_LEN 8 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1) /* The length of "../". */ #define DOTDOTSLASH_LEN 3 /* Leftover bytes in the buffer, to work around library or OS bugs. */ #define BUF_SLOP 20 int main () { #ifndef PATH_MAX /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- at least not on a local file system. And if we were to start worrying about remote file systems, we'd have to enable the wrapper function all of the time, just to be safe. That's not worth the cost. */ exit (0); #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - DIR_NAME_SIZE - BUF_SLOP) \ <= PATH_MAX) /* FIXME: Assuming there's a system for which this is true, this should be done in a compile test. */ exit (0); #else char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + DIR_NAME_SIZE + BUF_SLOP]; char *cwd = getcwd (buf, PATH_MAX); size_t initial_cwd_len; size_t cwd_len; int fail = 0; size_t n_chdirs = 0; if (cwd == NULL) exit (10); cwd_len = initial_cwd_len = strlen (cwd); while (1) { size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); char *c = NULL; cwd_len += DIR_NAME_SIZE; /* If mkdir or chdir fails, it could be that this system cannot create any file with an absolute name longer than PATH_MAX, such as cygwin. If so, leave fail as 0, because the current working directory can't be too long for getcwd if it can't even be created. For other errors, be pessimistic and consider that as a failure, too. */ if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) { if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) fail = 20; break; } if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) { c = getcwd (buf, PATH_MAX); if (!c && errno == ENOENT) { fail = 11; break; } if (c) { fail = 31; break; } if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) { fail = 21; break; } } if (dotdot_max <= cwd_len - initial_cwd_len) { if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) break; c = getcwd (buf, cwd_len + 1); if (!c) { if (! (errno == ERANGE || errno == ENOENT || is_ENAMETOOLONG (errno))) { fail = 22; break; } if (AT_FDCWD || errno == ERANGE || errno == ENOENT) { fail = 12; break; } } } if (c && strlen (c) != cwd_len) { fail = 23; break; } ++n_chdirs; } /* Leaving behind such a deep directory is not polite. So clean up here, right away, even though the driving shell script would also clean up. */ { size_t i; /* Try rmdir first, in case the chdir failed. */ rmdir (DIR_NAME); for (i = 0; i <= n_chdirs; i++) { if (chdir ("..") < 0) break; if (rmdir (DIR_NAME) != 0) break; } } exit (fail); #endif } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getcwd_path_max=yes else case $? in 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; *) gl_cv_func_getcwd_path_max=no;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 $as_echo "$gl_cv_func_getcwd_path_max" >&6; } case "$gl_cv_func_getcwd_null" in *yes) for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } if ${gl_cv_func_getcwd_abort_bug+:} false; then : $as_echo_n "(cached) " >&6 else # Remove any remnants of a previous test. rm -rf confdir-14B--- # Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir-14B---" if test "$cross_compiling" = yes; then : gl_cv_func_getcwd_abort_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif #include #include /* Arrange to define PATH_MAX, like "pathmax.h" does. */ #if HAVE_UNISTD_H # include #endif #include #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifdef __hpux # undef PATH_MAX # define PATH_MAX 1024 #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ #undef mkdir #ifndef S_IRWXU # define S_IRWXU 0700 #endif /* FIXME: skip the run-test altogether on systems without getpagesize. */ #if ! HAVE_GETPAGESIZE # define getpagesize() 0 #endif /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than the 16kB pagesize on ia64 linux. Those conditions make the code below trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ #define TARGET_LEN (5 * 1024) int main () { char const *dir_name = "confdir-14B---"; char *cwd; size_t initial_cwd_len; int fail = 0; size_t desired_depth; size_t d; /* The bug is triggered when PATH_MAX < getpagesize (), so skip this relatively expensive and invasive test if that's not true. */ if (getpagesize () <= PATH_MAX) return 0; cwd = getcwd (NULL, 0); if (cwd == NULL) return 2; initial_cwd_len = strlen (cwd); free (cwd); desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) / (1 + strlen (dir_name))); for (d = 0; d < desired_depth; d++) { if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) { fail = 3; /* Unable to construct deep hierarchy. */ break; } } /* If libc has the bug in question, this invocation of getcwd results in a failed assertion. */ cwd = getcwd (NULL, 0); if (cwd == NULL) fail = 4; /* getcwd failed: it refuses to return a string longer than PATH_MAX. */ free (cwd); /* Call rmdir first, in case the above chdir failed. */ rmdir (dir_name); while (0 < d--) { if (chdir ("..") < 0) { fail = 5; break; } rmdir (dir_name); } return fail; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getcwd_abort_bug=no else ret=$? if test $ret -ge 128 || test $ret = 4; then gl_cv_func_getcwd_abort_bug=yes else gl_cv_func_getcwd_abort_bug=no fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } if test $gl_cv_func_getcwd_abort_bug = yes; then : gl_abort_bug=yes fi ;; esac ;; esac case "$gl_cv_func_getcwd_path_max" in "no, it has the AIX bug") ;; *) $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h ;; esac case "$gl_cv_func_getcwd_path_max" in "no, but it is partly working") $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h ;; esac if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ || test $gl_cv_func_getcwd_posix_signature != yes \ || test "$gl_cv_func_getcwd_path_max" != yes \ || test $gl_abort_bug = yes; then REPLACE_GETCWD=1 fi if test $REPLACE_GETCWD = 1; then gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" : fi cat >>confdefs.h <<_ACEOF #define GNULIB_GETCWD 1 _ACEOF GNULIB_GETCWD=1 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in *yes,yes) ;; *) REPLACE_GETCWD=1 ;; esac if test $REPLACE_GETCWD = 1; then gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" fi GNULIB_GETCWD=1 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h if test $ac_cv_func_getdelim = yes; then HAVE_GETDELIM=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 $as_echo_n "checking for working getdelim function... " >&6; } if ${gl_cv_func_working_getdelim+:} false; then : $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then : gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 3; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 $as_echo "$gl_cv_func_working_getdelim" >&6; } if test $gl_cv_func_working_getdelim = no; then REPLACE_GETDELIM=1 fi else HAVE_GETDELIM=0 fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" for ac_func in flockfile funlockfile do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF fi GNULIB_GETDELIM=1 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h if test $ac_cv_func_getdtablesize != yes; then HAVE_GETDTABLESIZE=0 fi if test $HAVE_GETDTABLESIZE = 0; then gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" fi GNULIB_GETDTABLESIZE=1 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h if test $REPLACE_GETOPT = 1; then gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GNULIB_GL_UNISTD_H_GETOPT=1 fi $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then : REPLACE_GETOPT=1 fi if test $REPLACE_GETOPT = 1; then GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h fi if test $REPLACE_GETOPT = 1; then gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GNULIB_GL_UNISTD_H_GETOPT=1 fi if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then GNU_MAKE_TRUE= GNU_MAKE_FALSE='#' else GNU_MAKE_TRUE='#' GNU_MAKE_FALSE= fi # Autoconf 2.61a.99 and earlier don't support linking a file only # in VPATH builds. But since GNUmakefile is for maintainer use # only, it does not matter if we skip the link with older autoconf. # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH # builds, so use a shell variable to bypass this. GNUmakefile=GNUmakefile ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5 $as_echo_n "checking whether the compiler generally respects inline... " >&6; } if ${gl_cv_c_inline_effective+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifdef __NO_INLINE__ #error "inline is not effective" #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_c_inline_effective=yes else gl_cv_c_inline_effective=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5 $as_echo "$gl_cv_c_inline_effective" >&6; } if test $gl_cv_c_inline_effective = yes; then $as_echo "#define HAVE_INLINE 1" >>confdefs.h fi : : : : : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } if ${gl_cv_func_isnand_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x; int main () { return isnand (x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_isnand_no_libm=yes else gl_cv_func_isnand_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 $as_echo "$gl_cv_func_isnand_no_libm" >&6; } gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm if test $gl_cv_func_isnand_no_libm = yes; then $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h fi if test $gl_func_isnand_no_libm != yes; then gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } if ${gl_cv_func_isnanf_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x; int main () { return isnanf (x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_isnanf_no_libm=yes else gl_cv_func_isnanf_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; } if test $gl_cv_func_isnanf_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5 $as_echo_n "checking whether isnan(float) works... " >&6; } if ${gl_cv_func_isnanf_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; *) gl_cv_func_isnanf_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaN () { static float zero = 0.0f; return zero / zero; } #else # define NaN() (0.0f / 0.0f) #endif #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; float value; } memory_float; int main() { int result = 0; if (isnanf (1.0f / 0.0f)) result |= 1; if (!isnanf (NaN ())) result |= 2; #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* The isnanf function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit. */ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) { memory_float m; m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; if (!isnanf (m.value)) result |= 4; } #endif return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_isnanf_works=yes else gl_cv_func_isnanf_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5 $as_echo "$gl_cv_func_isnanf_works" >&6; } fi if test $gl_cv_func_isnanf_no_libm = yes \ && { case "$gl_cv_func_isnanf_works" in *yes) true;; *) false;; esac }; then gl_func_isnanf_no_libm=yes $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h else gl_func_isnanf_no_libm=no fi if test $gl_func_isnanf_no_libm != yes; then gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if ${gl_cv_cc_float_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_float_expbit0="word 0 bit 23" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_float_expbit0=`cat conftest.out` else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } if ${gl_cv_func_isnanl_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x; int main () { return isnanl (x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_isnanl_no_libm=yes else gl_cv_func_isnanl_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; } gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm if test $gl_func_isnanl_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 $as_echo_n "checking whether isnanl works... " >&6; } if ${gl_cv_func_isnanl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; *) case "$host_os" in netbsd*) gl_cv_func_isnanl_works="guessing no";; *) gl_cv_func_isnanl_works="guessing yes";; esac ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { int result = 0; if (!isnanl (NaNl ())) result |= 1; { memory_long_double m; unsigned int i; /* The isnanl function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (!isnanl (m.value)) result |= 1; } #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (!isnanl (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (!isnanl (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) result |= 64; } #endif return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_isnanl_works=yes else gl_cv_func_isnanl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 $as_echo "$gl_cv_func_isnanl_works" >&6; } case "$gl_cv_func_isnanl_works" in *yes) ;; *) gl_func_isnanl_no_libm=no ;; esac fi if test $gl_func_isnanl_no_libm = yes; then $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h fi if test $gl_func_isnanl_no_libm != yes; then gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_expbit0="unknown" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_long_double_expbit0=`cat conftest.out` else gl_cv_cc_long_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_BIT $bit _ACEOF ;; esac fi ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include " if test "x$ac_cv_have_decl_iswblank" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISWBLANK $ac_have_decl _ACEOF if test $ac_cv_func_iswblank = no; then HAVE_ISWBLANK=0 if test $ac_cv_have_decl_iswblank = yes; then REPLACE_ISWBLANK=1 fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then : fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" fi fi GNULIB_ISWBLANK=1 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_langinfo_h='<'langinfo.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_langinfo_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_langinfo_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'langinfo.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_langinfo_h='<'langinfo.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 $as_echo "$gl_cv_next_langinfo_h" >&6; } fi NEXT_LANGINFO_H=$gl_cv_next_langinfo_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'langinfo.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_langinfo_h fi NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_T_FMT_AMPM=0 HAVE_LANGINFO_ERA=0 HAVE_LANGINFO_YESEXPR=0 if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } if ${gl_cv_header_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int a = CODESET; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_langinfo_codeset=yes else gl_cv_header_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 $as_echo "$gl_cv_header_langinfo_codeset" >&6; } if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int a = T_FMT_AMPM; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_langinfo_t_fmt_ampm=yes else gl_cv_header_langinfo_t_fmt_ampm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then HAVE_LANGINFO_T_FMT_AMPM=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; } if ${gl_cv_header_langinfo_era+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int a = ERA; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_langinfo_era=yes else gl_cv_header_langinfo_era=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 $as_echo "$gl_cv_header_langinfo_era" >&6; } if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } if ${gl_cv_header_langinfo_yesexpr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int a = YESEXPR; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_langinfo_yesexpr=yes else gl_cv_header_langinfo_yesexpr=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } if test $gl_cv_header_langinfo_yesexpr = yes; then HAVE_LANGINFO_YESEXPR=1 fi else HAVE_LANGINFO_H=0 fi for gl_func in nl_langinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 $as_echo_n "checking whether lseek detects pipes... " >&6; } if ${gl_cv_func_lseek_pipe+:} false; then : $as_echo_n "(cached) " >&6 else if test $cross_compiling = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include /* for SEEK_CUR */ #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif int main () { /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && test 1 = "`echo hi \ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi else gl_cv_func_lseek_pipe=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5 $as_echo "$gl_cv_func_lseek_pipe" >&6; } if test $gl_cv_func_lseek_pipe = no; then REPLACE_LSEEK=1 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h fi if test $REPLACE_LSEEK = 1; then gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" fi GNULIB_LSEEK=1 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h if test $ac_cv_func_lstat = yes; then if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi else HAVE_LSTAT=0 fi if test $REPLACE_LSTAT = 1; then gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" : fi GNULIB_LSTAT=1 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h REPLACE_MALLOC=1 fi if test $REPLACE_MALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" fi cat >>confdefs.h <<_ACEOF #define GNULIB_MALLOC_GNU 1 _ACEOF if test $gl_cv_func_malloc_posix = yes; then $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h else REPLACE_MALLOC=1 fi if test $REPLACE_MALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" fi GNULIB_MALLOC_POSIX=1 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_math_h='<'math.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_math_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_math_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'math.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_math_h='<'math.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 $as_echo "$gl_cv_next_math_h" >&6; } fi NEXT_MATH_H=$gl_cv_next_math_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'math.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_math_h fi NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 $as_echo_n "checking whether NAN macro works... " >&6; } if ${gl_cv_header_math_nan_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { /* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN f = NAN; #endif return f == 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_math_nan_works=yes else gl_cv_header_math_nan_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 $as_echo "$gl_cv_header_math_nan_works" >&6; } if test $gl_cv_header_math_nan_works = no; then REPLACE_NAN=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 $as_echo_n "checking whether HUGE_VAL works... " >&6; } if ${gl_cv_header_math_huge_val_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { /* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_math_huge_val_works=yes else gl_cv_header_math_huge_val_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 $as_echo "$gl_cv_header_math_huge_val_works" >&6; } if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi for gl_func in acosf acosl asinf asinl atanf atanl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl fabsf floorf floorl fma fmaf fmal fmodf frexpf frexpl ldexpf ldexpl logb logf logl log10f modff powf rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_incomplete_state=yes else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_sanitycheck=yes else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MBRTOWC $ac_have_decl _ACEOF if test $ac_cv_have_decl_mbrtowc = yes; then REPLACE_MBRTOWC=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "\303\237er"; mbstate_t state; wchar_t wc; size_t ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 5, &state); if (ret != 2) result |= 1; if (!mbsinit (&state)) result |= 2; memset (&state, '\0', sizeof (mbstate_t)); ret = mbrtowc (NULL, input, 5, &state); if (ret != 2) /* Solaris 7 fails here: ret is -1. */ result |= 4; if (!mbsinit (&state)) result |= 8; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_null_arg1=yes else gl_cv_func_mbrtowc_null_arg1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_null_arg2=yes else gl_cv_func_mbrtowc_null_arg2=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } if ${gl_cv_func_mbrtowc_retval+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on HP-UX, Solaris, native Windows. hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; int found_some_locale = 0; /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) result |= 1; } found_some_locale = 1; } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) result |= 2; } found_some_locale = 1; } /* This fails on native Windows. */ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) { char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 4; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) { char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 8; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_China.936") != NULL) { char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 16; } found_some_locale = 1; } return (found_some_locale ? result : 77); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_retval=yes else if test $? != 77; then gl_cv_func_mbrtowc_retval=no fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_nul_retval=yes else gl_cv_func_mbrtowc_nul_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_null_arg2" in *yes) ;; *) $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; esac fi fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" : fi GNULIB_MBRTOWC=1 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h GNULIB_MBSCASECMP=1 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_incomplete_state=yes else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_sanitycheck=yes else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_mbsinit" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MBSINIT $ac_have_decl _ACEOF if test $ac_cv_have_decl_mbsinit = yes; then REPLACE_MBSINIT=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 else case "$host_os" in mingw*) REPLACE_MBSINIT=1 ;; esac fi fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" : fi GNULIB_MBSINIT=1 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_incomplete_state=yes else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_sanitycheck=yes else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MBSRTOWCS $ac_have_decl _ACEOF if test $ac_cv_have_decl_mbsrtowcs = yes; then REPLACE_MBSRTOWCS=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSRTOWCS=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 $as_echo_n "checking whether mbsrtowcs works... " >&6; } if ${gl_cv_func_mbsrtowcs_works+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on HP-UX, Solaris, mingw. hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; esac if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; /* Test whether the function supports a NULL destination argument. This fails on native Windows. */ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { const char input[] = "\337er"; const char *src = input; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbsrtowcs (NULL, &src, 1, &state) != 3 || src != input) result |= 1; } /* Test whether the function works when started with a conversion state in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { const char input[] = "B\303\274\303\237er"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 2; if (mbsrtowcs (NULL, &src, 10, &state) != 4) result |= 2; } } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "<\306\374\313\334\270\354>"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 4; if (mbsrtowcs (NULL, &src, 10, &state) != 3) result |= 4; } } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { const char input[] = "B\250\271\201\060\211\070er"; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) if (!mbsinit (&state)) { const char *src = input + 2; if (mbsrtowcs (NULL, &src, 10, &state) != 4) result |= 8; } } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbsrtowcs_works=yes else gl_cv_func_mbsrtowcs_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } case "$gl_cv_func_mbsrtowcs_works" in *yes) ;; *) REPLACE_MBSRTOWCS=1 ;; esac fi fi if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" : fi GNULIB_MBSRTOWCS=1 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h if false; then REPLACE_MBTOWC=1 fi if test $REPLACE_MBTOWC = 1; then gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" : fi GNULIB_MBTOWC=1 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h : if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" for ac_header in bp-sym.h do : ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" if test "x$ac_cv_header_bp_sym_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BP_SYM_H 1 _ACEOF fi done fi GNULIB_MEMCHR=1 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h for ac_func in mempcpy do : ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" if test "x$ac_cv_func_mempcpy" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMPCPY 1 _ACEOF fi done if test $ac_cv_func_mempcpy = no; then HAVE_MEMPCPY=0 fi if test $HAVE_MEMPCPY = 0; then gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" : fi GNULIB_MEMPCPY=1 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h if test $ac_cv_have_decl_memrchr = no; then HAVE_DECL_MEMRCHR=0 fi for ac_func in memrchr do : ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" if test "x$ac_cv_func_memrchr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMRCHR 1 _ACEOF fi done if test $ac_cv_func_memrchr = no; then gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" : fi GNULIB_MEMRCHR=1 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h if test $ac_cv_func__set_invalid_parameter_handler = yes; then HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h else HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 fi if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" fi if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" fi if test $ac_cv_func_nl_langinfo = yes; then # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 $as_echo_n "checking whether YESEXPR works... " >&6; } if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess no on irix systems. irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; # Guess yes elsewhere. *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !*nl_langinfo(YESEXPR); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_nl_langinfo_yesexpr_works=yes else gl_cv_func_nl_langinfo_yesexpr_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } case $gl_cv_func_nl_langinfo_yesexpr_works in *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; esac cat >>confdefs.h <<_ACEOF #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS _ACEOF if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h fi else HAVE_NL_LANGINFO=0 fi if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" fi GNULIB_NL_LANGINFO=1 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5 $as_echo_n "checking for obstacks... " >&6; } if ${ac_cv_func_obstack+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include "obstack.h" int main () { struct obstack mem; #define obstack_chunk_alloc malloc #define obstack_chunk_free free obstack_init (&mem); obstack_free (&mem, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_obstack=yes else ac_cv_func_obstack=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5 $as_echo "$ac_cv_func_obstack" >&6; } if test $ac_cv_func_obstack = yes; then $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h else gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" fi case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } if ${gl_cv_func_open_slash+:} false; then : $as_echo_n "(cached) " >&6 else # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then touch conftest.tmp ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then : case "$host_os" in freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #endif int main () { int result = 0; #if HAVE_LSTAT if (open ("conftest.lnk/", O_RDONLY) != -1) result |= 1; #endif if (open ("conftest.sl/", O_CREAT, 0600) >= 0) result |= 2; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_open_slash=yes else gl_cv_func_open_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.sl conftest.tmp conftest.lnk fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 $as_echo "$gl_cv_func_open_slash" >&6; } case "$gl_cv_func_open_slash" in *no) $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h REPLACE_OPEN=1 ;; esac ;; esac if test $REPLACE_OPEN = 0; then if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then REPLACE_OPEN=1 fi fi if test $REPLACE_OPEN = 1; then gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" : fi GNULIB_OPEN=1 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in yes+yes) ;; yes+*) # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 ;; *) HAVE_OPENAT=0 ;; esac if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" : fi cat >>confdefs.h <<_ACEOF #define GNULIB_OPENAT 1 _ACEOF GNULIB_OPENAT=1 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h for ac_func in opendir do : ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" if test "x$ac_cv_func_opendir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENDIR 1 _ACEOF fi done if test $ac_cv_func_opendir = no; then HAVE_OPENDIR=0 fi if test $ac_cv_func_fchdir = no; then HAVE_FCHDIR=0 fi if test $HAVE_FCHDIR = 0; then if test $HAVE_OPENDIR = 1; then REPLACE_OPENDIR=1 fi fi if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" fi GNULIB_OPENDIR=1 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl5.005 or newer" >&5 $as_echo_n "checking for perl5.005 or newer... " >&6; } if test "${PERL+set}" = set; then # 'PERL' is set in the user's environment. candidate_perl_names="$PERL" perl_specified=yes else candidate_perl_names='perl perl5' perl_specified=no fi found=no PERL="$am_missing_run perl" for perl in $candidate_perl_names; do # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. if ( $perl -e 'require 5.005; use File::Compare' ) > /dev/null 2>&1; then PERL=$perl found=yes break fi done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 $as_echo "$found" >&6; } test $found = no && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: You don't seem to have perl5.005 or newer installed, or you lack a usable version of the Perl File::Compare module. As a result, you may be unable to run a few tests or to regenerate certain files if you modify the sources from which they are derived. " >&5 $as_echo "$as_me: WARNING: WARNING: You don't seem to have perl5.005 or newer installed, or you lack a usable version of the Perl File::Compare module. As a result, you may be unable to run a few tests or to regenerate certain files if you modify the sources from which they are derived. " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a shell that conforms to POSIX" >&5 $as_echo_n "checking for a shell that conforms to POSIX... " >&6; } if ${gl_cv_posix_shell+:} false; then : $as_echo_n "(cached) " >&6 else gl_test_posix_shell_script=' func_return () { (exit $1) } func_success () { func_return 0 } func_failure () { func_return 1 } func_ret_success () { return 0 } func_ret_failure () { return 1 } subshell_umask_sanity () { (umask 22; (umask 0); test $(umask) -eq 22) } test "$(echo foo)" = foo && func_success && ! func_failure && func_ret_success && ! func_ret_failure && (set x && func_ret_success y && test x = "$1") && subshell_umask_sanity ' for gl_cv_posix_shell in \ "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do case $gl_cv_posix_shell in /*) "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \ && break;; esac done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_posix_shell" >&5 $as_echo "$gl_cv_posix_shell" >&6; } if test "$gl_cv_posix_shell" != no; then POSIX_SHELL=$gl_cv_posix_shell PREFERABLY_POSIX_SHELL=$POSIX_SHELL else POSIX_SHELL= PREFERABLY_POSIX_SHELL=/bin/sh fi if test $gl_cv_func_frexp_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 $as_echo_n "checking whether frexp works... " >&6; } if ${gl_cv_func_frexp_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_ALARM # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) { return -DBL_MIN * DBL_MIN; } # define minus_zero compute_minus_zero () #else double minus_zero = -0.0; #endif int main() { int result = 0; int i; volatile double x; double zero = 0.0; #if HAVE_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ alarm (5); #endif /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) result |= 1; } /* Test on infinite numbers. */ x = 1.0 / zero; { int exp; double y = frexp (x, &exp); if (y != x) result |= 2; } /* Test on negative zero. */ x = minus_zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) result |= 4; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_frexp_works=yes else gl_cv_func_frexp_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 $as_echo "$gl_cv_func_frexp_works" >&6; } case "$gl_cv_func_frexp_works" in *yes) $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; } if ${gl_cv_func_ldexp_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include double x; int y; int main () { return ldexp (x, y) < 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_ldexp_no_libm=yes else gl_cv_func_ldexp_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; } if test $gl_cv_func_ldexp_no_libm = yes; then $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } if ${gl_cv_func_frexpl_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include long double x; int main () { int e; return frexpl (x, &e) > 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_frexpl_no_libm=yes else gl_cv_func_frexpl_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } if test $gl_cv_func_frexpl_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 $as_echo_n "checking whether frexpl works... " >&6; } if ${gl_cv_func_frexpl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if defined __i386__ && defined __FreeBSD__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP #endif #if defined __sgi && (LDBL_MANT_DIG >= 106) # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # endif #endif extern #ifdef __cplusplus "C" #endif long double frexpl (long double, int *); int main() { int result = 0; volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) result |= 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) result |= 2; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) { result |= 4; break; } } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) result |= 8; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) result |= 16; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_frexpl_works=yes else gl_cv_func_frexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 $as_echo "$gl_cv_func_frexpl_works" >&6; } case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include " if test "x$ac_cv_have_decl_frexpl" = xyes; then : else HAVE_DECL_FREXPL=0 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; } if ${gl_cv_func_ldexpl_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include long double x; int main () { return ldexpl (x, -1) > 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_ldexpl_no_libm=yes else gl_cv_func_ldexpl_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; } if test $gl_cv_func_ldexpl_no_libm = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5 $as_echo_n "checking whether ldexpl works... " >&6; } if ${gl_cv_func_ldexpl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; *) gl_cv_func_ldexpl_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern #ifdef __cplusplus "C" #endif long double ldexpl (long double, int); int main() { int result = 0; { volatile long double x = 1.0; volatile long double y = ldexpl (x, -1); if (y != 0.5L) result |= 1; } { volatile long double x = 1.73205L; volatile long double y = ldexpl (x, 0); if (y != x) result |= 2; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_ldexpl_works=yes else gl_cv_func_ldexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5 $as_echo "$gl_cv_func_ldexpl_works" >&6; } case "$gl_cv_func_ldexpl_works" in *yes) $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include " if test "x$ac_cv_have_decl_ldexpl" = xyes; then : else HAVE_DECL_LDEXPL=0 fi ;; esac fi if test $gl_cv_func_vfprintf_posix = no; then gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext" REPLACE_PRINTF=1 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h : fi GNULIB_PRINTF_POSIX=1 $as_echo "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include " if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include " if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl _ACEOF : : for ac_func in readdir do : ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" if test "x$ac_cv_func_readdir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READDIR 1 _ACEOF fi done if test $ac_cv_func_readdir = no; then HAVE_READDIR=0 fi if test $HAVE_READDIR = 0; then gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext" fi GNULIB_READDIR=1 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h REPLACE_REALLOC=1 fi if test $REPLACE_REALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" fi cat >>confdefs.h <<_ACEOF #define GNULIB_REALLOC_GNU 1 _ACEOF if test $gl_cv_func_malloc_posix = yes; then $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h else REPLACE_REALLOC=1 fi if test $REPLACE_REALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" fi GNULIB_REALLOC_POSIX=1 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h # Check whether --with-included-regex was given. if test "${with_included_regex+set}" = set; then : withval=$with_included_regex; fi case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 $as_echo_n "checking for working re_compile_pattern... " >&6; } if ${gl_cv_func_re_compile_pattern_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_re_compile_pattern_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include #include #include int main () { int result = 0; static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ if (setlocale (LC_ALL, "en_US.UTF-8")) { static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; else if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) result |= 1; if (! setlocale (LC_ALL, "C")) return 1; } /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) result |= 2; /* This should fail, but succeeds for glibc-2.5. */ else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) result |= 2; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) result |= 4; /* Ensure that [b-a] is diagnosed as invalid, when using RE_NO_EMPTY_RANGES. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) result |= 8; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) result |= 8; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) result |= 8; /* This should match, but does not for glibc-2.2.1. */ else if (re_match (®ex, "an", 2, 0, ®s) != 2) result |= 8; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 8; /* glibc-2.2.93 does not work with a negative RANGE argument. */ else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) result |= 8; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 16; else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) result |= 16; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) result |= 32; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) result |= 64; #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and 32-bit int), but we should wait until glibc implements this feature. Otherwise, support for equivalence classes and multibyte collation symbols would always be broken except when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) result |= 64; #endif return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_re_compile_pattern_working=yes else gl_cv_func_re_compile_pattern_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } case $gl_cv_func_re_compile_pattern_working in #( yes) ac_use_included_regex=no;; #( no) ac_use_included_regex=yes;; esac ;; *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 ;; esac if test $ac_use_included_regex = yes; then $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h $as_echo "#define re_search rpl_re_search" >>confdefs.h $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h $as_echo "#define re_match rpl_re_match" >>confdefs.h $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h $as_echo "#define re_comp rpl_re_comp" >>confdefs.h $as_echo "#define re_exec rpl_re_exec" >>confdefs.h $as_echo "#define regcomp rpl_regcomp" >>confdefs.h $as_echo "#define regexec rpl_regexec" >>confdefs.h $as_echo "#define regerror rpl_regerror" >>confdefs.h $as_echo "#define regfree rpl_regfree" >>confdefs.h fi if test $ac_use_included_regex = yes; then gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" for ac_header in libintl.h do : ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL_H 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include " if test "x$ac_cv_have_decl_isblank" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK $ac_have_decl _ACEOF fi for ac_func in rewinddir do : ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" if test "x$ac_cv_func_rewinddir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_REWINDDIR 1 _ACEOF fi done if test $ac_cv_func_rewinddir = no; then HAVE_REWINDDIR=0 fi if test $HAVE_REWINDDIR = 0; then gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext" fi GNULIB_REWINDDIR=1 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5 $as_echo_n "checking for signbit macro... " >&6; } if ${gl_cv_func_signbit+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_signbit="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* If signbit is defined as a function, don't use it, since calling it for 'float' or 'long double' arguments would involve conversions. If signbit is not declared at all but exists as a library function, don't use it, since the prototype may not match. If signbit is not declared at all but exists as a compiler built-in, don't use it, since it's preferable to use __builtin_signbit* (no warnings, no conversions). */ #ifndef signbit # error "signbit should be a macro" #endif #include /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif int result = 0; if (signbit (vf)) /* link check */ vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 1; } if (signbit (vd)) /* link check */ vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 2; } if (signbit (vl)) /* link check */ vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (signbit (255.0L)) result |= 4; if (!signbit (-255.0L)) result |= 4; if (signbit (p0l)) result |= 8; if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) result |= 16; if (signbit (plus_inf)) result |= 32; if (!signbit (minus_inf)) result |= 64; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_signbit=yes else gl_cv_func_signbit=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5 $as_echo "$gl_cv_func_signbit" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5 $as_echo_n "checking for signbit compiler built-ins... " >&6; } if ${gl_cv_func_signbit_gcc+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_signbit_gcc="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __GNUC__ >= 4 # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) #else # error "signbit should be three compiler built-ins" #endif #include /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif int result = 0; if (signbit (vf)) /* link check */ vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 1; } if (signbit (vd)) /* link check */ vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 2; } if (signbit (vl)) /* link check */ vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (signbit (255.0L)) result |= 4; if (!signbit (-255.0L)) result |= 4; if (signbit (p0l)) result |= 8; if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) result |= 16; if (signbit (plus_inf)) result |= 32; if (!signbit (minus_inf)) result |= 64; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_signbit_gcc=yes else gl_cv_func_signbit_gcc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5 $as_echo "$gl_cv_func_signbit_gcc" >&6; } if test "$gl_cv_func_signbit_gcc" = yes; then REPLACE_SIGNBIT_USING_GCC=1 else if test "$gl_cv_func_signbit" != yes; then REPLACE_SIGNBIT=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; } if ${gl_cv_cc_float_signbit+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_float_signbit="unknown" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0f }; static memory_float minus = { -1.0f }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 2; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 4; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); if (fclose (fp) != 0) return 5; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_float_signbit=`cat conftest.out` else gl_cv_cc_float_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5 $as_echo "$gl_cv_cc_float_signbit" >&6; } case "$gl_cv_cc_float_signbit" in word*bit*) word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_SIGNBIT_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; } if ${gl_cv_cc_double_signbit+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_double_signbit="unknown" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0 }; static memory_float minus = { -1.0 }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 2; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 4; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); if (fclose (fp) != 0) return 5; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_double_signbit=`cat conftest.out` else gl_cv_cc_double_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5 $as_echo "$gl_cv_cc_double_signbit" >&6; } case "$gl_cv_cc_double_signbit" in word*bit*) word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_SIGNBIT_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_signbit+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_signbit="unknown" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0L }; static memory_float minus = { -1.0L }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 2; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 4; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); if (fclose (fp) != 0) return 5; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_long_double_signbit=`cat conftest.out` else gl_cv_cc_long_double_signbit="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5 $as_echo "$gl_cv_cc_long_double_signbit" >&6; } case "$gl_cv_cc_long_double_signbit" in word*bit*) word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_SIGNBIT_BIT $bit _ACEOF ;; esac if test "$gl_cv_cc_float_signbit" = unknown; then ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include " if test "x$ac_cv_have_decl_copysignf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNF $ac_have_decl _ACEOF if test "$ac_cv_have_decl_copysignf" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; } if ${gl_cv_func_copysignf_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include float x, y; int main () { return copysignf (x, y) < 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_copysignf_no_libm=yes else gl_cv_func_copysignf_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; } if test $gl_cv_func_copysignf_no_libm = yes; then $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h fi fi fi if test "$gl_cv_cc_double_signbit" = unknown; then ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include " if test "x$ac_cv_have_decl_copysign" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGN $ac_have_decl _ACEOF if test "$ac_cv_have_decl_copysign" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; } if ${gl_cv_func_copysign_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include double x, y; int main () { return copysign (x, y) < 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_copysign_no_libm=yes else gl_cv_func_copysign_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5 $as_echo "$gl_cv_func_copysign_no_libm" >&6; } if test $gl_cv_func_copysign_no_libm = yes; then $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h fi fi fi if test "$gl_cv_cc_long_double_signbit" = unknown; then ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include " if test "x$ac_cv_have_decl_copysignl" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNL $ac_have_decl _ACEOF if test "$ac_cv_have_decl_copysignl" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; } if ${gl_cv_func_copysignl_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include long double x, y; int main () { return copysignl (x, y) < 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_cv_func_copysignl_no_libm=yes else gl_cv_func_copysignl_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; } if test $gl_cv_func_copysignl_no_libm = yes; then $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h fi fi fi fi fi if test $REPLACE_SIGNBIT = 1; then gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext" fi GNULIB_SIGNBIT=1 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } if ${gl_cv_size_max+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_size_max= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Found it" >/dev/null 2>&1; then : gl_cv_size_max=yes fi rm -f conftest* if test -z "$gl_cv_size_max"; then if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include #include "; then : else size_t_bits_minus_1= fi if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : else fits_in_uint= fi if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern size_t foo; extern unsigned long foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : fits_in_uint=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else gl_cv_size_max='((size_t)~(size_t)0)' fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 $as_echo "$gl_cv_size_max" >&6; } if test "$gl_cv_size_max" != yes; then cat >>confdefs.h <<_ACEOF #define SIZE_MAX $gl_cv_size_max _ACEOF fi gl_cv_func_sprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # sprintf exists and is # already POSIX compliant. gl_cv_func_sprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_sprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else $as_echo "#define ptrdiff_t long" >>confdefs.h fi gl_LIBOBJS="$gl_LIBOBJS sprintf.$ac_objext" REPLACE_SPRINTF=1 : fi GNULIB_SPRINTF_POSIX=1 $as_echo "#define GNULIB_TEST_SPRINTF_POSIX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } if ${gt_cv_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_ssize_t=yes else gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 $as_echo "$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then $as_echo "#define ssize_t int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } if ${gl_cv_func_stat_dir_slash+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_stat_dir_slash=yes else gl_cv_func_stat_dir_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 $as_echo "$gl_cv_func_stat_dir_slash" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } if ${gl_cv_func_stat_file_slash+:} false; then : $as_echo_n "(cached) " >&6 else touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then : gl_cv_func_stat_file_slash="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = 0; struct stat st; if (!stat ("conftest.tmp/", &st)) result |= 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) result |= 2; #endif return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_stat_file_slash=yes else gl_cv_func_stat_file_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.tmp conftest.lnk fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 $as_echo "$gl_cv_func_stat_file_slash" >&6; } case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h ;; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ;; esac if test $REPLACE_STAT = 1; then gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" : fi GNULIB_STAT=1 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test -n "$STDBOOL_H"; then GL_GENERATE_STDBOOL_H_TRUE= GL_GENERATE_STDBOOL_H_FALSE='#' else GL_GENERATE_STDBOOL_H_TRUE='#' GL_GENERATE_STDBOOL_H_FALSE= fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_decl_null_works=yes else gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then GL_GENERATE_STDDEF_H_TRUE= GL_GENERATE_STDDEF_H_FALSE='#' else GL_GENERATE_STDDEF_H_TRUE='#' GL_GENERATE_STDDEF_H_FALSE= fi if test -n "$STDDEF_H"; then if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_stddef_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stddef.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_stdio_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stdio.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 $as_echo "$gl_cv_next_stdio_h" >&6; } fi NEXT_STDIO_H=$gl_cv_next_stdio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdio_h fi NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive GNULIB_FSCANF=1 GNULIB_SCANF=1 GNULIB_FGETC=1 GNULIB_GETC=1 GNULIB_GETCHAR=1 GNULIB_FGETS=1 GNULIB_GETS=1 GNULIB_FREAD=1 GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 for gl_func in dprintf fpurge fseeko ftello getdelim getline pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_stdlib_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stdlib.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdlib.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdlib_h fi NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in strcasecmp do : ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRCASECMP 1 _ACEOF fi done if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 fi for ac_func in strncasecmp do : ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRNCASECMP 1 _ACEOF fi done if test $ac_cv_func_strncasecmp = yes; then HAVE_STRNCASECMP=1 else HAVE_STRNCASECMP=0 fi ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" if test "x$ac_cv_have_decl_strncasecmp" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNCASECMP $ac_have_decl _ACEOF if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi if test $HAVE_STRCASECMP = 0; then gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext" : fi if test $HAVE_STRNCASECMP = 0; then gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext" : fi if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5 $as_echo_n "checking whether strcasestr works in linear time... " >&6; } if ${gl_cv_func_strcasestr_linear+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ && !defined __UCLIBC__ Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then : gl_cv_func_strcasestr_linear=yes else gl_cv_func_strcasestr_linear="guessing no" fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for signal */ #include /* for strcasestr */ #include /* for malloc */ #include /* for alarm */ static void quit (int sig) { exit (sig + 128); } int main () { int result = 0; size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, quit); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; if (!strcasestr (haystack, needle)) result |= 1; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strcasestr_linear=yes else gl_cv_func_strcasestr_linear=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5 $as_echo "$gl_cv_func_strcasestr_linear" >&6; } if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 fi fi if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" : fi for ac_func in strcasestr do : ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRCASESTR 1 _ACEOF fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 $as_echo_n "checking whether strcasestr works... " >&6; } if ${gl_cv_func_strcasestr_works_always+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ || defined __UCLIBC__ Lucky user #endif #elif defined __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #else Lucky user #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then : gl_cv_func_strcasestr_works_always=yes else gl_cv_func_strcasestr_works_always="guessing no" fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for strcasestr */ #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P int main () { return !!strcasestr (HAYSTACK, NEEDLE); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strcasestr_works_always=yes else gl_cv_func_strcasestr_works_always=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; } if test "$gl_cv_func_strcasestr_works_always" != yes; then REPLACE_STRCASESTR=1 fi fi fi if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" : fi GNULIB_STRCASESTR=1 $as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h if test $ac_cv_func_strdup = yes; then if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 fi fi if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" : fi GNULIB_STRDUP=1 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 $as_echo_n "checking for working strerror function... " >&6; } if ${gl_cv_func_working_strerror+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_working_strerror="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if (!*strerror (-2)) return 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_working_strerror=yes else gl_cv_func_working_strerror=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 $as_echo "$gl_cv_func_working_strerror" >&6; } if test "$gl_cv_func_working_strerror" != yes; then REPLACE_STRERROR=1 fi case "$gl_cv_func_strerror_r_works" in *no) REPLACE_STRERROR=1 ;; esac else REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" fi cat >>confdefs.h <<_ACEOF #define GNULIB_STRERROR 1 _ACEOF GNULIB_STRERROR=1 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then HAVE_STRNDUP=1 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 $as_echo_n "checking for working strndup... " >&6; } if ${gl_cv_func_strndup_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case $host_os in aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #ifndef HAVE_DECL_STRNDUP extern #ifdef __cplusplus "C" #endif char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0'; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_strndup_works=yes else gl_cv_func_strndup_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 $as_echo "$gl_cv_func_strndup_works" >&6; } case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 ;; esac else HAVE_STRNDUP=0 fi if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" fi GNULIB_STRNDUP=1 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } if ${ac_cv_func_strnlen_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : # Guess no on AIX systems, yes otherwise. case "$host_os" in aix*) ac_cv_func_strnlen_working=no;; *) ac_cv_func_strnlen_working=yes;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { #define S "foobar" #define S_LEN (sizeof S - 1) /* At least one implementation is buggy: that of AIX 4.3 would give strnlen (S, 1) == 3. */ int i; for (i = 0; i < S_LEN + 1; ++i) { int expected = i <= S_LEN ? i : S_LEN; if (strnlen (S, i) != expected) return 1; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strnlen_working=yes else ac_cv_func_strnlen_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 $as_echo "$ac_cv_func_strnlen_working" >&6; } test $ac_cv_func_strnlen_working = no && : if test $ac_cv_func_strnlen_working = no; then REPLACE_STRNLEN=1 fi fi if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" : fi GNULIB_STRNLEN=1 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h for ac_func in strsep do : ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" if test "x$ac_cv_func_strsep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRSEP 1 _ACEOF fi done if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 fi if test $HAVE_STRSEP = 0; then gl_LIBOBJS="$gl_LIBOBJS strsep.$ac_objext" : fi GNULIB_STRSEP=1 $as_echo "#define GNULIB_TEST_STRSEP 1" >>confdefs.h if test $ac_cv_header_sys_ioctl_h = yes; then HAVE_SYS_IOCTL_H=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether declares ioctl" >&5 $as_echo_n "checking whether declares ioctl... " >&6; } if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { (void) ioctl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_decl_ioctl_in_sys_ioctl_h=yes else gl_cv_decl_ioctl_in_sys_ioctl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5 $as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; } else HAVE_SYS_IOCTL_H=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_sys_ioctl_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_ioctl_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'sys/ioctl.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_sys_ioctl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5 $as_echo "$gl_cv_next_sys_ioctl_h" >&6; } fi NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/ioctl.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive for gl_func in ioctl; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Some platforms declare ioctl in the wrong header. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_sys_stat_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_stat_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'sys/stat.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 $as_echo "$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/stat.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_stat_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include " if test "x$ac_cv_type_nlink_t" = xyes; then : else $as_echo "#define nlink_t int" >>confdefs.h fi for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_types_h='<'sys/types.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_sys_types_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'sys/types.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 $as_echo "$gl_cv_next_sys_types_h" >&6; } fi NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/types.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_types_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_unistd_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_unistd_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'unistd.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'unistd.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_unistd_h fi NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_UNISTD_H # include #endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if { test "$HAVE_LIBUNISTRING" != yes \ || { test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 } } } } }; then LIBUNISTRING_UNITYPES_H='unitypes.h' else LIBUNISTRING_UNITYPES_H= fi if { test "$HAVE_LIBUNISTRING" != yes \ || { test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 } } } } }; then LIBUNISTRING_UNIWIDTH_H='uniwidth.h' else LIBUNISTRING_UNIWIDTH_H= fi if { test "$HAVE_LIBUNISTRING" != yes \ || { test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 } } } } }; then LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE= LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#' else LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#' LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE= fi if test $ac_cv_func_vasnprintf = no; then gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else $as_echo "#define ptrdiff_t long" >>confdefs.h fi fi gl_cv_func_vfprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # vfprintf exists and is # already POSIX compliant. gl_cv_func_vfprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vfprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h ;; esac gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else $as_echo "#define ptrdiff_t long" >>confdefs.h fi gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext" REPLACE_VFPRINTF=1 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h : fi GNULIB_VFPRINTF_POSIX=1 $as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_wchar_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wchar_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'wchar.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 $as_echo "$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wchar.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wchar_h fi NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_incomplete_state=yes else gl_cv_func_mbrtowc_incomplete_state=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_sanitycheck=yes else gl_cv_func_mbrtowc_sanitycheck=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_wcrtomb" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCRTOMB $ac_have_decl _ACEOF if test $ac_cv_have_decl_wcrtomb = yes; then REPLACE_WCRTOMB=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } if ${gl_cv_func_wcrtomb_retval+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 8; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_wcrtomb_retval=yes else gl_cv_func_wcrtomb_retval=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi fi if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" : fi GNULIB_WCRTOMB=1 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_wctype_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wctype_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'wctype.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 $as_echo "$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wctype.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wctype_h fi NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 $as_echo_n "checking whether iswcntrl works... " >&6; } if ${gl_cv_func_iswcntrl_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_iswcntrl_works=yes else gl_cv_func_iswcntrl_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_iswcntrl_works=yes else gl_cv_func_iswcntrl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : fi if test $REPLACE_ISWCNTRL = 1; then REPLACE_TOWLOWER=1 else for ac_func in towlower do : ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" if test "x$ac_cv_func_towlower" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOWLOWER 1 _ACEOF fi done if test $ac_cv_func_towlower = yes; then REPLACE_TOWLOWER=0 else ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif " if test "x$ac_cv_have_decl_towlower" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TOWLOWER $ac_have_decl _ACEOF if test $ac_cv_have_decl_towlower = yes; then REPLACE_TOWLOWER=1 else REPLACE_TOWLOWER=0 fi fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 $as_echo_n "checking for wctype_t... " >&6; } if ${gl_cv_type_wctype_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif wctype_t a; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_type_wctype_t=yes else gl_cv_type_wctype_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 $as_echo "$gl_cv_type_wctype_t" >&6; } if test $gl_cv_type_wctype_t = no; then HAVE_WCTYPE_T=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 $as_echo_n "checking for wctrans_t... " >&6; } if ${gl_cv_type_wctrans_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include wctrans_t a; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_type_wctrans_t=yes else gl_cv_type_wctrans_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 $as_echo "$gl_cv_type_wctrans_t" >&6; } if test $gl_cv_type_wctrans_t = no; then HAVE_WCTRANS_T=0 fi for gl_func in wctype iswctype wctrans towctrans ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" " /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_wcwidth" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCWIDTH $ac_have_decl _ACEOF if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = yes; then HAVE_WCWIDTH=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } if ${gl_cv_func_wcwidth_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on glibc and AIX 7 systems. *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; *) gl_cv_func_wcwidth_works="guessing no";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if !HAVE_DECL_WCWIDTH extern # ifdef __cplusplus "C" # endif int wcwidth (int); #endif int main () { int result = 0; if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) { if (wcwidth (0x0301) > 0) result |= 1; if (wcwidth (0x200B) > 0) result |= 2; } return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_wcwidth_works=yes else gl_cv_func_wcwidth_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5 $as_echo "$gl_cv_func_wcwidth_works" >&6; } case "$gl_cv_func_wcwidth_works" in *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac else HAVE_WCWIDTH=0 fi if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" fi GNULIB_WCWIDTH=1 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h : : : for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF fi done : # End of code from modules gltests_libdeps= gltests_ltlibdeps= gl_source_base='gnulib-tests' gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS gl_module_indicator_condition=$gltests_WITNESS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5 $as_echo_n "checking for a turkish Unicode locale... " >&6; } if ${gt_cv_locale_tr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. But BeOS does not implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the eighth month, the second character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) return 1; /* Check whether the upper-/lowercase mappings are as expected for Turkish. */ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=Turkish_Turkey.65001 else # None found. gt_cv_locale_tr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr.UTF-8 else # None found. gt_cv_locale_tr_utf8=none fi fi fi ;; esac else gt_cv_locale_tr_utf8=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 $as_echo "$gt_cv_locale_tr_utf8" >&6; } LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 if test "$GNULIB_ENVIRON" != 1; then if test "$GNULIB_ENVIRON" = 0; then GNULIB_ENVIRON=$gl_module_indicator_condition else GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition _ACEOF if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_FDOPEN=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5 $as_echo_n "checking whether fdopen sets errno... " >&6; } if ${gl_cv_func_fdopen_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) gl_cv_func_fdopen_works="guessing no" ;; *) gl_cv_func_fdopen_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { FILE *fp; errno = 0; fp = fdopen (-1, "r"); if (fp != NULL) return 1; if (errno == 0) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_fdopen_works=yes else gl_cv_func_fdopen_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5 $as_echo "$gl_cv_func_fdopen_works" >&6; } case "$gl_cv_func_fdopen_works" in *no) REPLACE_FDOPEN=1 ;; esac fi if test $REPLACE_FDOPEN = 1; then gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext" fi if test "$GNULIB_FDOPEN" != 1; then if test "$GNULIB_FDOPEN" = 0; then GNULIB_FDOPEN=$gl_module_indicator_condition else GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done if test $ac_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 for ac_header in OS.h do : ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" if test "x$ac_cv_header_OS_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OS_H 1 _ACEOF fi done if test $ac_cv_header_OS_h = yes; then HAVE_OS_H=1 fi for ac_header in sys/param.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" if test "x$ac_cv_header_sys_param_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_PARAM_H 1 _ACEOF fi done if test $ac_cv_header_sys_param_h = yes; then HAVE_SYS_PARAM_H=1 fi fi case "$host_os" in mingw*) REPLACE_GETPAGESIZE=1 ;; esac ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" if test "x$ac_cv_have_decl_getpagesize" = xyes; then : else HAVE_DECL_GETPAGESIZE=0 fi if test $REPLACE_GETPAGESIZE = 1; then gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext" fi if test "$GNULIB_GETPAGESIZE" != 1; then if test "$GNULIB_GETPAGESIZE" = 0; then GNULIB_GETPAGESIZE=$gl_module_indicator_condition else GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h PRIPTR_PREFIX= if test -n "$STDINT_H"; then PRIPTR_PREFIX='"l"' else for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern intptr_t foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PRIPTR_PREFIX='"'$glpfx'"' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -n "$PRIPTR_PREFIX" && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT32_MAX && defined INTMAX_MAX #define CONDITION (INT32_MAX < INTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (int) < sizeof (long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes else gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then INT32_MAX_LT_INTMAX_MAX=1; else INT32_MAX_LT_INTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT64_MAX #define CONDITION (INT64_MAX == LONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (long long int) == sizeof (long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes else gl_cv_test_INT64_MAX_EQ_LONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then INT64_MAX_EQ_LONG_MAX=1; else INT64_MAX_EQ_LONG_MAX=0; fi else INT64_MAX_EQ_LONG_MAX=-1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT32_MAX && defined UINTMAX_MAX #define CONDITION (UINT32_MAX < UINTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes else gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then UINT32_MAX_LT_UINTMAX_MAX=1; else UINT32_MAX_LT_UINTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT64_MAX #define CONDITION (UINT64_MAX == ULONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes else gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then UINT64_MAX_EQ_ULONG_MAX=1; else UINT64_MAX_EQ_ULONG_MAX=0; fi else UINT64_MAX_EQ_ULONG_MAX=-1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } if ${gl_cv_cc_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "mixed_endianness" >/dev/null 2>&1; then : gl_cv_cc_double_expbit0="unknown" else : if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi : case $ac_cv_c_bigendian in #( yes) gl_cv_cc_double_expbit0="word 0 bit 20";; #( no) gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) gl_cv_cc_double_expbit0="unknown" ;; esac fi rm -f conftest* else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_double_expbit0=`cat conftest.out` else gl_cv_cc_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 $as_echo "$gl_cv_cc_double_expbit0" >&6; } case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if ${gl_cv_cc_float_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_float_expbit0="word 0 bit 23" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_float_expbit0=`cat conftest.out` else gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_expbit0="unknown" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_cc_long_double_expbit0=`cat conftest.out` else gl_cv_cc_long_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } if ${gl_cv_header_locale_h_posix2001+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int x = LC_MESSAGES; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_locale_h_posix2001=yes else gl_cv_header_locale_h_posix2001=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } if test $ac_cv_header_xlocale_h = yes; then HAVE_XLOCALE_H=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 $as_echo_n "checking whether locale.h defines locale_t... " >&6; } if ${gl_cv_header_locale_has_locale_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include locale_t x; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_header_locale_has_locale_t=yes else gl_cv_header_locale_has_locale_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } if test $gl_cv_header_locale_has_locale_t = yes; then gl_cv_header_locale_h_needs_xlocale_h=no else gl_cv_header_locale_h_needs_xlocale_h=yes fi else HAVE_XLOCALE_H=0 gl_cv_header_locale_h_needs_xlocale_h=no fi if test $gl_cv_have_include_next = yes; then gl_cv_next_locale_h='<'locale.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if ${gl_cv_next_locale_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'locale.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 $as_echo "$gl_cv_next_locale_h" >&6; } fi NEXT_LOCALE_H=$gl_cv_next_locale_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'locale.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_locale_h fi NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive for gl_func in setlocale duplocale; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Some systems provide declarations in a non-standard header. */ #if HAVE_XLOCALE_H # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in setlocale uselocale do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include " if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h fi # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5 $as_echo_n "checking for a turkish Unicode locale... " >&6; } if ${gt_cv_locale_tr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. But BeOS does not implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the eighth month, the second character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) return 1; /* Check whether the upper-/lowercase mappings are as expected for Turkish. */ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=Turkish_Turkey.65001 else # None found. gt_cv_locale_tr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr.UTF-8 else # None found. gt_cv_locale_tr_utf8=none fi fi fi ;; esac else gt_cv_locale_tr_utf8=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 $as_echo "$gt_cv_locale_tr_utf8" >&6; } LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; } if ${gl_cv_func_svid_putenv+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_svid_putenv=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Put it in env. */ if (putenv ("CONFTEST_putenv=val")) return 1; /* Try to remove it. */ if (putenv ("CONFTEST_putenv")) return 2; /* Make sure it was deleted. */ if (getenv ("CONFTEST_putenv") != 0) return 3; return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_svid_putenv=yes else gl_cv_func_svid_putenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 $as_echo "$gl_cv_func_svid_putenv" >&6; } if test $gl_cv_func_svid_putenv = no; then REPLACE_PUTENV=1 fi if test $REPLACE_PUTENV = 1; then gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext" fi if test "$GNULIB_PUTENV" != 1; then if test "$GNULIB_PUTENV" = 0; then GNULIB_PUTENV=$gl_module_indicator_condition else GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 $as_echo_n "checking whether setenv validates arguments... " >&6; } if ${gl_cv_func_setenv_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_setenv_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int result = 0; { if (setenv ("", "", 0) != -1) result |= 1; else if (errno != EINVAL) result |= 2; } { if (setenv ("a", "=", 1) != 0) result |= 4; else if (strcmp (getenv ("a"), "=") != 0) result |= 8; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_setenv_works=yes else gl_cv_func_setenv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 $as_echo "$gl_cv_func_setenv_works" >&6; } if test "$gl_cv_func_setenv_works" != yes; then REPLACE_SETENV=1 fi fi if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext" fi if test "$GNULIB_SETENV" != 1; then if test "$GNULIB_SETENV" = 0; then GNULIB_SETENV=$gl_module_indicator_condition else GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h case "$host_os" in mingw*) REPLACE_SETLOCALE=1 ;; cygwin*) case `uname -r` in 1.5.*) REPLACE_SETLOCALE=1 ;; esac ;; esac if test $REPLACE_SETLOCALE = 1; then gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext" : fi if test "$GNULIB_SETLOCALE" != 1; then if test "$GNULIB_SETLOCALE" = 0; then GNULIB_SETLOCALE=$gl_module_indicator_condition else GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN gl_cv_func_snprintf_usable=no for ac_func in snprintf do : ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SNPRINTF 1 _ACEOF fi done if test $ac_cv_func_snprintf = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if ${gl_cv_func_snprintf_size1+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_snprintf_size1="guessing yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_snprintf_size1=yes else gl_cv_func_snprintf_size1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } if ${gl_cv_func_printf_positions+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_printf_positions=yes else gl_cv_func_printf_positions=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 $as_echo "$gl_cv_func_printf_positions" >&6; } case "$gl_cv_func_printf_positions" in *yes) gl_cv_func_snprintf_usable=yes ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext" if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi : fi if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi if test "$GNULIB_SNPRINTF" != 1; then if test "$GNULIB_SNPRINTF" = 0; then GNULIB_SNPRINTF=$gl_module_indicator_condition else GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define GNULIB_SNPRINTF $gl_module_indicator_condition _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_wchar_t=yes else gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_wint_t=yes else gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then $as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } if ${gl_cv_func_symlink_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_symlink_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = 0; if (!symlink ("a", "conftest.link/")) result |= 1; if (symlink ("conftest.f", "conftest.lnk2")) result |= 2; else if (!symlink ("a", "conftest.lnk2/")) result |= 4; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_symlink_works=yes else gl_cv_func_symlink_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.f conftest.link conftest.lnk2 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 $as_echo "$gl_cv_func_symlink_works" >&6; } if test "$gl_cv_func_symlink_works" != yes; then REPLACE_SYMLINK=1 fi fi if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" fi if test "$GNULIB_SYMLINK" != 1; then if test "$GNULIB_SYMLINK" = 0; then GNULIB_SYMLINK=$gl_module_indicator_condition else GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" for ac_func in pthread_atfork do : ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" if test "x$ac_cv_func_pthread_atfork" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_ATFORK 1 _ACEOF fi done LIBS="$gl_save_LIBS" fi if test $ac_cv_have_decl_unsetenv = no; then HAVE_DECL_UNSETENV=0 fi for ac_func in unsetenv do : ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" if test "x$ac_cv_func_unsetenv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNSETENV 1 _ACEOF fi done if test $ac_cv_func_unsetenv = no; then HAVE_UNSETENV=0 else HAVE_UNSETENV=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 $as_echo_n "checking for unsetenv() return type... " >&6; } if ${gt_cv_func_unsetenv_ret+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #undef _BSD #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ #include extern #ifdef __cplusplus "C" #endif int unsetenv (const char *name); int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_func_unsetenv_ret='int' else gt_cv_func_unsetenv_ret='void' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 $as_echo "$gt_cv_func_unsetenv_ret" >&6; } if test $gt_cv_func_unsetenv_ret = 'void'; then $as_echo "#define VOID_UNSETENV 1" >>confdefs.h REPLACE_UNSETENV=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } if ${gl_cv_func_unsetenv_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_unsetenv_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern char **environ; int main () { char entry1[] = "a=1"; char entry2[] = "b=2"; char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; if (putenv (entry2)) return 2; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; if (!unsetenv ("") || errno != EINVAL) return 4; entry2[0] = 'b'; environ = env; if (!getenv ("a")) return 5; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 6; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_unsetenv_works=yes else gl_cv_func_unsetenv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 $as_echo "$gl_cv_func_unsetenv_works" >&6; } if test "$gl_cv_func_unsetenv_works" != yes; then REPLACE_UNSETENV=1 fi fi if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext" fi if test "$GNULIB_UNSETENV" != 1; then if test "$GNULIB_UNSETENV" = 0; then GNULIB_UNSETENV=$gl_module_indicator_condition else GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h abs_aux_dir=`cd "$ac_aux_dir"; pwd` abs_aux_dir=`cd "$ac_aux_dir"; pwd` # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN if test $ac_cv_func_wctob = no; then HAVE_WCTOB=0 HAVE_DECL_WCTOB=0 else HAVE_WCTOB=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5 $as_echo_n "checking whether wctob works... " >&6; } if ${gl_cv_func_wctob_works+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris <= 9 and Cygwin. solaris2.[1-9] | solaris2.[1-9].* | cygwin*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac case "$host_os" in cygwin*) if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include register long global __asm__ ("%ebx"); int main () { setlocale (LC_ALL, "en_US.UTF-8"); global = 0x12345678; if (wctob (0x00FC) != -1) return 1; if (global != 0x12345678) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : : else gl_cv_func_wctob_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { wchar_t wc; if (mbtowc (&wc, "\374", 1) == 1) if (wctob (wc) != (unsigned char) '\374') return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_wctob_works=yes else gl_cv_func_wctob_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5 $as_echo "$gl_cv_func_wctob_works" >&6; } case "$gl_cv_func_wctob_works" in *yes) ;; *) REPLACE_WCTOB=1 ;; esac if test $REPLACE_WCTOB = 0; then ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" " /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include " if test "x$ac_cv_have_decl_wctob" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCTOB $ac_have_decl _ACEOF if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 fi fi fi if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" : fi if test "$GNULIB_WCTOB" != 1; then if test "$GNULIB_WCTOB" = 0; then GNULIB_WCTOB=$gl_module_indicator_condition else GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h if false; then REPLACE_WCTOMB=1 fi if test $REPLACE_WCTOMB = 1; then gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext" : fi if test "$GNULIB_WCTOMB" != 1; then if test "$GNULIB_WCTOMB" = 0; then GNULIB_WCTOMB=$gl_module_indicator_condition else GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)" fi fi $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h YIELD_LIB= if test $gl_threads_api = posix; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 $as_echo_n "checking for sched_yield in -lrt... " >&6; } if ${ac_cv_lib_rt_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_sched_yield=yes else ac_cv_lib_rt_sched_yield=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : YIELD_LIB=-lrt else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 $as_echo_n "checking for sched_yield in -lposix4... " >&6; } if ${ac_cv_lib_posix4_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix4_sched_yield=yes else ac_cv_lib_posix4_sched_yield=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : YIELD_LIB=-lposix4 fi fi fi LIBGNU_LIBDEPS="$gl_libdeps" LIBGNU_LTLIBDEPS="$gl_ltlibdeps" LIBTESTS_LIBDEPS="$gltests_libdeps" # Check whether --enable-gcc-warnings was given. if test "${enable_gcc_warnings+set}" = set; then : enableval=$enable_gcc_warnings; case $enableval in yes|no) ;; *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;; esac gl_gcc_warnings=$enableval else gl_gcc_warnings=no fi if test "$gl_gcc_warnings" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5 $as_echo_n "checking whether compiler handles -Werror... " >&6; } if ${gl_cv_warn__Werror+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Werror=yes else gl_cv_warn__Werror=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5 $as_echo "$gl_cv_warn__Werror" >&6; } if test "x$gl_cv_warn__Werror" = xyes; then : as_fn_append WERROR_CFLAGS " -Werror" fi # Add many warnings, except some... nw="$nw -Wdeclaration-after-statement" # too useful to forbid nw="$nw -Waggregate-return" # anachronistic nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often nw="$nw -Wcast-qual" # Too many warnings for now nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Wsign-conversion" # Too many warnings for now nw="$nw -Wtraditional-conversion" # Too many warnings for now nw="$nw -Wunreachable-code" # Too many warnings for now nw="$nw -Wpadded" # Our structs are not padded nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat nw="$nw -Wlogical-op" # any use of fwrite provokes this nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses nw="$nw -Wvla" # warnings in gettext.h nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now nw="$nw -Winline" # things I might fix soon: nw="$nw -Wstrict-overflow" # fid.c nw="$nw -Wunsafe-loop-optimizations" # mkid.c if test -n "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } if ${gl_cv_cc_nomfi_supported+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_cc_nomfi_supported=yes else gl_cv_cc_nomfi_supported=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$gl_save_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 $as_echo "$gl_cv_cc_nomfi_supported" >&6; } if test "$gl_cv_cc_nomfi_supported" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } if ${gl_cv_cc_nomfi_needed+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -W -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void f (void) { typedef struct { int a; int b; } s_t; s_t s1 = { 0, }; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_cc_nomfi_needed=no else gl_cv_cc_nomfi_needed=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$gl_save_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 $as_echo "$gl_cv_cc_nomfi_needed" >&6; } fi fi gl_manywarn_set= for gl_manywarn_item in \ -Wall \ -W \ -Wformat-y2k \ -Wformat-nonliteral \ -Wformat-security \ -Winit-self \ -Wmissing-include-dirs \ -Wswitch-default \ -Wswitch-enum \ -Wunused \ -Wunknown-pragmas \ -Wstrict-aliasing \ -Wstrict-overflow \ -Wsystem-headers \ -Wfloat-equal \ -Wtraditional \ -Wtraditional-conversion \ -Wdeclaration-after-statement \ -Wundef \ -Wshadow \ -Wunsafe-loop-optimizations \ -Wpointer-arith \ -Wbad-function-cast \ -Wc++-compat \ -Wcast-qual \ -Wcast-align \ -Wwrite-strings \ -Wconversion \ -Wsign-conversion \ -Wlogical-op \ -Waggregate-return \ -Wstrict-prototypes \ -Wold-style-definition \ -Wmissing-prototypes \ -Wmissing-declarations \ -Wmissing-noreturn \ -Wmissing-format-attribute \ -Wpacked \ -Wpadded \ -Wredundant-decls \ -Wnested-externs \ -Wunreachable-code \ -Winline \ -Winvalid-pch \ -Wlong-long \ -Wvla \ -Wvolatile-register-var \ -Wdisabled-optimization \ -Wstack-protector \ -Woverlength-strings \ -Wbuiltin-macro-redefined \ -Wmudflap \ -Wpacked-bitfield-compat \ -Wsync-nand \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # The following are not documented in the manual but are included in # output from gcc --help=warnings. for gl_manywarn_item in \ -Wattributes \ -Wcoverage-mismatch \ -Wmultichar \ -Wunused-macros \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # More warnings from gcc 4.6.2 --help=warnings. for gl_manywarn_item in \ -Wabi \ -Wcpp \ -Wdeprecated \ -Wdeprecated-declarations \ -Wdiv-by-zero \ -Wdouble-promotion \ -Wendif-labels \ -Wextra \ -Wformat-contains-nul \ -Wformat-extra-args \ -Wformat-zero-length \ -Wformat=2 \ -Wmultichar \ -Wnormalized=nfc \ -Woverflow \ -Wpointer-to-int-cast \ -Wpragmas \ -Wsuggest-attribute=const \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ -Wtrampolines \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done # Disable the missing-field-initializers warning if needed if test "$gl_cv_cc_nomfi_needed" = yes; then gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" fi ws=$gl_manywarn_set gl_warn_set= set x $ws; shift for gl_warn_item do case " $nw " in *" $gl_warn_item "*) ;; *) gl_warn_set="$gl_warn_set $gl_warn_item" ;; esac done ws=$gl_warn_set for w in $ws; do as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5 $as_echo_n "checking whether compiler handles $w... " >&6; } if eval \${$as_gl_Warn+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} $w" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : eval "$as_gl_Warn=yes" else eval "$as_gl_Warn=no" fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi eval ac_res=\$$as_gl_Warn { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then : as_fn_append WARN_CFLAGS " $w" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-missing-field-initializers" >&5 $as_echo_n "checking whether compiler handles -Wno-missing-field-initializers... " >&6; } if ${gl_cv_warn__Wno_missing_field_initializers+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Wno-missing-field-initializers" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Wno_missing_field_initializers=yes else gl_cv_warn__Wno_missing_field_initializers=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_missing_field_initializers" >&5 $as_echo "$gl_cv_warn__Wno_missing_field_initializers" >&6; } if test "x$gl_cv_warn__Wno_missing_field_initializers" = xyes; then : as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" fi # We need this one { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-compare" >&5 $as_echo_n "checking whether compiler handles -Wno-sign-compare... " >&6; } if ${gl_cv_warn__Wno_sign_compare+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Wno-sign-compare" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Wno_sign_compare=yes else gl_cv_warn__Wno_sign_compare=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_compare" >&5 $as_echo "$gl_cv_warn__Wno_sign_compare" >&6; } if test "x$gl_cv_warn__Wno_sign_compare" = xyes; then : as_fn_append WARN_CFLAGS " -Wno-sign-compare" fi # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-pointer-sign" >&5 $as_echo_n "checking whether compiler handles -Wno-pointer-sign... " >&6; } if ${gl_cv_warn__Wno_pointer_sign+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Wno-pointer-sign" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Wno_pointer_sign=yes else gl_cv_warn__Wno_pointer_sign=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_pointer_sign" >&5 $as_echo "$gl_cv_warn__Wno_pointer_sign" >&6; } if test "x$gl_cv_warn__Wno_pointer_sign" = xyes; then : as_fn_append WARN_CFLAGS " -Wno-pointer-sign" fi # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-unused-parameter" >&5 $as_echo_n "checking whether compiler handles -Wno-unused-parameter... " >&6; } if ${gl_cv_warn__Wno_unused_parameter+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Wno-unused-parameter" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Wno_unused_parameter=yes else gl_cv_warn__Wno_unused_parameter=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_unused_parameter" >&5 $as_echo "$gl_cv_warn__Wno_unused_parameter" >&6; } if test "x$gl_cv_warn__Wno_unused_parameter" = xyes; then : as_fn_append WARN_CFLAGS " -Wno-unused-parameter" fi # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; } if ${gl_cv_warn__fdiagnostics_show_option+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__fdiagnostics_show_option=yes else gl_cv_warn__fdiagnostics_show_option=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5 $as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; } if test "x$gl_cv_warn__fdiagnostics_show_option" = xyes; then : as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-format-nonliteral" >&5 $as_echo_n "checking whether compiler handles -Wno-format-nonliteral... " >&6; } if ${gl_cv_warn__Wno_format_nonliteral+:} false; then : $as_echo_n "(cached) " >&6 else gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} -Wno-format-nonliteral" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gl_cv_warn__Wno_format_nonliteral=yes else gl_cv_warn__Wno_format_nonliteral=no fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_format_nonliteral" >&5 $as_echo "$gl_cv_warn__Wno_format_nonliteral" >&6; } if test "x$gl_cv_warn__Wno_format_nonliteral" = xyes; then : as_fn_append WARN_CFLAGS " -Wno-format-nonliteral" fi $as_echo "#define lint 1" >>confdefs.h $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # check functions # if HAVE_LINK, then in the code we look for file aliases # if HAVE_SBRK, then we can generate statistics on memory usage for ac_func in link sbrk lstat do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= for ac_prog in emacs xemacs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir was given. if test "${with_lispdir+set}" = set; then : withval=$with_lispdir; lispdir="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 $as_echo "$lispdir" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } if ${am_cv_lispdir+:} false; then : $as_echo_n "(cached) " >&6 else if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. { { $as_echo "$as_me:${as_lineno-$LINENO}: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' conftest.out"; } >&5 ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 $as_echo "$am_cv_lispdir" >&6; } lispdir="$am_cv_lispdir" fi # Checks for header files. for ac_header in termios.h sys/ioctl.h termio.h sgtty.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTRDIFF_T 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.18 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" ac_config_files="$ac_config_files po/Makefile.in doc/Makefile man/Makefile lib/Makefile libidu/Makefile lisp/Makefile testsuite/Makefile gnulib-tests/Makefile src/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then as_fn_error $? "conditional \"GNU_MAKE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi CONFIG_INCLUDE=lib/config.h if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by idutils $as_me 4.6, which was generated by GNU Autoconf 2.68.136-a1a00. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ idutils config.status 4.6 configured by $0, generated by GNU Autoconf 2.68.136-a1a00, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" GNUmakefile=$GNUmakefile # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "libidu/Makefile") CONFIG_FILES="$CONFIG_FILES libidu/Makefile" ;; "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi id-utils-4.6+git20120811/build-aux/0000775000000000000000000000000012210465166013300 5ustar id-utils-4.6+git20120811/build-aux/snippet/0000775000000000000000000000000012210465166014762 5ustar id-utils-4.6+git20120811/build-aux/snippet/arg-nonnull.h0000664000000000000000000000230012165627373017373 0ustar /* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 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 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 . */ /* _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 id-utils-4.6+git20120811/build-aux/snippet/warn-on-use.h0000664000000000000000000001201612165627373017317 0ustar /* A C macro for emitting warnings if a function is used. Copyright (C) 2010-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 . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #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 id-utils-4.6+git20120811/build-aux/snippet/c++defs.h0000664000000000000000000002675312165627373016373 0ustar /* C++ compatible function declaration macros. Copyright (C) 2010-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 . */ #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 */ id-utils-4.6+git20120811/build-aux/snippet/_Noreturn.h0000664000000000000000000000042012165627373017113 0ustar #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif id-utils-4.6+git20120811/build-aux/vc-list-files0000775000000000000000000000734312166360012015710 0ustar #!/bin/sh # List version-controlled file names. # Print a version string. scriptversion=2011-05-16.22; # UTC # 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 . # List the specified version-controlled files. # With no argument, list them all. With a single DIRECTORY argument, # list the version-controlled files in that directory. # If there's an argument, it must be a single, "."-relative directory name. # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ postprocess= case $1 in --help) cat <. EOF exit ;; --version) year=`echo "$scriptversion" | sed 's/[^0-9].*//'` cat < This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF exit ;; -C) test "$2" = . || postprocess="| sed 's|^|$2/|'" cd "$2" || exit 1 shift; shift ;; esac test $# = 0 && set . for dir do if test -d .git; then test "x$dir" = x. \ && dir= sed_esc= \ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } # Ignore git symlinks - either they point into the tree, in which case # we don't need to visit the target twice, or they point somewhere # else (often into a submodule), in which case the content does not # belong to this package. eval exec git ls-tree -r 'HEAD:"$dir"' \ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess elif test -d .hg; then eval exec hg locate '"$dir/*"' $postprocess elif test -d .bzr; then test "$postprocess" = '' && postprocess="| sed 's|^\./||'" eval exec bzr ls -R --versioned '"$dir"' $postprocess elif test -d CVS; then test "$postprocess" = '' && postprocess="| sed 's|^\./||'" if test -x build-aux/cvsu; then eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess elif (cvsu --help) >/dev/null 2>&1; then eval cvsu --find --types=AFGM '"$dir"' $postprocess else eval awk -F/ \''{ \ if (!$1 && $3 !~ /^-/) { \ f=FILENAME; \ if (f ~ /CVS\/Entries$/) \ f = substr(f, 1, length(f)-11); \ print f $2; \ }}'\'' \ `find "$dir" -name Entries -print` /dev/null' $postprocess fi elif test -d .svn; then eval exec svn list -R '"$dir"' $postprocess else echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 exit 1 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: id-utils-4.6+git20120811/build-aux/update-copyright0000775000000000000000000002241412166360012016513 0ustar eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' & eval 'exec perl -wS -0777 -pi "$0" $argv:q' if 0; # Update an FSF copyright year list to include the current year. my $VERSION = '2012-01-27.09:18'; # UTC # Copyright (C) 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 by # the Free Software Foundation; either version 3, 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 Jim Meyering and Joel E. Denny # The arguments to this script should be names of files that contain # copyright statements to be updated. The copyright holder's name # defaults to "Free Softward Foundation, Inc." but may be changed to # any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment # variable. # # For example, you might wish to use the update-copyright target rule # in maint.mk from gnulib's maintainer-makefile module. # # Iff a copyright statement is recognized in a file and the final # year is not the current year, then the statement is updated for the # new year and it is reformatted to: # # 1. Fit within 72 columns. # 2. Convert 2-digit years to 4-digit years by prepending "19". # 3. Expand copyright year intervals. (See "Environment variables" # below.) # # A warning is printed for every file for which no copyright # statement is recognized. # # Each file's copyright statement must be formated correctly in # order to be recognized. For example, each of these is fine: # # Copyright @copyright{} 1990-2005, 2007-2009 Free Software # Foundation, Inc. # # # Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. # # /* # * Copyright © 90,2005,2007-2009 # * Free Software Foundation, Inc. # */ # # However, the following format is not recognized because the line # prefix changes after the first line: # # ## Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. # # However, any correctly formatted copyright statement following # a non-matching copyright statements would be recognized. # # The exact conditions that a file's copyright statement must meet # to be recognized are: # # 1. It is the first copyright statement that meets all of the # following conditions. Subsequent copyright statements are # ignored. # 2. Its format is "Copyright (C)", then a list of copyright years, # and then the name of the copyright holder. # 3. The "(C)" takes one of the following forms or is omitted # entirely: # # A. (C) # B. (c) # C. @copyright{} # D. © # # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than # 5 characters -- including white space. # 5. Iff such a prefix is present, the same prefix appears at the # beginning of each remaining line within the FSF copyright # statement. There is one exception in order to support C-style # comments: if the first line's prefix contains nothing but # whitespace surrounding a "/*", then the prefix for all subsequent # lines is the same as the first line's prefix except with each of # "/" and possibly "*" replaced by a " ". The replacement of "*" # by " " is consistent throughout all subsequent lines. # 6. Blank lines, even if preceded by the prefix, do not appear # within the FSF copyright statement. # 7. Each copyright year is 2 or 4 digits, and years are separated by # commas or dashes. Whitespace may appear after commas. # # Environment variables: # # 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement # is reformatted even if it does not need updating for the new # year. If unset or set to 0, only updated FSF copyright # statements are reformatted. # 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive # copyright years (such as 90, 1991, 1992-2007, 2008) in a # reformatted FSF copyright statement is collapsed to a single # interval (such as 1990-2008). If unset or set to 0, all existing # copyright year intervals in a reformatted FSF copyright statement # are expanded instead. # If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps # to the minimal containing range. For example, convert # 2000, 2004-2007, 2009 to 2000-2009. # 3. For testing purposes, you can set the assumed current year in # UPDATE_COPYRIGHT_YEAR. # 4. The default maximum line length for a copyright line is 72. # Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length. # 5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other # than "Free Software Foundation, Inc.". use strict; use warnings; my $copyright_re = 'Copyright'; my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; !$margin || $margin !~ m/^\d+$/ and $margin = 72; my $tab_width = 8; my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR}; if (!$this_year || $this_year !~ m/^\d{4}$/) { my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ()); $this_year = $year + 1900; } # Unless the file consistently uses "\r\n" as the EOL, use "\n" instead. my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n"; my $leading; my $prefix; my $ws_re; my $stmt_re; while (/(^|\n)(.{0,$prefix_max})$copyright_re/g) { $leading = "$1$2"; $prefix = $2; if ($prefix =~ /^(\s*\/)\*(\s*)$/) { $prefix =~ s,/, ,; my $prefix_ws = $prefix; $prefix_ws =~ s/\*/ /; # Only whitespace. if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/) { $prefix = $prefix_ws; } } $ws_re = '[ \t\r\f]'; # \s without \n $ws_re = "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)"; my $holder_re = $holder; $holder_re =~ s/\s/$ws_re/g; my $stmt_remainder_re = "(?:$ws_re$circle_c_re)?" . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*" . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re"; if (/\G$stmt_remainder_re/) { $stmt_re = quotemeta($leading) . "($copyright_re$stmt_remainder_re)"; last; } } if (defined $stmt_re) { /$stmt_re/ or die; # Should never die. my $stmt = $1; my $final_year_orig = $2; # Handle two-digit year numbers like "98" and "99". my $final_year = $final_year_orig; $final_year <= 99 and $final_year += 1900; if ($final_year != $this_year) { # Update the year. $stmt =~ s/$final_year_orig/$final_year, $this_year/; } if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'}) { # Normalize all whitespace including newline-prefix sequences. $stmt =~ s/$ws_re/ /g; # Put spaces after commas. $stmt =~ s/, ?/, /g; # Convert 2-digit to 4-digit years. $stmt =~ s/(\b\d\d\b)/19$1/g; # Make the use of intervals consistent. if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS}) { $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg; } else { $stmt =~ s/ (\d{4}) (?: (,\ |-) ((??{ if ($2 eq '-') { '\d{4}'; } elsif (!$3) { $1 + 1; } else { $3 + 1; } })) )+ /$1-$3/gx; # When it's 2, emit a single range encompassing all year numbers. $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2 and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/; } # Format within margin. my $stmt_wrapped; my $text_margin = $margin - length($prefix); if ($prefix =~ /^(\t+)/) { $text_margin -= length($1) * ($tab_width - 1); } while (length $stmt) { if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//) || ($stmt =~ s/^([\S]+)(?: |$)//)) { my $line = $1; $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading; $stmt_wrapped .= $line; } else { # Should be unreachable, but we don't want an infinite # loop if it can be reached. die; } } # Replace the old copyright statement. s/$stmt_re/$stmt_wrapped/; } } else { print STDERR "$ARGV: warning: copyright statement not found\n"; } # Local variables: # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC" # time-stamp-end: "'; # UTC" # End: id-utils-4.6+git20120811/build-aux/do-release-commit-and-tag0000775000000000000000000001100412166360012020033 0ustar #!/bin/sh # In a git/autoconf/automake-enabled project with a NEWS file and a version- # controlled .prev-version file, automate the procedure by which we record # the date, release-type and version string in the NEWS file. That commit # will serve to identify the release, so apply a signed tag to it as well. VERSION=2011-05-04.11 # UTC # Note: this is a bash script (could be zsh or dash) # Copyright (C) 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 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 Jim Meyering ME=`basename "$0"` warn() { printf '%s: %s\n' "$ME" "$*" >&2; } die() { warn "$*"; exit 1; } help_version() { case $1 in --help) cat <. EOF exit ;; --version) year=`echo "$VERSION" | sed 's/[^0-9].*//'` cat < This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF exit ;; *) die "unrecognized option: $1";; esac } branch=master case $1 in --branch) shift; branch=$1; shift ;; esac case $# in 1) help_version $1; exit 0;; 2) ;; *) warn "Usage: $ME [OPTION...] VERSION TYPE"; exit 1;; esac ver=$1 type=$2 # Verify that $ver looks like a version number, and... echo "$ver"|grep -E '^[0-9][0-9.]*[0-9]$' > /dev/null \ || die "invalid version: $ver" prev_ver=$(cat .prev-version) \ || die 'failed to determine previous version number from .prev-version' # Verify that $ver is sensible (> .prev-version). case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in "$prev_ver:$ver:") ;; *) die "invalid version: $ver";; esac case $type in alpha|beta|stable) ;; *) die "invalid release type: $type";; esac # Extract package name from Makefile. pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) \ || die 'failed to determine package name from Makefile' # simple check: no question marks on line 3 of NEWS noteworthy='* Noteworthy changes in release' test "$(sed -n 3p NEWS)" = "$noteworthy ?.? (????-??-??) [?]" \ || die 'line 3 of NEWS looks fishy!' # No dirt allowed. case $(git diff-index --name-only HEAD) in '') ;; *) die 'this tree is dirty; commit your changes first';; esac # update NEWS to have today's date, plus desired version number and $type perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \ -e 'my ($type, $ver) = qw('"$type $ver"');' \ -e 'my $pfx = "'"$noteworthy"'";' \ -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \ NEWS || die 'failed to update NEWS' # Ensure the current branch name is correct: curr_br=$(git rev-parse --symbolic-full-name HEAD) test "$curr_br" = refs/heads/$branch || die not on branch $branch printf "version $ver\n\n* NEWS: Record release date.\n" \ | git commit -F - -a || die 'git commit failed' git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed' # Local variables: # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: " # UTC" # End: id-utils-4.6+git20120811/build-aux/texinfo.tex0000664000000000000000000115671112166360012015504 0ustar % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2012-01-19.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. % % This texinfo.tex file 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 texinfo.tex file 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 . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). This command % is not documented, not supported, and doesn't work. % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\relax % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi \aftersmartic } % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} \long\def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\headingsoff{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi % Test to see if parskip is larger than space between lines of % table. If not, do nothing. % If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\indicateurl \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\}{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \fi % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. We'll always have at % least two. \tempnum = 2 % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % % ... and for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten as % part of reading whitespace after a control sequence. It does not % eat a catcode 13 newline. There's no good way to handle the two % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX % would then have different behavior). See the Macro Details node in % the manual for the workaround we recommend for macros and % line-oriented commands. % \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % For macro processing make @ a letter so that we can make Texinfo private macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH % in the params list to some hook where the argument si to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. % % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, you need that no macro has more than 256 arguments, otherwise an % error is produced. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \catcode `\@=11\relax \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } % \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } \def\macargexpandinbody@{% %% Define the named-macro outside of this group and then close this group. \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Save the token stack pointer into macro #1 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} % Restore the token stack pointer from number in macro #1 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} % newtoks that can be used non \outer . \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} % Tailing missing arguments are set to empty \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } % This defines a Texinfo @macro. There are eight cases: recursive and % nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else \ifnum\paramno<10\relax % at most 9 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % at most 9 \ifnum\paramno<10\relax \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{% \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} % \newbox\topbox \newbox\printedrefnamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % % If the printed reference name (arg #3) was not explicitly given in % the @xref, figure out what we want to use. \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Auto section-title: use chapter/section title inside % the square brackets if we have it. \ifdim \wd\printedmanualbox > 0pt % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % \edef\pdfxrefdest{#1}% \txiescapepdf\pdfxrefdest % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % % Cross-manual reference. Only include the "Section ``foo'' in" if % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual} % outputs simply "see The Foo Manual". \ifdim \wd\printedmanualbox > 0pt % What is the 7sp about? The idea is that we also want to omit % the Section part if we would be printing "Top", since they are % clearly trying to refer to the whole manual. But, this being % TeX, we can't easily compare strings while ignoring the possible % spaces before and after in the input. By adding the arbitrary % 7sp, we make it much less likely that a real node name would % happen to have the same width as "Top" (e.g., in a monospaced font). % I hope it will never happen in practice. % % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. % \setbox\topbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% \ifdim \wd2 > 7sp \ifdim \wd2 = \wd\topbox \else \putwordSection{} ``\printedrefname'' \putwordin{}\space \fi \fi \cite{\printedmanual}% \else % Reference in this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut % % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisiundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % The story here is that in math mode, the \char of \backslashcurfont % ends up printing the roman \ from the math symbol font (because \char % in math mode uses the \mathcode, and plain.tex sets % \mathcode`\\="026E). It seems better for @backslashchar{} to always % print a typewriter backslash, hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore id-utils-4.6+git20120811/build-aux/config.guess0000775000000000000000000012716112166360012015622 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-01-01' # This file 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: id-utils-4.6+git20120811/build-aux/gendocs.sh0000775000000000000000000003200212166360012015250 0ustar #!/bin/sh -e # gendocs.sh -- generate a GNU manual in many formats. This script is # mentioned in maintain.texi. See the help message below for usage details. scriptversion=2011-04-08.14 # Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 . # # Original author: Mohit Agarwal. # Send bug reports and any other correspondence to bug-texinfo@gnu.org. # # The latest version of this script, and the companion template, is # available from Texinfo CVS: # http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh # http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template # # An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib). prog=`basename "$0"` srcdir=`pwd` scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh" templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template" : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} : ${MAKEINFO="makeinfo"} : ${TEXI2DVI="texi2dvi -t @finalout"} : ${DVIPS="dvips"} : ${DOCBOOK2HTML="docbook2html"} : ${DOCBOOK2PDF="docbook2pdf"} : ${DOCBOOK2PS="docbook2ps"} : ${DOCBOOK2TXT="docbook2txt"} : ${GENDOCS_TEMPLATE_DIR="."} : ${TEXI2HTML="texi2html"} unset CDPATH unset use_texi2html version="gendocs.sh $scriptversion Copyright 2010 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING." usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source. See the GNU Maintainers document for a more extensive discussion: http://www.gnu.org/prep/maintain_toc.html Options: -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi} -o OUTDIR write files into OUTDIR, instead of manual/. --email ADR use ADR as contact in generated web pages. --docbook convert to DocBook too (xml, txt, html, pdf and ps). --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets. --texi2html use texi2html to generate HTML targets. --help display this help and exit successfully. --version display version information and exit successfully. Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\" Typical sequence: cd PACKAGESOURCE/doc wget \"$scripturl\" wget \"$templateurl\" $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\" Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR to override). Move all the new files into your web CVS tree, as explained in the Web Pages node of maintain.texi. Please use the --email ADDRESS option to specify your bug-reporting address in the generated HTML pages. MANUAL-TITLE is included as part of the HTML of the overall manual/index.html file. It should include the name of the package being documented. manual/index.html is created by substitution from the file $GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the generic template for your own purposes.) If you have several manuals, you'll need to run this script several times with different MANUAL values, specifying a different output directory with -o each time. Then write (by hand) an overall index.html with links to them all. If a manual's Texinfo sources are spread across several directories, first copy or symlink all Texinfo sources into a single directory. (Part of the script's work is to make a tar.gz of the sources.) You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and DVIPS to control the programs that get executed, and GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is looked for. With --docbook, the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected. By default, makeinfo and texi2dvi are run in the default (English) locale, since that's the language of most Texinfo manuals. If you happen to have a non-English manual and non-English web site, see the SETLANG setting in the source. Email bug reports or enhancement requests to bug-texinfo@gnu.org. " calcsize() { size=`ls -ksl $1 | awk '{print $1}'` echo $size } MANUAL_TITLE= PACKAGE= EMAIL=webmasters@gnu.org # please override with --email htmlarg= outdir=manual srcfile= while test $# -gt 0; do case $1 in --email) shift; EMAIL=$1;; --help) echo "$usage"; exit 0;; --version) echo "$version"; exit 0;; -s) shift; srcfile=$1;; -o) shift; outdir=$1;; --docbook) docbook=yes;; --html) shift; htmlarg=$1;; --texi2html) use_texi2html=1;; -*) echo "$0: Unknown option \`$1'." >&2 echo "$0: Try \`--help' for more information." >&2 exit 1;; *) if test -z "$PACKAGE"; then PACKAGE=$1 elif test -z "$MANUAL_TITLE"; then MANUAL_TITLE=$1 else echo "$0: extra non-option argument \`$1'." >&2 exit 1 fi;; esac shift done # For most of the following, the base name is just $PACKAGE base=$PACKAGE if test -n "$srcfile"; then # but here, we use the basename of $srcfile base=`basename "$srcfile"` case $base in *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;; esac PACKAGE=$base elif test -s "$srcdir/$PACKAGE.texinfo"; then srcfile=$srcdir/$PACKAGE.texinfo elif test -s "$srcdir/$PACKAGE.texi"; then srcfile=$srcdir/$PACKAGE.texi elif test -s "$srcdir/$PACKAGE.txi"; then srcfile=$srcdir/$PACKAGE.txi else echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2 exit 1 fi if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2 echo "$0: it is available from $templateurl." >&2 exit 1 fi case $outdir in /*) abs_outdir=$outdir;; *) abs_outdir=$srcdir/$outdir;; esac echo Generating output formats for $srcfile cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\"" echo "Generating info files... ($cmd)" eval "$cmd" mkdir -p "$outdir/" tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info* info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"` # do not mv the info files, there's no point in having them available # separately on the web. cmd="$SETLANG ${TEXI2DVI} \"$srcfile\"" echo "Generating dvi ... ($cmd)" eval "$cmd" # now, before we compress dvi: echo Generating postscript... ${DVIPS} $PACKAGE -o gzip -f -9 $PACKAGE.ps ps_gz_size=`calcsize $PACKAGE.ps.gz` mv $PACKAGE.ps.gz "$outdir/" # compress/finish dvi: gzip -f -9 $PACKAGE.dvi dvi_gz_size=`calcsize $PACKAGE.dvi.gz` mv $PACKAGE.dvi.gz "$outdir/" cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\"" echo "Generating pdf ... ($cmd)" eval "$cmd" pdf_size=`calcsize $PACKAGE.pdf` mv $PACKAGE.pdf "$outdir/" cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\"" echo "Generating ASCII... ($cmd)" eval "$cmd" ascii_size=`calcsize $PACKAGE.txt` gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz" ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"` mv $PACKAGE.txt "$outdir/" html_split() { opt="--split=$1 $htmlarg --node-files" cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\"" echo "Generating html by $1... ($cmd)" eval "$cmd" split_html_dir=$PACKAGE.html ( cd ${split_html_dir} || exit 1 ln -sf ${PACKAGE}.html index.html tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html ) eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"` rm -f "$outdir"/html_$1/*.html mkdir -p "$outdir/html_$1/" mv ${split_html_dir}/*.html "$outdir/html_$1/" rmdir ${split_html_dir} } if test -z "$use_texi2html"; then opt="--no-split --html -o $PACKAGE.html $htmlarg" cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" echo "Generating monolithic html... ($cmd)" rm -rf $PACKAGE.html # in case a directory is left over eval "$cmd" html_mono_size=`calcsize $PACKAGE.html` gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` mv $PACKAGE.html "$outdir/" cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\"" echo "Generating html by node... ($cmd)" eval "$cmd" split_html_dir=$PACKAGE.html ( cd ${split_html_dir} || exit 1 tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html ) html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"` rm -f "$outdir"/html_node/*.html mkdir -p "$outdir/html_node/" mv ${split_html_dir}/*.html "$outdir/html_node/" rmdir ${split_html_dir} else cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\"" echo "Generating monolithic html... ($cmd)" rm -rf $PACKAGE.html # in case a directory is left over eval "$cmd" html_mono_size=`calcsize $PACKAGE.html` gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` mv $PACKAGE.html "$outdir/" html_split node html_split chapter html_split section fi echo Making .tar.gz for sources... d=`dirname $srcfile` ( cd "$d" srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true tar cvzfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles ) texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"` if test -n "$docbook"; then cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml" echo "Generating docbook XML... ($cmd)" eval "$cmd" docbook_xml_size=`calcsize $PACKAGE-db.xml` gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz" docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"` mv $PACKAGE-db.xml "$outdir/" split_html_db_dir=html_node_db cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\"" echo "Generating docbook HTML... ($cmd)" eval "$cmd" ( cd ${split_html_db_dir} || exit 1 tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html ) html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"` rm -f "$outdir"/html_node_db/*.html mkdir -p "$outdir/html_node_db" mv ${split_html_db_dir}/*.html "$outdir/html_node_db/" rmdir ${split_html_db_dir} cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\"" echo "Generating docbook ASCII... ($cmd)" eval "$cmd" docbook_ascii_size=`calcsize $PACKAGE-db.txt` mv $PACKAGE-db.txt "$outdir/" cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\"" echo "Generating docbook PS... ($cmd)" eval "$cmd" gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz" docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"` mv $PACKAGE-db.ps "$outdir/" cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\"" echo "Generating docbook PDF... ($cmd)" eval "$cmd" docbook_pdf_size=`calcsize $PACKAGE-db.pdf` mv $PACKAGE-db.pdf "$outdir/" fi echo "Writing index file..." if test -z "$use_texi2html"; then CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d" else CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d" fi curdate=`$SETLANG date '+%B %d, %Y'` sed \ -e "s!%%TITLE%%!$MANUAL_TITLE!g" \ -e "s!%%EMAIL%%!$EMAIL!g" \ -e "s!%%PACKAGE%%!$PACKAGE!g" \ -e "s!%%DATE%%!$curdate!g" \ -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \ -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \ -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \ -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \ -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \ -e "s!%%PDF_SIZE%%!$pdf_size!g" \ -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \ -e "s!%%ASCII_SIZE%%!$ascii_size!g" \ -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \ -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \ -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \ -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \ -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \ -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \ -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \ -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \ -e "s,%%SCRIPTURL%%,$scripturl,g" \ -e "s!%%SCRIPTNAME%%!$prog!g" \ -e "$CONDS" \ $GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html" echo "Done, see $outdir/ subdirectory for new files." # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/config.rpath�����������������������������������������������������0000775�0000000�0000000�00000044435�12166360012�015614� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2012 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF # How to pass a linker flag through the compiler. wl="$escaped_wl" # Static library suffix (normally "a"). libext="$libext" # Shared library suffix (normally "so"). shlibext="$shlibext" # Format of library name prefix. libname_spec="$escaped_libname_spec" # Library names that the linker finds when passed -lNAME. library_names_spec="$escaped_library_names_spec" # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator="$hardcode_libdir_separator" # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct="$hardcode_direct" # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L="$hardcode_minus_L" EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/git-version-gen��������������������������������������������������0000775�0000000�0000000�00000017176�12166360012�016251� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Print a version string. scriptversion=2012-01-06.07; # UTC # Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # It may be run two ways: # - from a git repository in which the "git describe" command below # produces useful output (thus requiring at least one signed tag) # - from a non-git-repo directory containing a .tarball-version file, which # presumes this script is invoked like "./git-version-gen .tarball-version". # In order to use intra-version strings in your project, you will need two # separate generated version string files: # # .tarball-version - present only in a distribution tarball, and not in # a checked-out repository. Created with contents that were learned at # the last time autoconf was run, and used by git-version-gen. Must not # be present in either $(srcdir) or $(builddir) for git-version-gen to # give accurate answers during normal development with a checked out tree, # but must be present in a tarball when there is no version control system. # Therefore, it cannot be used in any dependencies. GNUmakefile has # hooks to force a reconfigure at distribution time to get the value # correct, without penalizing normal development with extra reconfigures. # # .version - present in a checked-out repository and in a distribution # tarball. Usable in dependencies, particularly for files that don't # want to depend on config.h but do want to track version changes. # Delete this file prior to any autoconf run where you want to rebuild # files to pick up a version string change; and leave it stale to # minimize rebuild time after unrelated changes to configure sources. # # As with any generated file in a VC'd directory, you should add # /.version to .gitignore, so that you don't accidentally commit it. # .tarball-version is never generated in a VC'd directory, so needn't # be listed there. # # Use the following line in your configure.ac, so that $(VERSION) will # automatically be up-to-date each time configure is run (and note that # since configure.ac no longer includes a version string, Makefile rules # should not depend on configure.ac for version updates). # # AC_INIT([GNU project], # m4_esyscmd([build-aux/git-version-gen .tarball-version]), # [bug-project@example]) # # Then use the following lines in your Makefile.am, so that .version # will be present for dependencies, and so that .version and # .tarball-version will exist in distribution tarballs. # # EXTRA_DIST = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: # echo $(VERSION) > $@-t && mv $@-t $@ # dist-hook: # echo $(VERSION) > $(distdir)/.tarball-version me=$0 version="git-version-gen $scriptversion Copyright 2011 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING." usage="\ Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] Print a version string. Options: --prefix prefix of git tags (default 'v') --help display this help and exit --version output version information and exit Running without arguments will suffice in most cases." while test $# -gt 0; do case $1 in --help) echo "$usage"; exit 0;; --version) echo "$version"; exit 0;; --prefix) shift; prefix="$1";; -*) echo "$0: Unknown option '$1'." >&2 echo "$0: Try '--help' for more information." >&2 exit 1;; *) if test -z "$tarball_version_file"; then tarball_version_file="$1" elif test -z "$tag_sed_script"; then tag_sed_script="$1" else echo "$0: extra non-option argument '$1'." >&2 exit 1 fi;; esac shift done if test -z "$tarball_version_file"; then echo "$usage" exit 1 fi tag_sed_script="${tag_sed_script:-s/x/x/}" prefix="${prefix:-v}" nl=' ' # Avoid meddling by environment variable of the same name. v= v_from_git= # First see if there is a tarball-only version file. # then try "git describe", then default. if test -f $tarball_version_file then v=`cat $tarball_version_file` || v= case $v in *$nl*) v= ;; # reject multi-line output [0-9]*) ;; *) v= ;; esac test -z "$v" \ && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 fi if test -n "$v" then : # use $v # Otherwise, if there is at least one git commit involving the working # directory, and "git describe" output looks sensible, use that to # derive a version string. elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ || git describe --abbrev=4 HEAD 2>/dev/null` \ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ && case $v in $prefix[0-9]*) ;; *) (exit 1) ;; esac then # Is this a new git that lists number of commits since the last # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb case $v in *-*-*) : git describe is okay three part flavor ;; *-*) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version # of git describe. vtag=`echo "$v" | sed 's/-.*//'` commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \ || { commit_list=failed; echo "$0: WARNING: git rev-list failed" 1>&2; } numcommits=`echo "$commit_list" | wc -l` v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; test "$commit_list" = failed && v=UNKNOWN ;; esac # Change the first '-' to a '.', so version-comparing tools work properly. # Remove the "g" in git describe's output string, to save a byte. v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v_from_git=1 else v=UNKNOWN fi v=`echo "$v" |sed "s/^$prefix//"` # Test whether to append the "-dirty" suffix only if the version # string we're using came from git. I.e., skip the test if it's "UNKNOWN" # or if it came from .tarball-version. if test -n "$v_from_git"; then # Don't declare a version "dirty" merely because a time stamp has changed. git update-index --refresh > /dev/null 2>&1 dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= case "$dirty" in '') ;; *) # Append the suffix only if there isn't one already. case $v in *-dirty) ;; *) v="$v-dirty" ;; esac ;; esac fi # Omit the trailing newline, so that m4_esyscmd can use the result directly. echo "$v" | tr -d "$nl" # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/announce-gen�����������������������������������������������������0000775�0000000�0000000�00000036040�12166360012�015600� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' & eval 'exec perl -wS "$0" $argv:q' if 0; # Generate a release announcement message. my $VERSION = '2012-01-06 07:46'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2002-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 <http://www.gnu.org/licenses/>. # Written by Jim Meyering use strict; use Getopt::Long; use Digest::MD5; use Digest::SHA1; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta stable); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { my @types = sort keys %valid_release_types; print $STREAM <<EOF; Usage: $ME [OPTIONS] Generate an announcement message. OPTIONS: These options must be specified: --release-type=TYPE TYPE must be one of @types --package-name=PACKAGE_NAME --previous-version=VER --current-version=VER --gpg-key-id=ID The GnuPG ID of the key used to sign the tarballs --url-directory=URL_DIR The following are optional: --news=NEWS_FILE --bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g., autoconf,automake,bison,gnulib --gnulib-version=VERSION report VERSION as the gnulib version, where VERSION is the result of running git describe in the gnulib source directory. required if gnulib is in TOOL_LIST. --no-print-checksums do not emit MD5 or SHA1 checksums --archive-suffix=SUF add SUF to the list of archive suffixes --mail-headers=HEADERS a space-separated list of mail headers, e.g., To: x\@example.com Cc: y-announce\@example.com,... --help display this help and exit --version output version information and exit EOF } exit $exit_code; } =item C<%size> = C<sizes (@file)> Compute the sizes of the C<@file> and return them as a hash. Return C<undef> if one of the computation failed. =cut sub sizes (@) { my (@file) = @_; my $fail = 0; my %res; foreach my $f (@file) { my $cmd = "du --human $f"; my $t = `$cmd`; # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS $@ and (warn "$ME: command failed: '$cmd'\n"), $fail = 1; chomp $t; $t =~ s/^([\d.]+[MkK]).*/${1}B/; $res{$f} = $t; } return $fail ? undef : %res; } =item C<print_locations ($title, \@url, \%size, @file) Print a section C<$title> dedicated to the list of <@file>, which sizes are stored in C<%size>, and which are available from the C<@url>. =cut sub print_locations ($\@\%@) { my ($title, $url, $size, @file) = @_; print "Here are the $title:\n"; foreach my $url (@{$url}) { for my $file (@file) { print " $url/$file"; print " (", $$size{$file}, ")" if exists $$size{$file}; print "\n"; } } print "\n"; } =item C<print_checksums (@file) Print the MD5 and SHA1 signature section for each C<@file>. =cut sub print_checksums (@) { my (@file) = @_; print "Here are the MD5 and SHA1 checksums:\n"; print "\n"; foreach my $meth (qw (md5 sha1)) { foreach my $f (@file) { open IN, '<', $f or die "$ME: $f: cannot open for reading: $!\n"; binmode IN; my $dig = ($meth eq 'md5' ? Digest::MD5->new->addfile(*IN)->hexdigest : Digest::SHA1->new->addfile(*IN)->hexdigest); close IN; print "$dig $f\n"; } } print "\n"; } =item C<print_news_deltas ($news_file, $prev_version, $curr_version) Print the section of the NEWS file C<$news_file> addressing changes between versions C<$prev_version> and C<$curr_version>. =cut sub print_news_deltas ($$$) { my ($news_file, $prev_version, $curr_version) = @_; my $news_name = $news_file; $news_name =~ s|^\./||; print "\n$news_name\n\n"; # Print all lines from $news_file, starting with the first one # that mentions $curr_version up to but not including # the first occurrence of $prev_version. my $in_items; my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; my $found_news; open NEWS, '<', $news_file or die "$ME: $news_file: cannot open for reading: $!\n"; while (defined (my $line = <NEWS>)) { if ( ! $in_items) { # Match lines like these: # * Major changes in release 5.0.1: # * Noteworthy changes in release 6.6 (2006-11-22) [stable] $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o or next; $in_items = 1; print $line; } else { # This regexp must not match version numbers in NEWS items. # For example, they might well say "introduced in 4.5.5", # and we don't want that to match. $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o and last; print $line; $line =~ /\S/ and $found_news = 1; } } close NEWS; $in_items or die "$ME: $news_file: no matching lines for '$curr_version'\n"; $found_news or die "$ME: $news_file: no news item found for '$curr_version'\n"; } sub print_changelog_deltas ($$) { my ($package_name, $prev_version) = @_; # Print new ChangeLog entries. # First find all CVS-controlled ChangeLog files. use File::Find; my @changelog; find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' and push @changelog, $File::Find::name}}, '.'); # If there are no ChangeLog files, we're done. @changelog or return; my %changelog = map {$_ => 1} @changelog; # Reorder the list of files so that if there are ChangeLog # files in the specified directories, they're listed first, # in this order: my @dir = qw ( . src lib m4 config doc ); # A typical @changelog array might look like this: # ./ChangeLog # ./po/ChangeLog # ./m4/ChangeLog # ./lib/ChangeLog # ./doc/ChangeLog # ./config/ChangeLog my @reordered; foreach my $d (@dir) { my $dot_slash = $d eq '.' ? $d : "./$d"; my $target = "$dot_slash/ChangeLog"; delete $changelog{$target} and push @reordered, $target; } # Append any remaining ChangeLog files. push @reordered, sort keys %changelog; # Remove leading './'. @reordered = map { s!^\./!!; $_ } @reordered; print "\nChangeLog entries:\n\n"; # print join ("\n", @reordered), "\n"; $prev_version =~ s/\./_/g; my $prev_cvs_tag = "\U$package_name\E-$prev_version"; my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; open DIFF, '-|', $cmd or die "$ME: cannot run '$cmd': $!\n"; # Print two types of lines, making minor changes: # Lines starting with '+++ ', e.g., # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 # and those starting with '+'. # Don't print the others. my $prev_printed_line_empty = 1; while (defined (my $line = <DIFF>)) { if ($line =~ /^\+\+\+ /) { my $separator = "*"x70 ."\n"; $line =~ s///; $line =~ s/\s.*//; $prev_printed_line_empty or print "\n"; print $separator, $line, $separator; } elsif ($line =~ /^\+/) { $line =~ s///; print $line; $prev_printed_line_empty = ($line =~ /^$/); } } close DIFF; # The exit code should be 1. # Allow in case there are no modified ChangeLog entries. $? == 256 || $? == 128 or warn "$ME: warning: '$cmd' had unexpected exit code or signal ($?)\n"; } sub get_tool_versions ($$) { my ($tool_list, $gnulib_version) = @_; @$tool_list or return (); my $fail; my @tool_version_pair; foreach my $t (@$tool_list) { if ($t eq 'gnulib') { push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; next; } # Assume that the last "word" on the first line of # 'tool --version' output is the version string. my ($first_line, undef) = split ("\n", `$t --version`); if ($first_line =~ /.* (\d[\w.-]+)$/) { $t = ucfirst $t; push @tool_version_pair, "$t $1"; } else { defined $first_line and $first_line = ''; warn "$ME: $t: unexpected --version output\n:$first_line"; $fail = 1; } } $fail and exit 1; return @tool_version_pair; } { # Neutralize the locale, so that, for instance, "du" does not # issue "1,2" instead of "1.2", what confuses our regexps. $ENV{LC_ALL} = "C"; my $mail_headers; my $release_type; my $package_name; my $prev_version; my $curr_version; my $gpg_key_id; my @url_dir_list; my @news_file; my $bootstrap_tools; my $gnulib_version; my $print_checksums_p = 1; GetOptions ( 'mail-headers=s' => \$mail_headers, 'release-type=s' => \$release_type, 'package-name=s' => \$package_name, 'previous-version=s' => \$prev_version, 'current-version=s' => \$curr_version, 'gpg-key-id=s' => \$gpg_key_id, 'url-directory=s' => \@url_dir_list, 'news=s' => \@news_file, 'bootstrap-tools=s' => \$bootstrap_tools, 'gnulib-version=s' => \$gnulib_version, 'print-checksums!' => \$print_checksums_p, 'archive-suffix=s' => \@archive_suffixes, help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, ) or usage 1; my $fail = 0; # Ensure that sure each required option is specified. $release_type or (warn "$ME: release type not specified\n"), $fail = 1; $package_name or (warn "$ME: package name not specified\n"), $fail = 1; $prev_version or (warn "$ME: previous version string not specified\n"), $fail = 1; $curr_version or (warn "$ME: current version string not specified\n"), $fail = 1; $gpg_key_id or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1; @url_dir_list or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1; my @tool_list = split ',', $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version and (warn "$ME: when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; exists $valid_release_types{$release_type} or (warn "$ME: '$release_type': invalid release type\n"), $fail = 1; @ARGV and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"), $fail = 1; $fail and usage 1; my $my_distdir = "$package_name-$curr_version"; my $xd = "$package_name-$prev_version-$curr_version.xdelta"; my @candidates = map { "$my_distdir.$_" } @archive_suffixes; my @tarballs = grep {-f $_} @candidates; @tarballs or die "$ME: none of " . join(', ', @candidates) . " were found\n"; my @sizable = @tarballs; -f $xd and push @sizable, $xd; my %size = sizes (@sizable); %size or exit 1; my $headers = ''; if (defined $mail_headers) { ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g; $headers .= "\n"; } # The markup is escaped as <\# so that when this script is sent by # mail (or part of a diff), Gnus is not triggered. print <<EOF; ${headers}Subject: $my_distdir released [$release_type] <\#secure method=pgpmime mode=sign> FIXME: put comments here EOF if (@url_dir_list == 1 && @tarballs == 1) { # When there's only one tarball and one URL, use a more concise form. my $m = "$url_dir_list[0]/$tarballs[0]"; print "Here are the compressed sources and a GPG detached signature[*]:\n" . " $m\n" . " $m.sig\n\n"; } else { print_locations ("compressed sources", @url_dir_list, %size, @tarballs); -f $xd and print_locations ("xdelta diffs (useful? if so, " . "please tell bug-gnulib\@gnu.org)", @url_dir_list, %size, $xd); my @sig_files = map { "$_.sig" } @tarballs; print_locations ("GPG detached signatures[*]", @url_dir_list, %size, @sig_files); } if ($url_dir_list[0] =~ "gnu\.org") { print "Use a mirror for higher download bandwidth:\n"; if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!) { (my $m = "$url_dir_list[0]/$tarballs[0]") =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; print " $m\n" . " $m.sig\n\n"; } else { print " http://www.gnu.org/order/ftp.html\n\n"; } } $print_checksums_p and print_checksums (@sizable); print <<EOF; [*] Use a .sig file to verify that the corresponding file (without the .sig suffix) is intact. First, be sure to download both the .sig file and the corresponding tarball. Then, run a command like this: gpg --verify $tarballs[0].sig If that command fails because you don't have the required public key, then run this command to import it: gpg --keyserver keys.gnupg.net --recv-keys $gpg_key_id and rerun the 'gpg --verify' command. EOF my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version); @tool_versions and print "\nThis release was bootstrapped with the following tools:", join ('', map {"\n $_"} @tool_versions), "\n"; print_news_deltas ($_, $prev_version, $curr_version) foreach @news_file; $release_type eq 'stable' or print_changelog_deltas ($package_name, $prev_version); exit 0; } ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## mode: perl ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## perl-extra-newline-before-brace: t ## perl-merge-trailing-else: nil ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC" ## time-stamp-end: "'; # UTC" ## End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/install-sh�������������������������������������������������������0000775�0000000�0000000�00000033255�12166360012�015306� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/gitlog-to-changelog����������������������������������������������0000775�0000000�0000000�00000027031�12166360012�017055� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' & eval 'exec perl -wS "$0" $argv:q' if 0; # Convert git log output to ChangeLog format. my $VERSION = '2012-01-18 07:50'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. # Written by Jim Meyering use strict; use warnings; use Getopt::Long; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { print $STREAM <<EOF; Usage: $ME [OPTIONS] [ARGS] Convert git log output to ChangeLog format. If present, any ARGS are passed to "git log". To avoid ARGS being parsed as options to $ME, they may be preceded by '--'. OPTIONS: --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that makes a change to SHA1's commit log text or metadata. --append-dot append a dot to the first line of each commit message if there is no other punctuation or blank at the end. --no-cluster never cluster commit messages under the same date/author header; the default is to cluster adjacent commit messages if their headers are the same and neither commit message contains multiple paragraphs. --since=DATE convert only the logs since DATE; the default is to convert all log entries. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; the default is '%s%n%b%n' --help display this help and exit --version output version information and exit EXAMPLE: $ME --since=2008-01-01 > ChangeLog $ME -- -n 5 foo > last-5-commits-to-branch-foo SPECIAL SYNTAX: The following types of strings are interpreted specially when they appear at the beginning of a log message line. They are not copied to the output. Copyright-paperwork-exempt: Yes Append the "(tiny change)" notation to the usual "date name email" ChangeLog header to mark a change that does not require a copyright assignment. Co-authored-by: Joe User <user\@example.com> List the specified name and email address on a second ChangeLog header, denoting a co-author. Signed-off-by: Joe User <user\@example.com> These lines are simply elided. In a FILE specified via --amend, comment lines (starting with "#") are ignored. FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on a line) referring to a commit in the current project, and CODE refers to one or more consecutive lines of Perl code. Pairs must be separated by one or more blank line. Here is sample input for use with --amend=FILE, from coreutils: 3a169f4c5d9159283548178668d2fae6fced3030 # fix typo in title: s/all tile types/all file types/ 1379ed974f1fa39b12e2ffab18b3f7a607082202 # Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. # Change the author to be Paul. Note the escaped "@": s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>, EOF } exit $exit_code; } # If the string $S is a well-behaved file name, simply return it. # If it contains white space, quotes, etc., quote it, and return the new string. sub shell_quote($) { my ($s) = @_; if ($s =~ m![^\w+/.,-]!) { # Convert each single quote to '\'' $s =~ s/\'/\'\\\'\'/g; # Then single quote the string. $s = "'$s'"; } return $s; } sub quoted_cmd(@) { return join (' ', map {shell_quote $_} @_); } # Parse file F. # Comment lines (starting with "#") are ignored. # F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 # (alone on a line) referring to a commit in the current project, and # CODE refers to one or more consecutive lines of Perl code. # Pairs must be separated by one or more blank line. sub parse_amend_file($) { my ($f) = @_; open F, '<', $f or die "$ME: $f: failed to open for reading: $!\n"; my $fail; my $h = {}; my $in_code = 0; my $sha; while (defined (my $line = <F>)) { $line =~ /^\#/ and next; chomp $line; $line eq '' and $in_code = 0, next; if (!$in_code) { $line =~ /^([0-9a-fA-F]{40})$/ or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), $fail = 1, next; $sha = lc $1; $in_code = 1; exists $h->{$sha} and (warn "$ME: $f:$.: duplicate SHA1\n"), $fail = 1, next; } else { $h->{$sha} ||= ''; $h->{$sha} .= "$line\n"; } } close F; $fail and exit 1; return $h; } { my $since_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; my $cluster = 1; GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, 'cluster!' => \$cluster, ) or usage 1; defined $since_date and unshift @ARGV, "--since=$since_date"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; my @cmd = (qw (git log --log-size), '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); my $prev_multi_paragraph; my $prev_date_line = ''; my @prev_coauthors = (); while (1) { defined (my $in = <PIPE>) or last; $in =~ /^log size (\d+)$/ or die "$ME:$.: Invalid line (expected log size):\n$in"; my $log_nbytes = $1; my $log; my $n_read = read PIPE, $log, $log_nbytes; $n_read == $log_nbytes or die "$ME:$.: unexpected EOF\n"; # Extract leading hash. my ($sha, $rest) = split ':', $log, 2; defined $sha or die "$ME:$.: malformed log entry\n"; $sha =~ /^[0-9a-fA-F]{40}$/ or die "$ME:$.: invalid SHA1: $sha\n"; # If this commit's log requires any transformation, do it now. my $code = $amend_code->{$sha}; if (defined $code) { eval 'use Safe'; my $s = new Safe; # Put the unpreprocessed entry into "$_". $_ = $rest; # Let $code operate on it, safely. my $r = $s->reval("$code") or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; # Note that we've used this entry. delete $amend_code->{$sha}; # Update $rest upon success. $rest = $_; } my @line = split "\n", $rest; my $author_line = shift @line; defined $author_line or die "$ME:$.: unexpected EOF\n"; $author_line =~ /^(\d+) (.*>)$/ or die "$ME:$.: Invalid line " . "(expected date/author/email):\n$author_line\n"; # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog # `(tiny change)' annotation. my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) ? ' (tiny change)' : ''); my $date_line = sprintf "%s %s$tiny\n", strftime ("%F", localtime ($1)), $2; my @coauthors = grep /^Co-authored-by:.*$/, @line; # Omit meta-data lines we've already interpreted. @line = grep !/^(?:Signed-off-by:[ ].*>$ |Co-authored-by:[ ] |Copyright-paperwork-exempt:[ ] )/x, @line; # Remove leading and trailing blank lines. if (@line) { while ($line[0] =~ /^\s*$/) { shift @line; } while ($line[$#line] =~ /^\s*$/) { pop @line; } } # Record whether there are two or more paragraphs. my $multi_paragraph = grep /^\s*$/, @line; # Format 'Co-authored-by: A U Thor <email@example.com>' lines in # standard multi-author ChangeLog format. for (@coauthors) { s/^Co-authored-by:\s*/\t /; s/\s*</ </; /<.*?@.*\..*>/ or warn "$ME: warning: missing email address for " . substr ($_, 5) . "\n"; } # If clustering of commit messages has been disabled, if this header # would be different from the previous date/name/email/coauthors header, # or if this or the previous entry consists of two or more paragraphs, # then print the header. if ( ! $cluster || $date_line ne $prev_date_line || "@coauthors" ne "@prev_coauthors" || $multi_paragraph || $prev_multi_paragraph) { $prev_date_line eq '' or print "\n"; print $date_line; @coauthors and print join ("\n", @coauthors), "\n"; } $prev_date_line = $date_line; @prev_coauthors = @coauthors; $prev_multi_paragraph = $multi_paragraph; # If there were any lines if (@line == 0) { warn "$ME: warning: empty commit message:\n $date_line\n"; } else { if ($append_dot) { # If the first line of the message has enough room, then if (length $line[0] < 72) { # append a dot if there is no other punctuation or blank # at the end. $line[0] =~ /[[:punct:]\s]$/ or $line[0] .= '.'; } } # Prefix each non-empty line with a TAB. @line = map { length $_ ? "\t$_" : '' } @line; print "\n", join ("\n", @line), "\n"; } defined ($in = <PIPE>) or last; $in ne "\n" and die "$ME:$.: unexpected line:\n$in"; } close PIPE or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; # FIXME-someday: include $PROCESS_STATUS in the diagnostic # Complain about any unused entry in the --amend=F specified file. my $fail = 0; foreach my $sha (keys %$amend_code) { warn "$ME:$amend_file: unused entry: $sha\n"; $fail = 1; } exit $fail; } # Local Variables: # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC" # time-stamp-end: "'; # UTC" # End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/elisp-comp�������������������������������������������������������0000775�0000000�0000000�00000005367�11433657032�015312� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Copyright (C) 1995, 2000, 2003, 2004, 2005, 2009, 2010 Free Software # Foundation, Inc. scriptversion=2010-02-06.18; # UTC # Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995. # # 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. case $1 in '') echo "$0: No files. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: elisp-comp [--help] [--version] FILES... This script byte-compiles all `.el' files listed as FILES using GNU Emacs, and put the resulting `.elc' files into the current directory, so disregarding the original directories used in `.el' arguments. This script manages in such a way that all Emacs LISP files to be compiled are made visible between themselves, in the event they require or load-library one another. Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "elisp-comp $scriptversion" exit $? ;; esac if test -z "$EMACS" || test "$EMACS" = "t"; then # Value of "t" means we are running in a shell under Emacs. # Just assume Emacs is called "emacs". EMACS=emacs fi tempdir=elc.$$ # Cleanup the temporary directory on exit. trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0 do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $tempdir cp "$@" $tempdir ( cd $tempdir echo "(setq load-path (cons nil load-path))" > script $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? mv *.elc .. ) || exit $? (exit 0); exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/missing����������������������������������������������������������0000775�0000000�0000000�00000024016�12166360012�014674� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file 'aclocal.m4' autoconf touch file 'configure' autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one automake touch all 'Makefile.in' files bison create 'y.tab.[ch]', if possible, from existing .[ch] flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create 'y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acconfig.h' or '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: '$1' $msg. You should only need it if you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the Help2man package in order for those modifications to take effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX). You might want to install the Texinfo package or the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: '$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing '$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/mdate-sh���������������������������������������������������������0000775�0000000�0000000�00000013714�12166360012�014730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 # Free Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST fi case $1 in '') echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ����������������������������������������������������id-utils-4.6+git20120811/build-aux/test-driver������������������������������������������������������0000775�0000000�0000000�00000007633�12166360012�015501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # test-driver - basic driver script for the `parallel-tests' mode. scriptversion=2011-08-17.14; # UTC # Copyright (C) 2011 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <<END Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory. END } # TODO: better error handling in option parsing (in particular, ensure # TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. expect_failure=no color_tests=no enable_hard_errors=yes while test $# -gt 0; do case $1 in --help) print_usage; exit $?;; --version) echo "test-driver $scriptversion"; exit $?;; --test-name) test_name=$2; shift;; --log-file) log_file=$2; shift;; --trs-file) trs_file=$2; shift;; --color-tests) color_tests=$2; shift;; --expect-failure) expect_failure=$2; shift;; --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; esac shift done if test $color_tests = yes; then # Keep this in sync with `lib/am/check.am:$(am__tty_colors)'. red='' # Red. grn='' # Green. lgn='' # Light green. blu='' # Blue. mgn='' # Magenta. std='' # No color. else red= grn= lgn= blu= mgn= std= fi do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' trap "st=129; $do_exit" 1 trap "st=130; $do_exit" 2 trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �����������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/config.sub�������������������������������������������������������0000775�0000000�0000000�00000104716�12166360012�015266� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-01-01' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ��������������������������������������������������id-utils-4.6+git20120811/build-aux/useless-if-before-free�������������������������������������������0000775�0000000�0000000�00000014114�12166360012�017457� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' & eval 'exec perl -wST "$0" $argv:q' if 0; # Detect instances of "if (p) free (p);". # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. my $VERSION = '2012-01-06 07:23'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. # Written by Jim Meyering use strict; use warnings; use Getopt::Long; (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { print $STREAM <<EOF; Usage: $ME [OPTIONS] FILE... Detect any instance in FILE of a useless "if" test before a free call, e.g., "if (p) free (p);". Any such test may be safely removed without affecting the semantics of the C code in FILE. Use --name=FOO --name=BAR to also detect free-like functions named FOO and BAR. OPTIONS: --list print only the name of each matching FILE (\\0-terminated) --name=N add name N to the list of \'free\'-like functions to detect; may be repeated --help display this help and exit --version output version information and exit Exit status: 0 one or more matches 1 no match 2 an error EXAMPLE: For example, this command prints all removable "if" tests before "free" and "kfree" calls in the linux kernel sources: git ls-files -z |xargs -0 $ME --name=kfree EOF } exit $exit_code; } sub is_NULL ($) { my ($expr) = @_; return ($expr eq 'NULL' || $expr eq '0'); } { sub EXIT_MATCH {0} sub EXIT_NO_MATCH {1} sub EXIT_ERROR {2} my $err = EXIT_NO_MATCH; my $list; my @name = qw(free); GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, list => \$list, 'name=s@' => \@name, ) or usage 1; # Make sure we have the right number of non-option arguments. # Always tell the user why we fail. @ARGV < 1 and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR; my $or = join '|', @name; my $regexp = qr/(?:$or)/; # Set the input record separator. # Note: this makes it impractical to print line numbers. $/ = '"'; my $found_match = 0; FILE: foreach my $file (@ARGV) { open FH, '<', $file or (warn "$ME: can't open '$file' for reading: $!\n"), $err = EXIT_ERROR, next; while (defined (my $line = <FH>)) { while ($line =~ /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\) # 1 2 3 (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;| \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg) { my $all = $1; my ($lhs, $rhs) = ($2, $3); my ($free_opnd, $braced_free_opnd) = ($4, $5); my $non_NULL; if (!defined $rhs) { $non_NULL = $lhs } elsif (is_NULL $rhs) { $non_NULL = $lhs } elsif (is_NULL $lhs) { $non_NULL = $rhs } else { next } # Compare the non-NULL part of the "if" expression and the # free'd expression, without regard to white space. $non_NULL =~ tr/ \t//d; my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd; $e2 =~ tr/ \t//d; if ($non_NULL eq $e2) { $found_match = 1; $list and (print "$file\0"), next FILE; print "$file: $all\n"; } } } } continue { close FH; } $found_match && $err == EXIT_NO_MATCH and $err = EXIT_MATCH; exit $err; } my $foo = <<'EOF'; # The above is to *find* them. # This adjusts them, removing the unnecessary "if (p)" part. # FIXME: do something like this as an option (doesn't do braces): free=xfree git grep -l -z "$free *(" \ | xargs -0 useless-if-before-free -l --name="$free" \ | xargs -0 perl -0x3b -pi -e \ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s' # Use the following to remove redundant uses of kfree inside braces. # Note that -0777 puts perl in slurp-whole-file mode; # but we have plenty of memory, these days... free=kfree git grep -l -z "$free *(" \ | xargs -0 useless-if-before-free -l --name="$free" \ | xargs -0 perl -0777 -pi -e \ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms' Be careful that the result of the above transformation is valid. If the matched string is followed by "else", then obviously, it won't be. When modifying files, refuse to process anything other than a regular file. EOF ## Local Variables: ## mode: perl ## indent-tabs-mode: nil ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC" ## time-stamp-end: "'; # UTC" ## End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/compile����������������������������������������������������������0000775�0000000�0000000�00000015330�12166360012�014652� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2010-11-15.09; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software # Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Win32 hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l*) lib=${1#-l} found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes set x "$@" "$dir/$lib.dll.lib" break fi if test -f "$dir/$lib.lib"; then found=yes set x "$@" "$dir/$lib.lib" break fi done IFS=$save_IFS test "$found" != yes && set x "$@" "$lib.lib" shift ;; -L*) func_file_conv "${1#-L}" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/gnu-web-doc-update�����������������������������������������������0000775�0000000�0000000�00000006563�12166360012�016621� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Run this after each non-alpha release, to update the web documentation at # http://www.gnu.org/software/$pkg/manual/ # This script must be run from the top-level directory, # assumes you're using git for revision control, # and requires a .prev-version file as well as a Makefile, # from which it extracts the version number and package name, respectively. # Also, it assumes all documentation is in the doc/ sub-directory. VERSION=2009-07-21.16; # UTC # Copyright (C) 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 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 <http://www.gnu.org/licenses/>. # Requirements: everything required to bootstrap your package, # plus these: git, cvs, cvsu, rsync, mktemp ME=`basename "$0"` warn() { printf '%s: %s\n' "$ME" "$*" >&2; } die() { warn "$*"; exit 1; } help_version() { case $1 in --help) cat <<EOF Usage: $ME Run this script (no options or arguments) after each non-alpha release, to update the web documentation at http://www.gnu.org/software/\$pkg/manual/ Run it from your project's the top-level directory. Options: --help print this help, then exit --version print version number, then exit Report bugs and patches to <bug-gnulib@gnu.org>. EOF exit ;; --version) year=`echo "$VERSION" | sed 's/[^0-9].*//'` cat <<EOF $ME $VERSION Copyright (C) $year Free Software Foundation, Inc, License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF exit ;; *) die "unrecognized option: $1";; esac } case $# in 0) ;; 1) help_version $1 ;; *) die "$ME: too many options" ;; esac prev=.prev-version version=$(cat $prev) || die "$ME: no $prev file?" pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) || die "$ME: no Makefile?" tmp_branch=web-doc-$version-$$ cleanup() { __st=$?; rm -rf "$tmp" git checkout master git branch -d $tmp_branch exit $__st } trap cleanup 0 trap 'exit $?' 1 2 13 15 # We must build using sources for which --version reports the # just-released version number, not some string like 7.6.18-20761. # That version string propagates into all documentation. git checkout -b $tmp_branch v$version ok=0 ./bootstrap && ./configure && make && make web-manual && ok=1 test $ok = 1 || exit 1 tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1 ( cd $tmp \ && cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg ) rsync -avP doc/manual/ $tmp/$pkg/manual ( cd $tmp/$pkg/manual # Add any new files: cvsu --types='?'|sed s/..// | xargs --no-run-if-empty -- cvs add -ko cvs ci -m $version ) # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "VERSION=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/gnupload���������������������������������������������������������0000775�0000000�0000000�00000025571�12166360012�015043� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Sign files and upload them. scriptversion=2012-01-15.15; # UTC # Copyright (C) 2004-2010, 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, 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 <http://www.gnu.org/licenses/>. # Originally written by Alexandre Duret-Lutz <adl@gnu.org>. # The master copy of this file is maintained in the gnulib Git repository. # Please send bug reports and feature requests to bug-gnulib@gnu.org. set -e GPG='gpg --batch --no-tty' conffile=.gnuploadrc to= dry_run=false symlink_files= delete_files= delete_symlinks= collect_var= dbg= nl=' ' usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...] Sign all FILES, and process them at selected destinations according to CMD. <http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html> explains further. Commands: --delete delete FILES from destination --symlink create symbolic links --rmsymlink remove symbolic links -- treat the remaining arguments as files to upload Options: --help print this help text and exit --to DEST specify one destination for FILES (multiple --to options are allowed) --user NAME sign with key NAME --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names --dry-run do nothing, show what would have been done --version output version information and exit If --symlink-regex is given without EXPR, then the link target name is created by replacing the version information with '-latest', e.g.: foo-1.3.4.tar.gz -> foo-latest.tar.gz Recognized destinations are: alpha.gnu.org:DIRECTORY savannah.gnu.org:DIRECTORY savannah.nongnu.org:DIRECTORY ftp.gnu.org:DIRECTORY build directive files and upload files by FTP download.gnu.org.ua:{alpha|ftp}/DIRECTORY build directive files and upload files by SFTP [user@]host:DIRECTORY upload files with scp Options and commands are applied in order. If the file $conffile exists in the current working directory, its contents are prepended to the actual command line options. Use this to keep your defaults. Comments (#) and empty lines in $conffile are allowed. Examples: 1. Upload foobar-1.0.tar.gz to ftp.gnu.org: gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz 2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org: gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz 3. Same as above, and also create symbolic links to foobar-latest.tar.*: gnupload --to ftp.gnu.org:foobar \\ --symlink-regex \\ foobar-1.0.tar.gz foobar-1.0.tar.xz 4. Upload foobar-0.9.90.tar.gz to two sites: gnupload --to alpha.gnu.org:foobar \\ --to sources.redhat.com:~ftp/pub/foobar \\ foobar-0.9.90.tar.gz 5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz (the -- terminates the list of files to delete): gnupload --to alpha.gnu.org:foobar \\ --to sources.redhat.com:~ftp/pub/foobar \\ --delete oopsbar-0.9.91.tar.gz \\ -- foobar-0.9.91.tar.gz gnupload uses the ncftpput program to do the transfers; if you don't happen to have an ncftp package installed, the ncftpput-ftp script in the build-aux/ directory of the gnulib package (http://savannah.gnu.org/projects/gnulib) may serve as a replacement. Send patches and bug reports to <bug-gnulib@gnu.org>." # Read local configuration file if test -r "$conffile"; then echo "$0: Reading configuration file $conffile" conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '` eval set x "$conf \"\$@\"" shift fi while test -n "$1"; do case $1 in -*) collect_var= case $1 in --help) echo "$usage" exit $? ;; --to) if test -z "$2"; then echo "$0: Missing argument for --to" 1>&2 exit 1 else to="$to $2" shift fi ;; --user) if test -z "$2"; then echo "$0: Missing argument for --user" 1>&2 exit 1 else GPG="$GPG --local-user $2" shift fi ;; --delete) collect_var=delete_files ;; --rmsymlink) collect_var=delete_symlinks ;; --symlink-regex=*) symlink_expr=`expr "$1" : '[^=]*=\(.*\)'` ;; --symlink-regex) symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|' ;; --symlink) collect_var=symlink_files ;; --dry-run|-n) dry_run=: ;; --version) echo "gnupload $scriptversion" exit $? ;; --) shift break ;; -*) echo "$0: Unknown option '$1', try '$0 --help'" 1>&2 exit 1 ;; esac ;; *) if test -z "$collect_var"; then break else eval "$collect_var=\"\$$collect_var $1\"" fi ;; esac shift done dprint() { echo "Running $* ..." } if $dry_run; then dbg=dprint fi if test -z "$to"; then echo "$0: Missing destination sites" >&2 exit 1 fi if test -n "$symlink_files"; then x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'` if test -n "$x"; then echo "$0: Odd number of symlink arguments" >&2 exit 1 fi fi if test $# = 0; then if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then echo "$0: No file to upload" 1>&2 exit 1 fi else # Make sure all files exist. We don't want to ask # for the passphrase if the script will fail. for file do if test ! -f $file; then echo "$0: Cannot find '$file'" 1>&2 exit 1 elif test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` if test -z "$linkname"; then echo "$0: symlink expression produces empty results" >&2 exit 1 elif test "$linkname" = $file; then echo "$0: symlink expression does not alter file name" >&2 exit 1 fi fi done fi # Make sure passphrase is not exported in the environment. unset passphrase # Reset PATH to be sure that echo is a built-in. We will later use # 'echo $passphrase' to output the passphrase, so it is important that # it is a built-in (third-party programs tend to appear in 'ps' # listings with their arguments...). # Remember this script runs with 'set -e', so if echo is not built-in # it will exit now. PATH=/empty echo -n "Enter GPG passphrase: " stty -echo read -r passphrase stty echo echo if test $# -ne 0; then for file do echo "Signing $file ..." rm -f $file.sig echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file done fi # mkdirective DESTDIR BASE FILE STMT # Arguments: See upload, below mkdirective () { stmt="$4" if test -n "$3"; then stmt=" filename: $3$stmt" fi cat >${2}.directive<<EOF version: 1.1 directory: $1 comment: gnupload v. $scriptversion$stmt EOF if $dry_run; then echo "File ${2}.directive:" cat ${2}.directive echo "File ${2}.directive:" | sed 's/./-/g' fi } mksymlink () { while test $# -ne 0 do echo "symlink: $1 $2" shift shift done } # upload DEST DESTDIR BASE FILE STMT FILES # Arguments: # DEST Destination site; # DESTDIR Destination directory; # BASE Base name for the directive file; # FILE Name of the file to distribute (may be empty); # STMT Additional statements for the directive file; # FILES List of files to upload. upload () { dest=$1 destdir=$2 base=$3 file=$4 stmt=$5 files=$6 rm -f $base.directive $base.directive.asc case $dest in alpha.gnu.org:*) mkdirective "$destdir" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc ;; ftp.gnu.org:*) mkdirective "$destdir" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc ;; savannah.gnu.org:*) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files ;; savannah.nongnu.org:*) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files ;; download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*) destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'` destdir_topdir=`echo "$destdir" | sed 's,/.*,,'` mkdirective "$destdir_p1" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive for f in $files $base.directive.asc do echo put $f done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir ;; /*) dest_host=`echo "$dest" | sed 's,:.*,,'` mkdirective "$destdir" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive $dbg cp $files $base.directive.asc $dest_host ;; *) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg scp $files $dest ;; esac rm -f $base.directive $base.directive.asc } ##### # Process any standalone directives stmt= if test -n "$symlink_files"; then stmt="$stmt `mksymlink $symlink_files`" fi for file in $delete_files do stmt="$stmt archive: $file" done for file in $delete_symlinks do stmt="$stmt rmsymlink: $file" done if test -n "$stmt"; then for dest in $to do destdir=`echo $dest | sed 's/[^:]*://'` upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt" done fi # Process actual uploads for dest in $to do for file do echo "Uploading $file to $dest ..." stmt= files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` if test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` stmt="$stmt symlink: $file $linkname symlink: $file.sig $linkname.sig" fi upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files" done done exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/build-aux/depcomp����������������������������������������������������������0000775�0000000�0000000�00000047555�12166360012�014667� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 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 2, 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 <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands '-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/INSTALL��������������������������������������������������������������������0000664�0000000�0000000�00000036605�12166360012�012443� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ���������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/dist-check.mk��������������������������������������������������������������0000664�0000000�0000000�00000013231�11434330764�013757� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Most of this is probably too coreutils-centric to be useful to other packages. bin=bin-$$$$ write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)' tmpdir = $(abs_top_builddir)/tests/torture t=$(tmpdir)/$(PACKAGE)/test pfx=$(t)/i built_programs = \ $$(echo 'spy:;@echo $$(bin_PROGRAMS)' \ | MAKEFLAGS= $(MAKE) -s -C src -f Makefile -f - spy \ | fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u) # More than once, tainted build and source directory names would # have caused at least one "make check" test to apply "chmod 700" # to all directories under $HOME. Make sure it doesn't happen again. tp = $(tmpdir)/taint t_prefix = $(tp)/a t_taint = '$(t_prefix) b' fake_home = $(tp)/home # When extracting from a distribution tarball, extract using the fastest # method possible. With dist-xz, that means using the *.xz file. ifneq ('', $(filter *.xz, $(DIST_ARCHIVES))) tar_decompress_opt_ = J suffix_ = xz else ifneq ('', $(filter *.gz, $(DIST_ARCHIVES))) tar_decompress_opt_ = z suffix_ = gz else tar_decompress_opt_ = j suffix_ = bz2 endif endif amtar_extract_ = $(AMTAR) -$(tar_decompress_opt_)xf preferred_tarball_ = $(distdir).tar.$(suffix_) # Ensure that tests run from tainted build and src dir names work, # and don't affect anything in $HOME. Create witness files in $HOME, # record their attributes, and build/test. Then ensure that the # witnesses were not affected. # Skip this test when using libtool, since libtool-generated scripts # cannot deal with a space-tainted srcdir. ALL_RECURSIVE_TARGETS += taint-distcheck taint-distcheck: $(DIST_ARCHIVES) grep '^[ ]*LT_INIT' configure.ac >/dev/null && exit 0 || : test -d $(t_taint) && chmod -R 700 $(t_taint) || : -rm -rf $(t_taint) $(fake_home) mkdir -p $(t_prefix) $(t_taint) $(fake_home) $(amtar_extract_) $(preferred_tarball_) -C $(t_taint) mkfifo $(fake_home)/fifo touch $(fake_home)/f mkdir -p $(fake_home)/d/e ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before HOME=$(fake_home); export HOME; \ cd $(t_taint)/$(distdir) \ && ./configure \ && $(MAKE) \ && $(MAKE) check \ && ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \ && diff $(tp)/.ls-before $(tp)/.ls-after \ && test -d $(t_prefix) rm -rf $(tp) # Verify that a twisted use of --program-transform-name=PROGRAM works. define install-transform-check echo running install-transform-check \ && rm -rf $(pfx) \ && $(MAKE) program_transform_name='s/.*/zyx/' \ prefix=$(pfx) install \ && test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \ && test "$$(find $(pfx)/share/man -type f|sed 's,.*/,,;s,\..*,,')" = "zyx" endef # Install, then verify that all binaries and man pages are in place. # Note that neither the binary, ginstall, nor the [.1 man page is installed. define my-instcheck echo running my-instcheck; \ $(MAKE) prefix=$(pfx) install \ && test ! -f $(pfx)/bin/ginstall \ && { fail=0; \ for i in $(built_programs); do \ test "$$i" = ginstall && i=install; \ for j in "$(pfx)/bin/$$i" \ "$(pfx)/share/man/man1/$$i.1"; do \ case $$j in *'[.1') continue;; esac; \ test -f "$$j" && : \ || { echo "$$j not installed"; fail=1; }; \ done; \ done; \ test $$fail = 1 && exit 1 || :; \ } endef # The hard-linking for-loop below ensures that there is a bin/ directory # full of all of the programs under test (except the ones that are required # for basic Makefile rules), all symlinked to the just-built "false" program. # This is to ensure that if ever a test neglects to make PATH include # the build srcdir, these always-failing programs will run. # Otherwise, it is too easy to test the wrong programs. # Note that "false" itself is a symlink to true, so it too will malfunction. define coreutils-path-check { \ echo running coreutils-path-check; \ if test -f $(srcdir)/src/true.c; then \ fail=1; \ mkdir $(bin) \ && ($(write_loser)) > $(bin)/loser \ && chmod a+x $(bin)/loser \ && for i in $(built_programs); do \ case $$i in \ rm|expr|basename|echo|sort|ls|tr);; \ cat|dirname|mv|wc);; \ *) ln $(bin)/loser $(bin)/$$i;; \ esac; \ done \ && ln -sf ../src/true $(bin)/false \ && PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH \ $(MAKE) -C tests check \ && { test -d gnulib-tests \ && $(MAKE) -C gnulib-tests check \ || :; } \ && rm -rf $(bin) \ && fail=0; \ else \ fail=0; \ fi; \ test $$fail = 1 && exit 1 || :; \ } endef # Use this to make sure we don't run these programs when building # from a virgin compressed tarball file, below. null_AM_MAKEFLAGS ?= \ ACLOCAL=false \ AUTOCONF=false \ AUTOMAKE=false \ AUTOHEADER=false \ GPERF=false \ MAKEINFO=false ALL_RECURSIVE_TARGETS += my-distcheck my-distcheck: $(DIST_ARCHIVES) $(local-check) $(MAKE) syntax-check $(MAKE) check -rm -rf $(t) mkdir -p $(t) $(amtar_extract_) $(preferred_tarball_) -C $(t) (set -e; cd $(t)/$(distdir); \ ./configure --quiet --enable-gcc-warnings --disable-nls; \ $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)'; \ $(MAKE) dvi; \ $(install-transform-check); \ $(my-instcheck); \ $(coreutils-path-check); \ $(MAKE) distclean \ ) (cd $(t) && mv $(distdir) $(distdir).old \ && $(amtar_extract_) - ) < $(preferred_tarball_) diff -ur $(t)/$(distdir).old $(t)/$(distdir) -rm -rf $(t) rmdir $(tmpdir)/$(PACKAGE) $(tmpdir) @echo "========================"; \ echo "ready for distribution:"; \ for i in $(DIST_ARCHIVES); do echo " $$i"; done; \ echo "========================" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/.version�������������������������������������������������������������������0000664�0000000�0000000�00000000004�12166360012�013060� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/TODO�����������������������������������������������������������������������0000664�0000000�0000000�00000004554�11434330764�012110� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������idutils TODO - from Claudio Fontana * New experimental scanners (java, lisp, perl, [python]) - build missing testcases - generally, make more robust - fix and integrate Python-support patch #5358 - fix bug #18372 and generally make Lisp scanner less prone to cause crashes - Perl scanner: do not index language keywords and such (also Python) * Other tasks - investigate possible problems with signed/unsigned comparisons and data types (task #4909) - xemacs support (task #5702) idutils TODO - Future directions from previous maintainers * General - Add comments to all substantive functions * Portability - Fix file name handling for non-UNIX file systems (notably DOS, Windoze & OS/2). - Fix assumption that (sizeof (int) == sizeof (long)) - Integrate changes for MSDOS via djgpp - Port to cygwin - configure gcc warning flags - remove arbitrary buffer-size limits and unsafe libc functions (e.g., gets) * lid - use "long long" (if available) integer comparisons in query_number (). * mkid & lid - store & retrieve floating point literals - automatically crack (optionally gzipped or compressed) tar files, so you can index and search archived source without having to unpack it. - reset access times * mkid - Reinstate "-" on command-line, meaning read stdin for newline-separated args. - Add times(2) results to statistics output. - Scale statistics base unit (KB, MB, GB) - detect and avoid cycles in the tree induced by symlinks to /. - report dangling symlinks as such, rather than just saying "can't stat" - don't gripe about dangling symlinks if file won't be scanned anyway - (Optinally?) store tokenized contents of comments. - Store attributes with symbols: type, func, variable struct-tag enum-tag, keyword, etc. Store caller/callee relationships between identifiers. Indicate which files have defns vs. uses. This info is needed to support a cscope interface. - treat \ specially for TeX files and do likewise with @ for Texinfo. - line-buffer verbose output * gscope - add a cscope work-alike query interface - rewrite scanners to be scanner/parsers that can distinguish defn from use, lvalues from rvalues, types from vars from funcs from macros. * grep - Hack GNU grep to use a mkid database for hints about which files to search. Local Variables: mode: text fill-column: 75 End: ����������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/��������������������������������������������������������������������0000775�0000000�0000000�00000000000�13260671570�012634� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/rules���������������������������������������������������������������0000775�0000000�0000000�00000006652�12300303736�013713� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 debian-tmp := $(CURDIR)/debian/id-utils # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure dh_testdir dh_autotools-dev_updateconfig # Configure the package. EMACS=no ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --datadir=/usr/share/misc CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" build: build-stamp build-stamp: config.status dh_testdir # Compile the package. $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" touch $@ clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_autotools-dev_restoreconfig dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # install the package into debian/id-utils. $(MAKE) DESTDIR=$(debian-tmp) install find $(debian-tmp) -type d -empty -delete # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs # dh_installexamples install -D -g root -m 644 -o root lisp/idutils.el $(debian-tmp)/usr/share/emacs/site-lisp/id-utils.el # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo # dh_installman dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/defid.1.gz dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/eid.1.gz dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/aid.1.gz dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/gid.1.gz help2man -i debian/seealso -N -n "Build an identifier database" $(debian-tmp)/usr/bin/mkid > $(debian-tmp)/usr/share/man/man1/mkid.1 help2man -i debian/seealso -N -n "Query ID database and report results" $(debian-tmp)/usr/bin/lid > $(debian-tmp)/usr/share/man/man1/lid.1 help2man -i debian/seealso -N -n "List identifiers that occur in FILENAME" $(debian-tmp)/usr/bin/fid > $(debian-tmp)/usr/share/man/man1/fid.1 help2man -i debian/seealso -N -n "Print constituent file names that match PATTERN" $(debian-tmp)/usr/bin/fnid > $(debian-tmp)/usr/share/man/man1/fnid.1 help2man -i debian/seealso -N -n "Print all tokens found in a source file" $(debian-tmp)/usr/bin/xtokid > $(debian-tmp)/usr/share/man/man1/xtokid.1 dh_strip dh_compress dh_fixperms rm -f $(debian-tmp)/usr/share/info/dir.gz # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install ��������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/changelog�����������������������������������������������������������0000664�0000000�0000000�00000015705�13260671570�014516� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils (4.6+git20120811-4ubuntu2) bionic; urgency=high * No change rebuild to pick up -fPIE compiler default -- Balint Reczey <rbalint@ubuntu.com> Tue, 03 Apr 2018 12:28:40 +0000 id-utils (4.6+git20120811-4ubuntu1) trusty; urgency=low * Use autotools-dev for arm64. -- Daniel T Chen <crimsun@ubuntu.com> Sun, 16 Feb 2014 22:54:08 -0500 id-utils (4.6+git20120811-4) unstable; urgency=low * Fix build errors with version 5.1 of texinfo -- Bradley A. Bosch <brad@debian.org> Sat, 31 Aug 2013 17:06:23 -0500 id-utils (4.6+git20120811-3) unstable; urgency=low * Temporary build fix to eliminate assumption that gets is defined (Closes: #721035) -- Bradley A. Bosch <brad@debian.org> Wed, 28 Aug 2013 10:44:23 -0500 id-utils (4.6+git20120811-2) unstable; urgency=low * Update debian/copyright (Missed this from NMU in last upload). (Closes: #644131) -- Bradley A. Bosch <brad@debian.org> Sun, 25 Aug 2013 16:23:35 -0500 id-utils (4.6+git20120811-1) unstable; urgency=low * New upstream version from git f746bf7e2980436904fe4d181b675d1de8b27120 with bug fixes (Closes: #701398) * Eliminate ambiguous duplicate hash_insert() functions (Closes: #688589) * Avoid crash in xtokid when language-option OPT is ommited (Closes: #716632) * Restore documentation; Upstream removed cover text requirements (Closes: #684091) -- Bradley A. Bosch <brad@debian.org> Sun, 18 Aug 2013 15:30:50 -0500 id-utils (4.5-3) unstable; urgency=low * Don't include info dir.gz file -- Bradley A. Bosch <brad@debian.org> Tue, 07 Sep 2010 21:57:26 -0500 id-utils (4.5-2) unstable; urgency=low * Fix some more lintian complaints -- Bradley A. Bosch <brad@debian.org> Mon, 30 Aug 2010 20:57:14 -0500 id-utils (4.5-1) unstable; urgency=low * New upstream version with bug fixes (Closes: #463049) (might fix #533683 as well) * Fix null string error in get_current_dir_link() when run with Working directory "/". (Closes: #443696) * Fix some lintian problems and noise -- Bradley A. Bosch <brad@debian.org> Sun, 29 Aug 2010 13:21:48 -0500 id-utils (4.2-1) unstable; urgency=low * New upstream version with many bug fixes (Closes: #382288, #384002, #384000) * Completely re-package starting with dh_make (Closes: #381530) -- Bradley A. Bosch <brad@debian.org> Sun, 13 May 2007 11:52:49 -0500 id-utils (3.2d-11) unstable; urgency=low * Update Email address * Fix possible build error by configuring for no emacs byte compiles. We don't currently package byte compiled code anyway. (Closes: #304012) * Apply German PO patch. (Closes: #314034) -- Bradley A. Bosch <brad@debian.org> Sat, 13 Aug 2005 14:10:43 -0500 id-utils (3.2d-10) unstable; urgency=low * Sticking with a consistent version of automake would help! (Closes: #251705) -- Bradley A. Bosch <bradbosch@attbi.com> Sun, 30 May 2004 13:50:26 -0500 id-utils (3.2d-9) unstable; urgency=low * Update autoconf related files with a more modern version. This also has the effect of fixing a bug in the source package with regard to the location of language map file. (Closes: #250462) -- Bradley A. Bosch <bradbosch@attbi.com> Sun, 23 May 2004 17:45:13 -0500 id-utils (3.2d-8) unstable; urgency=low * don't depend on any emacs but install id-utils.el anyway (Closes: 229933) * Don't free memory we are still using. (Closes: #184931) * Don't need debian/help2man. Build-depend on help2man package instead. * Don't need /usr/doc link anymore. * Add support for DEB_BUILD_OPTS. -- Bradley A. Bosch <bradbosch@attbi.com> Sun, 29 Feb 2004 11:52:28 -0600 id-utils (3.2d-7) unstable; urgency=low * I guess I opened the Build-Depends Pandora's box... Add emacs20 to Build-Depends list. (Closes: #142061) -- Bradley A. Bosch <bradbosch@attbi.com> Wed, 10 Apr 2002 00:37:31 -0500 id-utils (3.2d-6) unstable; urgency=low * Update Maintainer field to new email address. -- Bradley A. Bosch <bradbosch@attbi.com> Tue, 9 Apr 2002 02:13:38 -0500 id-utils (3.2d-5) unstable; urgency=low * Move Build-Depends to Source paragraph. (Closes: #132486) -- Bradley A. Bosch <bradbosch@attbi.com> Tue, 9 Apr 2002 01:22:36 -0500 id-utils (3.2d-4) unstable; urgency=low * Code review and a user feedback indicate that the segmentation fault on gid should be avoided now. (Closes: #70573) * Fixed "mkid -f doesn't accept a path for a file". Thanks to fMichael Piefel <piefel@debian.org> for the patch. (Closes: #98211) * Add Build-Depends to control file. This is my best guess as to the cause of the empty info file in the latest sparc id-utils package. -- Bradley A. Bosch <bradbosch@attbi.com> Tue, 12 Feb 2002 12:14:19 -0600 id-utils (3.2d-3) unstable; urgency=low * Fix errors detected by lintian: move /usr/info and link /usr/doc/id-utils. * Update to standards version 3.5.4.0. * Update with automake, autoconf and aclocal. * Move info remove to prerm script. * m4 source directory now unused. * Move id-lang.map to /usr/share/misc (bug #45091). * Parse .CPP as c++. * Assert (bug #53421) * Move man page to /usr/share/man (bug #91175). * Move doc directory to /usr/share/doc (bug #91555). * Interpret debian/help2man with perl (bug #41142). * Fix name of library for autoload example in documenation. -- Bradley A. Bosch <brad@lachman.com> Sun, 29 Apr 2001 22:17:42 -0500 id-utils (3.2d-2) unstable; urgency=low * Add man pages for all id-utils binaries. This will close bug #26462. -- Bradley A. Bosch <brad@lachman.com> Wed, 7 Jul 1999 12:37:37 -0500 id-utils (3.2d-1) unstable; urgency=low * New upstream version. Note: A bug in the gettext package seems to prevent autoconfig from working with this release. Try uninstalling gettext if you encounter this while building this package. -- Bradley A. Bosch <brad@lachman.com> Tue, 8 Jun 1999 17:06:01 -0500 id-utils (3.2-5) unstable; urgency=low * Fixed location of emacs lisp file. -- Bradley A. Bosch <brad@lachman.com> Mon, 14 Sep 1998 15:31:45 -0500 id-utils (3.2-4) unstable; urgency=low * Fixed yet another read-only string coredump with xtokid. -- Bradley A. Bosch <brad@lachman.com> Fri, 5 Dec 1997 23:26:26 -0600 id-utils (3.2-3) unstable; urgency=low * Fixed another read-only string coredump with "lid -i" -- Bradley A. Bosch <brad@lachman.com> Sun, 10 Aug 1997 12:44:38 -0500 id-utils (3.2-2) unstable; urgency=low * New maintainer * Updated to new source package format, bug #9476 * Fixed ID file was not found bug #5502 * Linked against libc6 * Fixed strtok on string constant bug * Avoid save file prompts in emacs gid interface -- Bradley A. Bosch <brad@lachman.com> Sun, 20 Jul 1997 10:59:42 -0500 Wed Aug 21 12:40:20 1996 Erick Branderhorst <branderh@debian.org> * mainstream 3.2 Thu Jul 18 11:57:08 1996 Erick Branderhorst <branderh@debian.org> * mainstream 3.1 Tue Jul 9 12:41:31 1996 Erick Branderhorst <branderh@debian.org> * First debian release Local variables: End: �����������������������������������������������������������id-utils-4.6+git20120811/debian/seealso�������������������������������������������������������������0000664�0000000�0000000�00000000373�06740710506�014213� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[see also] The full documentation for the .B id-utils package is maintained as a Texinfo manual. If the .B info and .B id-utils packages are properly installed, the command .IP .B info 'ID database' .PP should give you access to the complete manual. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/watch���������������������������������������������������������������0000664�0000000�0000000�00000001352�10623104751�013656� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Example watch control file for uscan # Rename this file to "watch" and then you can run the "uscan" command # to check for upstream updates and more. # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 # Uncomment to examine a Webpage # <Webpage URL> <string match> #http://www.example.com/downloads.php id-utils-(.*)\.tar\.gz # Uncomment to examine a Webserver directory #http://www.example.com/pub/id-utils-(.*)\.tar\.gz # Uncommment to examine a FTP server #ftp://ftp.example.com/pub/id-utils-(.*)\.tar\.gz debian uupdate ftp://ftp.gnu.org/gnu/idutils/idutils-(.*)\.tar\.gz debian uupdate # Uncomment to find new files on sourceforge, for debscripts >= 2.9 # http://sf.net/id-utils/id-utils-(.*)\.tar\.gz ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/control�������������������������������������������������������������0000664�0000000�0000000�00000001331�12300303660�014217� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Source: id-utils Section: devel Priority: optional Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> XSBC-Original-Maintainer: Bradley A. Bosch <brad@debian.org> Build-Depends: debhelper (>= 5), autotools-dev, texinfo, help2man Standards-Version: 3.9.1 Package: id-utils Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, dpkg (>= 1.15.4) | install-info Description: Fast, high-capacity, identifier database tool Actually, the term `identifier' is too limiting--`mkid' stores tokens, be they program identifiers of any form, literal numbers, or words of human-readable text. Database queries can be issued from the command-line, or from within emacs, serving as an augmented tags facility. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/docs����������������������������������������������������������������0000664�0000000�0000000�00000000021�11434570236�013476� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������NEWS README TODO ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/compat��������������������������������������������������������������0000664�0000000�0000000�00000000002�10623104751�014022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������5 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/copyright�����������������������������������������������������������0000664�0000000�0000000�00000003150�12206477610�014564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is the Debian Linux prepackaged version of the GNU id utilities. Upstream Authors: The id-utils were written by Greg McGary, who assigned his copyright to the FSF on March 1, 1996. Claudio Fontana <claudio@gnu.org> currently maintains the upstream version. id-utils.texi was written by Tom Horsley, and explicitly not copyrighted, but contributed to the public domain. An FSF copyright has since been affixed. Debian Authors: Originally packaged for Debian from the GNU source by Erick Branderhorst <branderh@debian.org>. The current version based on git://git.savannah.gnu.org/idutils.git The current Debian maintainer is Brad Bosch <brad@debian.org>. Copyright: 1986-2010 Free Software Foundation, Inc. License: 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, 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 <http://www.gnu.org/licenses/>. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3'. The Debian packaging is Copyright (C) 1992-2013, Bradley A. Bosch <brad@debian.org> and is licensed under the GPL, see above. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/README.Debian�������������������������������������������������������0000664�0000000�0000000�00000000420�10623104751�014661� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils for Debian ------------------- A note for emacs users: The id-utils.el file is small and simple so there is no need for the extra packaging complexity of building byte-compiled versions. -- Bradley A. Bosch <bbosch@iphase.com>, Mon, 14 May 2007 17:01:26 -0500 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/debian/dirs����������������������������������������������������������������0000664�0000000�0000000�00000000021�10623104751�013501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������usr/bin usr/sbin ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465165�012153� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/isnanl-nolibm.h��������������������������������������������������������0000664�0000000�0000000�00000002307�12166360012�015063� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #if HAVE_ISNANL_IN_LIBC /* Get declaration of isnan macro or (older) isnanl function. */ # include <math.h> # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl extern int isnanl (long double x); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/unistd--.h�������������������������������������������������������������0000664�0000000�0000000�00000001743�12166360012�013764� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Like unistd.h, but redefine some names to avoid glitches. Copyright (C) 2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #include <unistd.h> #include "unistd-safer.h" #undef dup #define dup dup_safer #undef pipe #define pipe pipe_safer #if GNULIB_PIPE2_SAFER # undef pipe2 # define pipe2 pipe2_safer #endif �����������������������������id-utils-4.6+git20120811/lib/strdup.c���������������������������������������������������������������0000664�0000000�0000000�00000002601�12166360012�013632� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include <config.h> #endif /* Get specification. */ #include <string.h> #include <stdlib.h> #undef __strdup #ifdef _LIBC # undef strdup #endif #ifndef weak_alias # define __strdup strdup #endif /* Duplicate S, returning an identical malloc'd string. */ char * __strdup (const char *s) { size_t len = strlen (s) + 1; void *new = malloc (len); if (new == NULL) return NULL; return (char *) memcpy (new, s, len); } #ifdef libc_hidden_def libc_hidden_def (__strdup) #endif #ifdef weak_alias weak_alias (__strdup, strdup) #endif �������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbscasecmp.c�����������������������������������������������������������0000664�0000000�0000000�00000005504�12166360012�014433� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Case-insensitive string comparison function. Copyright (C) 1998-1999, 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005, based on earlier glibc code. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <string.h> #include <ctype.h> #include <limits.h> #include "mbuiter.h" #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! */ int mbscasecmp (const char *s1, const char *s2) { if (s1 == s2) return 0; /* Be careful not to look at the entire extent of s1 or s2 until needed. This is useful because when two strings differ, the difference is most often already in the very few first characters. */ if (MB_CUR_MAX > 1) { mbui_iterator_t iter1; mbui_iterator_t iter2; mbui_init (iter1, s1); mbui_init (iter2, s2); while (mbui_avail (iter1) && mbui_avail (iter2)) { int cmp = mb_casecmp (mbui_cur (iter1), mbui_cur (iter2)); if (cmp != 0) return cmp; mbui_advance (iter1); mbui_advance (iter2); } if (mbui_avail (iter1)) /* s2 terminated before s1. */ return 1; if (mbui_avail (iter2)) /* s1 terminated before s2. */ return -1; return 0; } else { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-strcasecmp.c���������������������������������������������������������0000664�0000000�0000000�00000003155�12166360012�014702� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include "c-strcase.h" #include <limits.h> #include "c-ctype.h" int c_strcasecmp (const char *s1, const char *s2) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-frexpl.h��������������������������������������������������������0000664�0000000�0000000�00000002103�12166360012�015113� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= LDBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern long double printf_frexpl (long double x, int *expptr); �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/bitrotate.h������������������������������������������������������������0000664�0000000�0000000�00000010231�12166360012�014311� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* bitrotate.h - Rotate bits in integers Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */ #ifndef _GL_BITROTATE_H #define _GL_BITROTATE_H #include <limits.h> #include <stdint.h> #include <sys/types.h> #ifdef UINT64_MAX /* Given an unsigned 64-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and 63 inclusive. */ static inline uint64_t rotl64 (uint64_t x, int n) { return ((x << n) | (x >> (64 - n))) & UINT64_MAX; } /* Given an unsigned 64-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to 63 inclusive.*/ static inline uint64_t rotr64 (uint64_t x, int n) { return ((x >> n) | (x << (64 - n))) & UINT64_MAX; } #endif /* Given an unsigned 32-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and 31 inclusive. */ static inline uint32_t rotl32 (uint32_t x, int n) { return ((x << n) | (x >> (32 - n))) & UINT32_MAX; } /* Given an unsigned 32-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to 31 inclusive.*/ static inline uint32_t rotr32 (uint32_t x, int n) { return ((x >> n) | (x << (32 - n))) & UINT32_MAX; } /* Given a size_t argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ static inline size_t rotl_sz (size_t x, int n) { return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; } /* Given a size_t argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ static inline size_t rotr_sz (size_t x, int n) { return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; } /* Given an unsigned 16-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 to 15 inclusive, but on most relevant targets N can also be 0 and 16 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint16_t rotl16 (uint16_t x, int n) { return ((x << n) | (x >> (16 - n))) & UINT16_MAX; } /* Given an unsigned 16-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be in 1 to 15 inclusive, but on most relevant targets N can also be 0 and 16 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint16_t rotr16 (uint16_t x, int n) { return ((x >> n) | (x << (16 - n))) & UINT16_MAX; } /* Given an unsigned 8-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 to 7 inclusive, but on most relevant targets N can also be 0 and 8 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint8_t rotl8 (uint8_t x, int n) { return ((x << n) | (x >> (8 - n))) & UINT8_MAX; } /* Given an unsigned 8-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be in 1 to 7 inclusive, but on most relevant targets N can also be 0 and 8 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint8_t rotr8 (uint8_t x, int n) { return ((x >> n) | (x << (8 - n))) & UINT8_MAX; } #endif /* _GL_BITROTATE_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/exclude.h��������������������������������������������������������������0000664�0000000�0000000�00000003615�12166360012�013755� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* exclude.h -- declarations for excluding file names Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _GL_EXCLUDE_H #define _GL_EXCLUDE_H 1 #include <stdbool.h> /* Written by Paul Eggert <eggert@twinsun.com> and Sergey Poznyakoff <gray@gnu.org> */ /* Exclude options, which can be ORed with fnmatch options. */ /* Patterns must match the start of file names, instead of matching anywhere after a '/'. */ #define EXCLUDE_ANCHORED (1 << 30) /* Include instead of exclude. */ #define EXCLUDE_INCLUDE (1 << 29) /* '?', '*', '[', and '\\' are special in patterns. Without this option, these characters are ordinary and fnmatch is not used. */ #define EXCLUDE_WILDCARDS (1 << 28) struct exclude; bool fnmatch_pattern_has_wildcards (const char *, int) _GL_ATTRIBUTE_PURE; struct exclude *new_exclude (void); void free_exclude (struct exclude *); void add_exclude (struct exclude *, char const *, int); int add_exclude_file (void (*) (struct exclude *, char const *, int), struct exclude *, char const *, int, char); bool excluded_file_name (struct exclude const *, char const *); bool exclude_fnmatch (char const *pattern, char const *f, int options); #endif /* _GL_EXCLUDE_H */ �������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/sys_types.in.h���������������������������������������������������������0000664�0000000�0000000�00000002602�12166360012�014766� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Provide a more complete sys/types.h. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #ifndef _@GUARD_PREFIX@_SYS_TYPES_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ #ifndef _@GUARD_PREFIX@_SYS_TYPES_H #define _@GUARD_PREFIX@_SYS_TYPES_H /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */ /* But avoid namespace pollution on glibc systems. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include <stddef.h> #endif #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ ������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/wcwidth.c��������������������������������������������������������������0000664�0000000�0000000�00000002773�12166360012�013774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine the number of screen columns needed for a character. Copyright (C) 2006-2007, 2010-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> /* Get iswprint. */ #include <wctype.h> #include "localcharset.h" #include "streq.h" #include "uniwidth.h" int wcwidth (wchar_t wc) #undef wcwidth { /* In UTF-8 locales, use a Unicode aware width function. */ const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) { /* We assume that in a UTF-8 locale, a wide character is the same as a Unicode character. */ return uc_width (wc, encoding); } else { /* Otherwise, fall back to the system's wcwidth function. */ #if HAVE_WCWIDTH return wcwidth (wc); #else return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; #endif } } �����id-utils-4.6+git20120811/lib/stdio-impl.h�����������������������������������������������������������0000664�0000000�0000000�00000010103�12166360012�014373� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Implementation details of FILE streams. Copyright (C) 2007-2008, 2010-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 <http://www.gnu.org/licenses/>. */ /* Many stdio implementations have the same logic and therefore can share the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ /* BSD stdio derived implementations. */ #if defined __NetBSD__ /* NetBSD */ /* Get __NetBSD_Version__. */ # include <sys/param.h> #endif #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __DragonFly__ /* DragonFly */ /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ # define fp_ ((struct { struct __FILE_public pub; \ struct { unsigned char *_base; int _size; } _bf; \ void *cookie; \ void *_close; \ void *_read; \ void *_seek; \ void *_write; \ struct { unsigned char *_base; int _size; } _ub; \ int _ur; \ unsigned char _ubuf[3]; \ unsigned char _nbuf[1]; \ struct { unsigned char *_base; int _size; } _lb; \ int _blksize; \ fpos_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ # define _p pub._p # define _flags pub._flags # define _r pub._r # define _w pub._w # else # define fp_ fp # endif # if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */ struct __sfileext { struct __sbuf _ub; /* ungetc buffer */ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub # else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ # define fp_ub fp_->_ub # endif # define HASUB(fp) (fp_ub._base != NULL) #endif /* SystemV derived implementations. */ #ifdef __TANDEM /* NonStop Kernel */ # ifndef _IOERR /* These values were determined by the program 'stdioext-flags' at <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */ # define _IOERR 0x40 # define _IOREAD 0x80 # define _IOWRT 0x4 # define _IORW 0x100 # endif #endif #if defined _IOERR # if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ # define fp_ ((struct { unsigned char *_ptr; \ unsigned char *_base; \ unsigned char *_end; \ long _cnt; \ int _file; \ unsigned int _flag; \ } *) fp) # else # define fp_ fp # endif # if defined _SCO_DS /* OpenServer */ # define _cnt __cnt # define _ptr __ptr # define _base __base # define _flag __flag # endif #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/uniwidth.in.h����������������������������������������������������������0000664�0000000�0000000�00000004000�12166360012�014551� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Display width functions. 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _UNIWIDTH_H #define _UNIWIDTH_H #include "unitypes.h" /* Get size_t. */ #include <stddef.h> /* Get locale_charset() declaration. */ #include "localcharset.h" #ifdef __cplusplus extern "C" { #endif /* Display width. */ /* These functions are locale dependent. The encoding argument identifies the encoding (e.g. "ISO-8859-2" for Polish). */ /* Determine number of column positions required for UC. */ extern int uc_width (ucs4_t uc, const char *encoding) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) __attribute__ ((__pure__)) #endif ; /* 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); extern int u16_width (const uint16_t *s, size_t n, const char *encoding); extern int u32_width (const uint32_t *s, size_t n, const char *encoding); /* Determine number of column positions required for S. */ extern int u8_strwidth (const uint8_t *s, const char *encoding); extern int u16_strwidth (const uint16_t *s, const char *encoding); extern int u32_strwidth (const uint32_t *s, const char *encoding); #ifdef __cplusplus } #endif #endif /* _UNIWIDTH_H */ id-utils-4.6+git20120811/lib/isnand-nolibm.h��������������������������������������������������������0000664�0000000�0000000�00000002216�12166360012�015052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #if HAVE_ISNAND_IN_LIBC /* Get declaration of isnan macro. */ # include <math.h> # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand extern int isnand (double x); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strsep.c���������������������������������������������������������������0000664�0000000�0000000�00000002723�12166360012�013636� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2004, 2007, 2009-2012 Free Software Foundation, Inc. Written by Yoann Vandoorselaere <yoann@prelude-ids.org>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif /* Specification. */ #include <string.h> char * strsep (char **stringp, const char *delim) { char *start = *stringp; char *ptr; if (start == NULL) return NULL; /* Optimize the case of no delimiters. */ if (delim[0] == '\0') { *stringp = NULL; return start; } /* Optimize the case of one delimiter. */ if (delim[1] == '\0') ptr = strchr (start, delim[0]); else /* The general case. */ ptr = strpbrk (start, delim); if (ptr == NULL) { *stringp = NULL; return start; } *ptr = '\0'; *stringp = ptr + 1; return start; } ���������������������������������������������id-utils-4.6+git20120811/lib/time.in.h��������������������������������������������������������������0000664�0000000�0000000�00000021625�12166360012�013670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A more-standard <time.h>. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 <time.h> eventually includes itself recursively; if that is happening, just include the system <time.h> without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _@GUARD_PREFIX@_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ # include <stddef.h> /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in <sys/time.h> (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the pthreads-win32 library defines it in <pthread.h>. */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include <sys/time.h> # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include <pthread.h> /* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */ # undef asctime_r # undef ctime_r # undef gmtime_r # undef localtime_r # undef rand_r # undef strtok_r # else # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_timespec # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # define GNULIB_defined_struct_timespec 1 # endif # ifdef __cplusplus } # endif # endif # endif # if !GNULIB_defined_struct_time_t_must_be_integral /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ struct __time_t_must_be_integral { unsigned int __floating_time_t_unsupported : (time_t) 1; }; # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See <http://www.opengroup.org/susv3xsh/nanosleep.html>. */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif _GL_FUNCDECL_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # else # if ! @HAVE_NANOSLEEP@ _GL_FUNCDECL_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See <http://www.opengroup.org/susv3xsh/localtime_r.html> and <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r # endif _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (localtime_r); # endif # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r # endif _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (gmtime_r); # endif # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See <http://www.opengroup.org/susv3xsh/strptime.html>. */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm # endif _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); # else # if ! @HAVE_TIMEGM@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif _GL_CXXALIASWARN (timegm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef asctime_r _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif #endif �����������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-parse.c���������������������������������������������������������0000664�0000000�0000000�00000053301�12166360012�014726� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include <config.h> #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include <stddef.h> /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include <stdint.h> # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include <inttypes.h> # endif #else # include <stdint.h> #endif /* malloc(), realloc(), free(). */ #include <stdlib.h> /* memcpy(). */ #include <string.h> /* errno. */ #include <errno.h> /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = N_DIRECT_ALLOC_DIRECTIVES; d->dir = d->direct_alloc_dir; a->count = 0; a_allocated = N_DIRECT_ALLOC_ARGUMENTS; a->arg = a->direct_alloc_arg; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg != a->direct_alloc_arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ if (a->arg == a->direct_alloc_arg) \ memcpy (memory, a->arg, a->count * sizeof (argument)); \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } #if __GLIBC__ >= 2 && !defined __UCLIBC__ else if (*cp == 'I') { dp->flags |= FLAG_LOCALIZED; cp++; } #endif else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } #if defined __APPLE__ && defined __MACH__ /* On MacOS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') { if (64 / 8 > sizeof (long)) { /* int64_t = long long */ flags += 16; } else { /* int64_t = long */ flags += 8; } cp++; } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') { if (64 / 8 > sizeof (long)) { /* __int64 = long long */ flags += 16; } else { /* __int64 = long */ flags += 8; } cp += 3; } #endif else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir ? realloc (d->dir, memory_size) : malloc (memory_size)); if (memory == NULL) /* Out of memory. */ goto out_of_memory; if (d->dir == d->direct_alloc_dir) memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/config.hin�������������������������������������������������������������0000664�0000000�0000000�00000204400�12166360012�014113� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* lib/config.hin. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values. */ #undef CHECK_PRINTF_SAFE /* 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'. */ #undef C_ALLOCA /* Define as the bit index in the word where to find bit 0 of the exponent of 'double'. */ #undef DBL_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'double'. */ #undef DBL_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'double'. */ #undef DBL_SIGNBIT_BIT /* Define as the word index where to find the sign of 'double'. */ #undef DBL_SIGNBIT_WORD /* 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. */ #undef D_INO_IN_DIRENT /* 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 as the bit index in the word where to find bit 0 of the exponent of 'float'. */ #undef FLT_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'float'. */ #undef FLT_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'float'. */ #undef FLT_SIGNBIT_BIT /* Define as the word index where to find the sign of 'float'. */ #undef FLT_SIGNBIT_WORD /* Define to 1 if fopen() fails to recognize a trailing slash. */ #undef FOPEN_TRAILING_SLASH_BUG /* Define to 1 if the system's ftello function has the Solaris bug. */ #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #undef FUNC_NL_LANGINFO_YESEXPR_WORKS /* Define to 1 if ungetc is broken when used on arbitrary bytes. */ #undef FUNC_UNGETC_BROKEN /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module calloc-gnu shall be considered present. */ #undef GNULIB_CALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module close-stream shall be considered present. */ #undef GNULIB_CLOSE_STREAM /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module dirname shall be considered present. */ #undef GNULIB_DIRNAME /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fdopendir shall be considered present. */ #undef GNULIB_FDOPENDIR /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fd-safer-flag shall be considered present. */ #undef GNULIB_FD_SAFER_FLAG /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fflush shall be considered present. */ #undef GNULIB_FFLUSH /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fstatat shall be considered present. */ #undef GNULIB_FSTATAT /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module getcwd shall be considered present. */ #undef GNULIB_GETCWD /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module malloc-gnu shall be considered present. */ #undef GNULIB_MALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module openat shall be considered present. */ #undef GNULIB_OPENAT /* enable some gnulib portability checks */ #undef GNULIB_PORTCHECK /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module realloc-gnu shall be considered present. */ #undef GNULIB_REALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module snprintf shall be considered present. */ #undef GNULIB_SNPRINTF /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module strerror shall be considered present. */ #undef GNULIB_STRERROR /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC /* Define to 1 when the gnulib module calloc-posix should be tested. */ #undef GNULIB_TEST_CALLOC_POSIX /* Define to 1 when the gnulib module chdir should be tested. */ #undef GNULIB_TEST_CHDIR /* Define to 1 when the gnulib module cloexec should be tested. */ #undef GNULIB_TEST_CLOEXEC /* Define to 1 when the gnulib module close should be tested. */ #undef GNULIB_TEST_CLOSE /* Define to 1 when the gnulib module closedir should be tested. */ #undef GNULIB_TEST_CLOSEDIR /* Define to 1 when the gnulib module dirfd should be tested. */ #undef GNULIB_TEST_DIRFD /* Define to 1 when the gnulib module dup should be tested. */ #undef GNULIB_TEST_DUP /* Define to 1 when the gnulib module dup2 should be tested. */ #undef GNULIB_TEST_DUP2 /* Define to 1 when the gnulib module environ should be tested. */ #undef GNULIB_TEST_ENVIRON /* Define to 1 when the gnulib module fchdir should be tested. */ #undef GNULIB_TEST_FCHDIR /* Define to 1 when the gnulib module fcntl should be tested. */ #undef GNULIB_TEST_FCNTL /* Define to 1 when the gnulib module fdopen should be tested. */ #undef GNULIB_TEST_FDOPEN /* Define to 1 when the gnulib module fdopendir should be tested. */ #undef GNULIB_TEST_FDOPENDIR /* Define to 1 when the gnulib module fflush should be tested. */ #undef GNULIB_TEST_FFLUSH /* Define to 1 when the gnulib module fopen should be tested. */ #undef GNULIB_TEST_FOPEN /* Define to 1 when the gnulib module fprintf-posix should be tested. */ #undef GNULIB_TEST_FPRINTF_POSIX /* Define to 1 when the gnulib module fpurge should be tested. */ #undef GNULIB_TEST_FPURGE /* Define to 1 when the gnulib module freopen should be tested. */ #undef GNULIB_TEST_FREOPEN /* Define to 1 when the gnulib module frexp should be tested. */ #undef GNULIB_TEST_FREXP /* Define to 1 when the gnulib module frexpl should be tested. */ #undef GNULIB_TEST_FREXPL /* Define to 1 when the gnulib module fseek should be tested. */ #undef GNULIB_TEST_FSEEK /* Define to 1 when the gnulib module fseeko should be tested. */ #undef GNULIB_TEST_FSEEKO /* Define to 1 when the gnulib module fstat should be tested. */ #undef GNULIB_TEST_FSTAT /* Define to 1 when the gnulib module fstatat should be tested. */ #undef GNULIB_TEST_FSTATAT /* Define to 1 when the gnulib module ftell should be tested. */ #undef GNULIB_TEST_FTELL /* Define to 1 when the gnulib module ftello should be tested. */ #undef GNULIB_TEST_FTELLO /* Define to 1 when the gnulib module getcwd should be tested. */ #undef GNULIB_TEST_GETCWD /* Define to 1 when the gnulib module getdelim should be tested. */ #undef GNULIB_TEST_GETDELIM /* Define to 1 when the gnulib module getdtablesize should be tested. */ #undef GNULIB_TEST_GETDTABLESIZE /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #undef GNULIB_TEST_GETOPT_GNU /* Define to 1 when the gnulib module getpagesize should be tested. */ #undef GNULIB_TEST_GETPAGESIZE /* Define to 1 when the gnulib module iswblank should be tested. */ #undef GNULIB_TEST_ISWBLANK /* Define to 1 when the gnulib module lseek should be tested. */ #undef GNULIB_TEST_LSEEK /* Define to 1 when the gnulib module lstat should be tested. */ #undef GNULIB_TEST_LSTAT /* Define to 1 when the gnulib module malloc-posix should be tested. */ #undef GNULIB_TEST_MALLOC_POSIX /* Define to 1 when the gnulib module mbrtowc should be tested. */ #undef GNULIB_TEST_MBRTOWC /* Define to 1 when the gnulib module mbscasecmp should be tested. */ #undef GNULIB_TEST_MBSCASECMP /* Define to 1 when the gnulib module mbsinit should be tested. */ #undef GNULIB_TEST_MBSINIT /* Define to 1 when the gnulib module mbsrtowcs should be tested. */ #undef GNULIB_TEST_MBSRTOWCS /* Define to 1 when the gnulib module mbtowc should be tested. */ #undef GNULIB_TEST_MBTOWC /* Define to 1 when the gnulib module memchr should be tested. */ #undef GNULIB_TEST_MEMCHR /* Define to 1 when the gnulib module mempcpy should be tested. */ #undef GNULIB_TEST_MEMPCPY /* Define to 1 when the gnulib module memrchr should be tested. */ #undef GNULIB_TEST_MEMRCHR /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO /* Define to 1 when the gnulib module open should be tested. */ #undef GNULIB_TEST_OPEN /* Define to 1 when the gnulib module openat should be tested. */ #undef GNULIB_TEST_OPENAT /* Define to 1 when the gnulib module opendir should be tested. */ #undef GNULIB_TEST_OPENDIR /* Define to 1 when the gnulib module printf-posix should be tested. */ #undef GNULIB_TEST_PRINTF_POSIX /* Define to 1 when the gnulib module putenv should be tested. */ #undef GNULIB_TEST_PUTENV /* Define to 1 when the gnulib module readdir should be tested. */ #undef GNULIB_TEST_READDIR /* Define to 1 when the gnulib module realloc-posix should be tested. */ #undef GNULIB_TEST_REALLOC_POSIX /* Define to 1 when the gnulib module rewinddir should be tested. */ #undef GNULIB_TEST_REWINDDIR /* Define to 1 when the gnulib module setenv should be tested. */ #undef GNULIB_TEST_SETENV /* Define to 1 when the gnulib module setlocale should be tested. */ #undef GNULIB_TEST_SETLOCALE /* Define to 1 when the gnulib module signbit should be tested. */ #undef GNULIB_TEST_SIGNBIT /* Define to 1 when the gnulib module snprintf should be tested. */ #undef GNULIB_TEST_SNPRINTF /* Define to 1 when the gnulib module sprintf-posix should be tested. */ #undef GNULIB_TEST_SPRINTF_POSIX /* Define to 1 when the gnulib module stat should be tested. */ #undef GNULIB_TEST_STAT /* Define to 1 when the gnulib module strcasestr should be tested. */ #undef GNULIB_TEST_STRCASESTR /* Define to 1 when the gnulib module strdup should be tested. */ #undef GNULIB_TEST_STRDUP /* Define to 1 when the gnulib module strerror should be tested. */ #undef GNULIB_TEST_STRERROR /* Define to 1 when the gnulib module strndup should be tested. */ #undef GNULIB_TEST_STRNDUP /* Define to 1 when the gnulib module strnlen should be tested. */ #undef GNULIB_TEST_STRNLEN /* Define to 1 when the gnulib module strsep should be tested. */ #undef GNULIB_TEST_STRSEP /* Define to 1 when the gnulib module symlink should be tested. */ #undef GNULIB_TEST_SYMLINK /* Define to 1 when the gnulib module unsetenv should be tested. */ #undef GNULIB_TEST_UNSETENV /* Define to 1 when the gnulib module vfprintf-posix should be tested. */ #undef GNULIB_TEST_VFPRINTF_POSIX /* Define to 1 when the gnulib module wcrtomb should be tested. */ #undef GNULIB_TEST_WCRTOMB /* Define to 1 when the gnulib module wctob should be tested. */ #undef GNULIB_TEST_WCTOB /* Define to 1 when the gnulib module wctomb should be tested. */ #undef GNULIB_TEST_WCTOMB /* Define to 1 when the gnulib module wcwidth should be tested. */ #undef GNULIB_TEST_WCWIDTH /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have 'alloca' after including <alloca.h>, a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the <bp-sym.h> header file. */ #undef HAVE_BP_SYM_H /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* Define to 1 if your system has a GNU libc compatible 'calloc' function, and to 0 otherwise. */ #undef HAVE_CALLOC_GNU /* Define if the 'calloc' function is POSIX compliant. */ #undef HAVE_CALLOC_POSIX /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* Define if the copysignf function is declared in <math.h> and available in libc. */ #undef HAVE_COPYSIGNF_IN_LIBC /* Define if the copysignl function is declared in <math.h> and available in libc. */ #undef HAVE_COPYSIGNL_IN_LIBC /* Define if the copysign function is declared in <math.h> and available in libc. */ #undef HAVE_COPYSIGN_IN_LIBC /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. */ #undef HAVE_DECL_ALARM /* Define to 1 if you have the declaration of `copysign', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGN /* Define to 1 if you have the declaration of `copysignf', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGNF /* Define to 1 if you have the declaration of `copysignl', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGNL /* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. */ #undef HAVE_DECL_DIRFD /* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't. */ #undef HAVE_DECL_FCHDIR /* Define to 1 if you have the declaration of `fdopendir', and to 0 if you don't. */ #undef HAVE_DECL_FDOPENDIR /* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't. */ #undef HAVE_DECL_FPURGE /* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. */ #undef HAVE_DECL_FSEEKO /* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. */ #undef HAVE_DECL_FTELLO /* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't. */ #undef HAVE_DECL_GETCWD /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_GETC_UNLOCKED /* Define to 1 if you have the declaration of `getdelim', and to 0 if you don't. */ #undef HAVE_DECL_GETDELIM /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK /* Define to 1 if you have the declaration of `iswblank', and to 0 if you don't. */ #undef HAVE_DECL_ISWBLANK /* 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. */ #undef HAVE_DECL_MEMRCHR /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_NAME /* Define to 1 if you have the declaration of `program_invocation_short_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. */ #undef HAVE_DECL_SETENV /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. */ #undef HAVE_DECL_STRDUP /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R /* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you don't. */ #undef HAVE_DECL_STRNCASECMP /* Define to 1 if you have the declaration of `strndup', and to 0 if you don't. */ #undef HAVE_DECL_STRNDUP /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ #undef HAVE_DECL_STRNLEN /* 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. */ #undef HAVE_DECL_UNSETENV /* 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. */ #undef HAVE_DECL_WCTOB /* Define to 1 if you have the declaration of `wcwidth', and to 0 if you don't. */ #undef HAVE_DECL_WCWIDTH /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF /* Define to 1 if you have the declaration of `__fpending', and to 0 if you don't. */ #undef HAVE_DECL___FPENDING /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the `dirfd' function. */ #undef HAVE_DIRFD /* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 /* Define if you have the declaration of environ. */ #undef HAVE_ENVIRON_DECL /* Define to 1 if you have the `fchdir' function. */ #undef HAVE_FCHDIR /* Define to 1 if you have the `fcntl' function. */ #undef HAVE_FCNTL /* Define to 1 if you have the `fdopendir' function. */ #undef HAVE_FDOPENDIR /* Define to 1 if you have the <features.h> header file. */ #undef HAVE_FEATURES_H /* Define to 1 if you have the `flockfile' function. */ #undef HAVE_FLOCKFILE /* Define to 1 if you have the `fpurge' function. */ #undef HAVE_FPURGE /* Define if the frexpl function is available in libc. */ #undef HAVE_FREXPL_IN_LIBC /* Define if the frexp function is available in libc. */ #undef HAVE_FREXP_IN_LIBC /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `fstatat' function. */ #undef HAVE_FSTATAT /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE /* Define to 1 if you have the `getdelim' function. */ #undef HAVE_GETDELIM /* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE /* Define to 1 if you have the <getopt.h> header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such. */ #undef HAVE_INLINE /* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */ #undef HAVE_INTMAX_T /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if you have the `isblank' function. */ #undef HAVE_ISBLANK /* Define if the isnan(double) function is available in libc. */ #undef HAVE_ISNAND_IN_LIBC /* Define if the isnan(float) function is available in libc. */ #undef HAVE_ISNANF_IN_LIBC /* Define if the isnan(long double) function is available in libc. */ #undef HAVE_ISNANL_IN_LIBC /* Define to 1 if you have the `iswblank' function. */ #undef HAVE_ISWBLANK /* Define to 1 if you have the `iswcntrl' function. */ #undef HAVE_ISWCNTRL /* Define to 1 if you have the `iswctype' function. */ #undef HAVE_ISWCTYPE /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the <langinfo.h> header file. */ #undef HAVE_LANGINFO_H /* Define if your <locale.h> file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define if the ldexpl function is available in libc. */ #undef HAVE_LDEXPL_IN_LIBC /* Define if the ldexp function is available in libc. */ #undef HAVE_LDEXP_IN_LIBC /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `link' function. */ #undef HAVE_LINK /* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC_GNU /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and <sys/mman.h>. */ #undef HAVE_MAP_ANONYMOUS /* Define to 1 if you have the <math.h> header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the `mbsinit' function. */ #undef HAVE_MBSINIT /* Define to 1 if you have the `mbsrtowcs' function. */ #undef HAVE_MBSRTOWCS /* Define to 1 if <wchar.h> declares mbstate_t. */ #undef HAVE_MBSTATE_T /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `memrchr' function. */ #undef HAVE_MEMRCHR /* Define to 1 if getcwd minimally works, that is, its result can be trusted when it succeeds. */ #undef HAVE_MINIMALLY_WORKING_GETCWD /* Define to 1 if you have the `mprotect' function. */ #undef HAVE_MPROTECT /* Define to 1 if you have the `mquery' function. */ #undef HAVE_MQUERY /* 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 `newlocale' function. */ #undef HAVE_NEWLOCALE /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if libc includes obstacks. */ #undef HAVE_OBSTACK /* Define to 1 if you have the `openat' function. */ #undef HAVE_OPENAT /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR /* Define to 1 if you have the <OS.h> header file. */ #undef HAVE_OS_H /* Define to 1 if getcwd works, except it sometimes fails when it shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ #undef HAVE_PARTLY_WORKING_GETCWD /* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE /* Define to 1 if you have the `pthread_atfork' function. */ #undef HAVE_PTHREAD_ATFORK /* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */ #undef HAVE_PTHREAD_MUTEX_RECURSIVE /* Define if the POSIX multithreading library has read/write locks. */ #undef HAVE_PTHREAD_RWLOCK /* Define to 1 if the system has the type `ptrdiff_t'. */ #undef HAVE_PTRDIFF_T /* Define to 1 if acosf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACOSF /* Define to 1 if acosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACOSL /* Define to 1 if alphasort is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ALPHASORT /* Define to 1 if asinf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ASINF /* Define to 1 if asinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ASINL /* Define to 1 if atanf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATANF /* Define to 1 if atanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATANL /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL /* Define to 1 if btowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BTOWC /* Define to 1 if canonicalize_file_name is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME /* Define to 1 if ceilf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILF /* Define to 1 if ceill is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILL /* Define to 1 if chdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHDIR /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if closedir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CLOSEDIR /* Define to 1 if copysign is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COPYSIGN /* Define to 1 if copysignf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COPYSIGNF /* Define to 1 if copysignl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COPYSIGNL /* Define to 1 if cosf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSF /* Define to 1 if coshf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSHF /* Define to 1 if cosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSL /* 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. */ #undef HAVE_RAW_DECL_DPRINTF /* Define to 1 if dup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 /* Define to 1 if dup3 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP3 /* Define to 1 if duplocale is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUPLOCALE /* Define to 1 if endusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENDUSERSHELL /* Define to 1 if environ is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENVIRON /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS /* Define to 1 if expf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EXPF /* Define to 1 if expl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EXPL /* Define to 1 if fabsf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FABSF /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR /* Define to 1 if fchmodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHMODAT /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT /* Define to 1 if fcntl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCNTL /* 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. */ #undef HAVE_RAW_DECL_FDOPENDIR /* Define to 1 if ffs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FFS /* Define to 1 if ffsl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FFSL /* Define to 1 if ffsll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FFSLL /* Define to 1 if floorf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORF /* Define to 1 if floorl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORL /* Define to 1 if fma is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FMA /* Define to 1 if fmaf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FMAF /* Define to 1 if fmal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FMAL /* Define to 1 if fmodf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FMODF /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* Define to 1 if frexpf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREXPF /* Define to 1 if frexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREXPL /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO /* Define to 1 if fstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTAT /* Define to 1 if fstatat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTATAT /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC /* Define to 1 if ftello is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTELLO /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE /* Define to 1 if futimens is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FUTIMENS /* Define to 1 if getcwd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETCWD /* Define to 1 if getdelim is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDELIM /* Define to 1 if getdomainname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDOMAINNAME /* Define to 1 if getdtablesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDTABLESIZE /* Define to 1 if getgroups is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETGROUPS /* Define to 1 if gethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETHOSTNAME /* Define to 1 if getline is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLINE /* Define to 1 if getloadavg is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOADAVG /* Define to 1 if getlogin is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN /* Define to 1 if getlogin_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN_R /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT /* Define to 1 if group_member is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GROUP_MEMBER /* Define to 1 if imaxabs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXABS /* Define to 1 if imaxdiv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXDIV /* Define to 1 if initstate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTATE /* Define to 1 if initstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTATE_R /* Define to 1 if ioctl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IOCTL /* Define to 1 if isatty is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ISATTY /* Define to 1 if iswctype is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ISWCTYPE /* Define to 1 if lchmod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHMOD /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN /* Define to 1 if ldexpf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LDEXPF /* Define to 1 if ldexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LDEXPL /* Define to 1 if link is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINK /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT /* Define to 1 if log10f is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOG10F /* Define to 1 if logb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGB /* Define to 1 if logf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGF /* Define to 1 if logl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGL /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK /* Define to 1 if lstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSTAT /* Define to 1 if mbrlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRLEN /* Define to 1 if mbrtowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRTOWC /* Define to 1 if mbsinit is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSINIT /* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSNRTOWCS /* Define to 1 if mbsrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSRTOWCS /* Define to 1 if memmem is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMMEM /* Define to 1 if mempcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMPCPY /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR /* Define to 1 if mkdirat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDIRAT /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP /* Define to 1 if mkfifo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFO /* Define to 1 if mkfifoat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFOAT /* Define to 1 if mknod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNOD /* Define to 1 if mknodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNODAT /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP /* Define to 1 if mkostemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMPS /* Define to 1 if mkstemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMP /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS /* Define to 1 if modff is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MODFF /* Define to 1 if nl_langinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_NL_LANGINFO /* Define to 1 if openat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENAT /* Define to 1 if opendir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENDIR /* Define to 1 if pclose is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PCLOSE /* Define to 1 if pipe is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN /* Define to 1 if posix_openpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POSIX_OPENPT /* Define to 1 if powf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POWF /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME /* 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. */ #undef HAVE_RAW_DECL_PWRITE /* Define to 1 if random is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM /* 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. */ #undef HAVE_RAW_DECL_READDIR /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT /* Define to 1 if rewinddir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REWINDDIR /* Define to 1 if rint is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RINT /* Define to 1 if rintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RINTF /* Define to 1 if rintl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RINTL /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR /* Define to 1 if round is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUND /* Define to 1 if roundf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUNDF /* Define to 1 if roundl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUNDL /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH /* Define to 1 if scandir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SCANDIR /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV /* Define to 1 if sethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETHOSTNAME /* Define to 1 if setlocale is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETLOCALE /* Define to 1 if setstate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL /* Define to 1 if sinf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINF /* Define to 1 if sinhf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINHF /* Define to 1 if sinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINL /* Define to 1 if sleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SLEEP /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF /* Define to 1 if sqrtf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SQRTF /* Define to 1 if sqrtl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SQRTL /* Define to 1 if srandom is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R /* Define to 1 if stat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STAT /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY /* Define to 1 if stpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPNCPY /* Define to 1 if strcasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASECMP /* Define to 1 if strcasestr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASESTR /* Define to 1 if strchrnul is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCHRNUL /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP /* Define to 1 if strerror_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRERROR_R /* Define to 1 if strncasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCASECMP /* Define to 1 if strncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCAT /* Define to 1 if strndup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNDUP /* Define to 1 if strnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNLEN /* Define to 1 if strpbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRPBRK /* Define to 1 if strsep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSEP /* Define to 1 if strsignal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSIGNAL /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD /* Define to 1 if strtoimax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOIMAX /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R /* Define to 1 if strtoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOLL /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL /* Define to 1 if strtoumax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOUMAX /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP /* Define to 1 if symlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINK /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT /* Define to 1 if tanf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANF /* Define to 1 if tanhf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANHF /* Define to 1 if tanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANL /* Define to 1 if tmpfile is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TMPFILE /* Define to 1 if towctrans is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TOWCTRANS /* Define to 1 if trunc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNC /* Define to 1 if truncf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNCF /* Define to 1 if truncl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNCL /* Define to 1 if ttyname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TTYNAME_R /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK /* Define to 1 if unlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINKAT /* Define to 1 if unlockpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLOCKPT /* Define to 1 if unsetenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNSETENV /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP /* Define to 1 if utimensat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UTIMENSAT /* Define to 1 if vdprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VDPRINTF /* Define to 1 if vsnprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VSNPRINTF /* Define to 1 if wcpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCPCPY /* Define to 1 if wcpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCPNCPY /* Define to 1 if wcrtomb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCRTOMB /* Define to 1 if wcscasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCASECMP /* Define to 1 if wcscat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCAT /* Define to 1 if wcschr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCHR /* Define to 1 if wcscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCMP /* Define to 1 if wcscoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCOLL /* Define to 1 if wcscpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCPY /* Define to 1 if wcscspn is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCSPN /* Define to 1 if wcsdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSDUP /* Define to 1 if wcslen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSLEN /* Define to 1 if wcsncasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCASECMP /* Define to 1 if wcsncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCAT /* Define to 1 if wcsncmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCMP /* Define to 1 if wcsncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCPY /* Define to 1 if wcsnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNLEN /* Define to 1 if wcsnrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNRTOMBS /* Define to 1 if wcspbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSPBRK /* Define to 1 if wcsrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRCHR /* Define to 1 if wcsrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRTOMBS /* Define to 1 if wcsspn is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSSPN /* Define to 1 if wcsstr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSSTR /* Define to 1 if wcstok is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSTOK /* Define to 1 if wcswidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSWIDTH /* Define to 1 if wcsxfrm is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSXFRM /* Define to 1 if wctob is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTOB /* Define to 1 if wctrans is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTRANS /* Define to 1 if wctype is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTYPE /* Define to 1 if wcwidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCWIDTH /* Define to 1 if wmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCHR /* Define to 1 if wmemcmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCMP /* Define to 1 if wmemcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCPY /* Define to 1 if wmemmove is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMMOVE /* Define to 1 if wmemset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMSET /* Define to 1 if _Exit is declared even after undefining macros. */ #undef HAVE_RAW_DECL__EXIT /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR /* Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC_GNU /* Define if the 'realloc' function is POSIX compliant. */ #undef HAVE_REALLOC_POSIX /* Define to 1 if you have the `rewinddir' function. */ #undef HAVE_REWINDDIR /* Define to 1 if 'long double' and 'double' have the same representation. */ #undef HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Define to 1 if you have the `sbrk' function. */ #undef HAVE_SBRK /* Define to 1 if you have the <search.h> header file. */ #undef HAVE_SEARCH_H /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT /* Define to 1 if you have the <sgtty.h> header file. */ #undef HAVE_SGTTY_H /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define if the return value of the snprintf function is the number of of bytes (excluding the terminating NUL) that would have been produced if the buffer had been large enough. */ #undef HAVE_SNPRINTF_RETVAL_C99 /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the <stdio_ext.h> header file. */ #undef HAVE_STDIO_EXT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK /* Define to 1 if you have the <sys/bitypes.h> header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the <sys/inttypes.h> header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the <sys/mman.h> header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the <termio.h> header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the `towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `uselocale' function. */ #undef HAVE_USELOCALE /* Define to 1 if you have the `vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the <wchar.h> header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN /* Define to 1 if you have the `wctob' function. */ #undef HAVE_WCTOB /* Define to 1 if you have the <wctype.h> header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if you have the `wcwidth' function. */ #undef HAVE_WCWIDTH /* Define to 1 if you have the <winsock2.h> header file. */ #undef HAVE_WINSOCK2_H /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* Define to 1 if you have the `wmemchr' function. */ #undef HAVE_WMEMCHR /* Define to 1 if you have the `wmemcpy' function. */ #undef HAVE_WMEMCPY /* 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. */ #undef HAVE_WORKING_O_NOATIME /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW /* Define to 1 if you have the <xlocale.h> header file. */ #undef HAVE_XLOCALE_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* 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. */ #undef HAVE___FPENDING /* Define to 1 if you have the `__fpurge' function. */ #undef HAVE___FPURGE /* Define to 1 if you have the `__freading' function. */ #undef HAVE___FREADING /* Define to 1 if you have the `__xpg_strerror_r' function. */ #undef HAVE___XPG_STRERROR_R /* Define as the bit index in the word where to find bit 0 of the exponent of 'long double'. */ #undef LDBL_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'long double'. */ #undef LDBL_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'long double'. */ #undef LDBL_SIGNBIT_BIT /* Define as the word index where to find the sign of 'long double'. */ #undef LDBL_SIGNBIT_WORD /* 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 slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ #undef MALLOC_0_IS_NONNULL /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS /* Define if the mbrtowc function has the NULL pwc argument bug. */ #undef MBRTOWC_NULL_ARG1_BUG /* Define if the mbrtowc function has the NULL string argument bug. */ #undef MBRTOWC_NULL_ARG2_BUG /* Define if the mbrtowc function does not return 0 for a NUL character. */ #undef MBRTOWC_NUL_RETVAL_BUG /* Define if the mbrtowc function returns a wrong return value. */ #undef MBRTOWC_RETVAL_BUG /* Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives. */ #undef NEED_PRINTF_DIRECTIVE_A /* Define if the vasnprintf implementation needs special code for the 'F' directive. */ #undef NEED_PRINTF_DIRECTIVE_F /* Define if the vasnprintf implementation needs special code for the 'ls' directive. */ #undef NEED_PRINTF_DIRECTIVE_LS /* Define if the vasnprintf implementation needs special code for 'double' arguments. */ #undef NEED_PRINTF_DOUBLE /* Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions. */ #undef NEED_PRINTF_ENOMEM /* Define if the vasnprintf implementation needs special code for the ' flag. */ #undef NEED_PRINTF_FLAG_GROUPING /* Define if the vasnprintf implementation needs special code for the '-' flag. */ #undef NEED_PRINTF_FLAG_LEFTADJUST /* Define if the vasnprintf implementation needs special code for the 0 flag. */ #undef NEED_PRINTF_FLAG_ZERO /* Define if the vasnprintf implementation needs special code for infinite 'double' arguments. */ #undef NEED_PRINTF_INFINITE_DOUBLE /* Define if the vasnprintf implementation needs special code for infinite 'long double' arguments. */ #undef NEED_PRINTF_INFINITE_LONG_DOUBLE /* Define if the vasnprintf implementation needs special code for 'long double' arguments. */ #undef NEED_PRINTF_LONG_DOUBLE /* Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds. */ #undef NEED_PRINTF_UNBOUNDED_PRECISION /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Define to 1 if open() fails to recognize a trailing slash. */ #undef OPEN_TRAILING_SLASH_BUG /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* the number of pending output bytes on stream 'fp' */ #undef PENDING_OUTPUT_N_BYTES /* Define if <inttypes.h> exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define to the type that is the result of default argument promotions of type mode_t. */ #undef PROMOTED_MODE_T /* Define if the pthread_in_use() detection is hard. */ #undef PTHREAD_IN_USE_DETECTION_HARD /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define to 1 if gnulib's fchdir() replacement is used. */ #undef REPLACE_FCHDIR /* Define if fprintf is overridden by a POSIX compliant gnulib implementation. */ #undef REPLACE_FPRINTF_POSIX /* Define to 1 if stat needs help when passed a directory name with a trailing slash */ #undef REPLACE_FUNC_STAT_DIR /* Define to 1 if stat needs help when passed a file name with a trailing slash */ #undef REPLACE_FUNC_STAT_FILE /* 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 if printf is overridden by a POSIX compliant gnulib implementation. */ #undef REPLACE_PRINTF_POSIX /* Define to 1 if strerror(0) does not return a message implying success. */ #undef REPLACE_STRERROR_0 /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF /* Define if vfprintf is overridden by a POSIX compliant gnulib implementation. */ #undef REPLACE_VFPRINTF_POSIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* 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 */ #undef STACK_DIRECTION /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* Define to the prefix of C symbols at the assembler and linker level, either an underscore or empty. */ #undef USER_LABEL_PREFIX /* Define if the POSIX multithreading library can be used. */ #undef USE_POSIX_THREADS /* Define if references to the POSIX multithreading library should be made weak. */ #undef USE_POSIX_THREADS_WEAK /* Define if the GNU Pth multithreading library can be used. */ #undef USE_PTH_THREADS /* Define if references to the GNU Pth multithreading library should be made weak. */ #undef USE_PTH_THREADS_WEAK /* Define if the old Solaris multithreading library can be used. */ #undef USE_SOLARIS_THREADS /* Define if references to the old Solaris multithreading library should be made weak. */ #undef USE_SOLARIS_THREADS_WEAK /* Define if the native Windows multithreading API can be used. */ #undef USE_WINDOWS_THREADS /* Version number of package */ #undef VERSION /* Define to 1 if unsetenv returns void instead of int. */ #undef VOID_UNSETENV /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type '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 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* 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. */ #undef _POSIX_SOURCE /* Define if you want regoff_t to be at least as wide POSIX requires. */ #undef _REGEX_LARGE_OFFSETS /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on MacOS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a replacement function name for fnmatch(). */ #undef fnmatch /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */ #undef intmax_t /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to 1 if the compiler is checking for lint. */ #undef lint /* Define to a type if <wchar.h> does not define. */ #undef mbstate_t /* Define to `int' if <sys/types.h> does not define. */ #undef mode_t /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t /* Define to `long int' if <sys/types.h> does not define. */ #undef off_t /* Define to `int' if <sys/types.h> 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 /* Define to rpl_re_comp if the replacement should be used. */ #undef re_comp /* Define to rpl_re_compile_fastmap if the replacement should be used. */ #undef re_compile_fastmap /* Define to rpl_re_compile_pattern if the replacement should be used. */ #undef re_compile_pattern /* Define to rpl_re_exec if the replacement should be used. */ #undef re_exec /* Define to rpl_re_match if the replacement should be used. */ #undef re_match /* Define to rpl_re_match_2 if the replacement should be used. */ #undef re_match_2 /* Define to rpl_re_search if the replacement should be used. */ #undef re_search /* Define to rpl_re_search_2 if the replacement should be used. */ #undef re_search_2 /* Define to rpl_re_set_registers if the replacement should be used. */ #undef re_set_registers /* Define to rpl_re_set_syntax if the replacement should be used. */ #undef re_set_syntax /* Define to rpl_re_syntax_options if the replacement should be used. */ #undef re_syntax_options /* Define to rpl_regcomp if the replacement should be used. */ #undef regcomp /* Define to rpl_regerror if the replacement should be used. */ #undef regerror /* Define to rpl_regexec if the replacement should be used. */ #undef regexec /* Define to rpl_regfree if the replacement should be used. */ #undef regfree /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t /* Define as a signed type of the same size as size_t. */ #undef ssize_t /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The __const__ attribute was added in gcc 2.95. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-parse.h���������������������������������������������������������0000664�0000000�0000000�00000012274�12166360012�014737� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Parse printf format string. Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ #if HAVE_FEATURES_H # include <features.h> /* for __GLIBC__, __UCLIBC__ */ #endif #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 #if __GLIBC__ >= 2 && !defined __UCLIBC__ # define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ #endif /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ /* Number of directly allocated directives (no malloc() needed). */ #define N_DIRECT_ALLOC_DIRECTIVES 7 /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } char_directives; #if ENABLE_UNISTDIO /* A parsed directive. */ typedef struct { const uint8_t* dir_start; const uint8_t* dir_end; int flags; const uint8_t* width_start; const uint8_t* width_end; size_t width_arg_index; const uint8_t* precision_start; const uint8_t* precision_end; size_t precision_arg_index; uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u8_directive; /* A parsed format string. */ typedef struct { size_t count; u8_directive *dir; size_t max_width_length; size_t max_precision_length; u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u8_directives; /* A parsed directive. */ typedef struct { const uint16_t* dir_start; const uint16_t* dir_end; int flags; const uint16_t* width_start; const uint16_t* width_end; size_t width_arg_index; const uint16_t* precision_start; const uint16_t* precision_end; size_t precision_arg_index; uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u16_directive; /* A parsed format string. */ typedef struct { size_t count; u16_directive *dir; size_t max_width_length; size_t max_precision_length; u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u16_directives; /* A parsed directive. */ typedef struct { const uint32_t* dir_start; const uint32_t* dir_end; int flags; const uint32_t* width_start; const uint32_t* width_end; size_t width_arg_index; const uint32_t* precision_start; const uint32_t* precision_end; size_t precision_arg_index; uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u32_directive; /* A parsed format string. */ typedef struct { size_t count; u32_directive *dir; size_t max_width_length; size_t max_precision_length; u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u32_directives; #endif /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #if ENABLE_UNISTDIO extern int ulc_printf_parse (const char *format, char_directives *d, arguments *a); extern int u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); extern int u16_printf_parse (const uint16_t *format, u16_directives *d, arguments *a); extern int u32_printf_parse (const uint32_t *format, u32_directives *d, arguments *a); #else # ifdef STATIC STATIC # else extern # endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif #endif /* _PRINTF_PARSE_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/rewinddir.c������������������������������������������������������������0000664�0000000�0000000�00000002666�12166360012�014313� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Restart reading the entries of a directory from the beginning. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <dirent.h> #include <errno.h> #include "dirent-private.h" void rewinddir (DIR *dirp) { /* Like in closedir(). */ if (dirp->current != INVALID_HANDLE_VALUE) FindClose (dirp->current); /* Like in opendir(). */ dirp->status = -1; dirp->current = FindFirstFile (dirp->dir_name_mask, &dirp->entry); if (dirp->current == INVALID_HANDLE_VALUE) { switch (GetLastError ()) { case ERROR_FILE_NOT_FOUND: dirp->status = -2; break; default: /* Save the error code for the next readdir() call. */ dirp->status = ENOENT; break; } } } ��������������������������������������������������������������������������id-utils-4.6+git20120811/lib/msvc-inval.c�����������������������������������������������������������0000664�0000000�0000000�00000007614�12166360012�014401� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Invalid parameter handler for MSVC runtime libraries. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include "msvc-inval.h" #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) /* Get _invalid_parameter_handler type and _set_invalid_parameter_handler declaration. */ # include <stdlib.h> # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING static void cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { } # else /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> # if defined _MSC_VER static void cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); } # else /* An index to thread-local storage. */ static DWORD tls_index; static int tls_initialized /* = 0 */; /* Used as a fallback only. */ static struct gl_msvc_inval_per_thread not_per_thread; struct gl_msvc_inval_per_thread * gl_msvc_inval_current (void) { if (!tls_initialized) { tls_index = TlsAlloc (); tls_initialized = 1; } if (tls_index == TLS_OUT_OF_INDEXES) /* TlsAlloc had failed. */ return ¬_per_thread; else { struct gl_msvc_inval_per_thread *pointer = (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index); if (pointer == NULL) { /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */ pointer = (struct gl_msvc_inval_per_thread *) malloc (sizeof (struct gl_msvc_inval_per_thread)); if (pointer == NULL) /* Could not allocate memory. Use the global storage. */ pointer = ¬_per_thread; TlsSetValue (tls_index, pointer); } return pointer; } } static void cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current (); if (current->restart_valid) longjmp (current->restart, 1); else /* An invalid parameter notification from outside the gnulib code. Give the caller a chance to intervene. */ RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); } # endif # endif static int gl_msvc_inval_initialized /* = 0 */; void gl_msvc_inval_ensure_handler (void) { if (gl_msvc_inval_initialized == 0) { _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler); gl_msvc_inval_initialized = 1; } } #endif ��������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/vfprintf.c�������������������������������������������������������������0000664�0000000�0000000�00000003302�12166360012�014146� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to a stream. Copyright (C) 2004, 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 <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif /* Specification. */ #include <stdio.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdlib.h> #include "fseterr.h" #include "vasnprintf.h" /* Print formatted output to the stream FP. Return string length of formatted string. On error, return a negative value. */ int vfprintf (FILE *fp, const char *format, va_list args) { char buf[2000]; char *output; size_t len; size_t lenbuf = sizeof (buf); output = vasnprintf (buf, &lenbuf, format, args); len = lenbuf; if (!output) { fseterr (fp); return -1; } if (fwrite (output, 1, len, fp) < len) { if (output != buf) { int saved_errno = errno; free (output); errno = saved_errno; } return -1; } if (output != buf) free (output); if (len > INT_MAX) { errno = EOVERFLOW; fseterr (fp); return -1; } return len; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/openat-die.c�����������������������������������������������������������0000664�0000000�0000000�00000003461�12166360012�014343� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Report a save- or restore-cwd failure in our openat replacement and then exit. Copyright (C) 2005-2006, 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "openat.h" #include <stdlib.h> #ifndef GNULIB_LIBPOSIX # include "error.h" #endif #include "exitfail.h" #include "gettext.h" #define _(msgid) gettext (msgid) void openat_save_fail (int errnum) { #ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("unable to record current working directory")); #endif /* _Noreturn cannot be applied to error, since it returns when its first argument is 0. To help compilers understand that this function does not return, call abort. Also, the abort is a safety feature if exit_failure is 0 (which shouldn't happen). */ abort (); } /* Exit with an error about failure to restore the working directory during an openat emulation. The caller must ensure that fd 2 is not a just-opened fd, even when openat_safer is not in use. */ void openat_restore_fail (int errnum) { #ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("failed to return to initial working directory")); #endif /* As above. */ abort (); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/getopt_int.h�����������������������������������������������������������0000664�0000000�0000000�00000011742�12166360012�014500� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Internal declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 #include <getopt.h> extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using '+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using '-' as the first character of the list of option characters selects this mode of operation. The special argument '--' forces an end of option-scanning regardless of the value of 'ordering'. In the case of RETURN_IN_ORDER, only '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ enum __ord { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* See __ord above. */ enum __ord __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. 'first_nonopt' is the index in ARGV of the first of them; 'last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; #endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ ������������������������������id-utils-4.6+git20120811/lib/signbitf.c�������������������������������������������������������������0000664�0000000�0000000�00000004077�12166360012�014127� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <math.h> #include <string.h> #include "isnanf-nolibm.h" #include "float+.h" #ifdef gl_signbitf_OPTIMIZED_MACRO # undef gl_signbitf #endif int gl_signbitf (float arg) { #if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { float value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNF_IN_LIBC return copysignf (1.0f, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanf (arg)) return 0; if (arg < 0.0f) return 1; else if (arg == 0.0f) { /* Distinguish 0.0f and -0.0f. */ static float plus_zero = 0.0f; float arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_FLT) != 0); } else return 0; #endif } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/sprintf.c��������������������������������������������������������������0000664�0000000�0000000�00000004144�12166360012�014002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to strings. Copyright (C) 2004, 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 <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif /* Specification. */ #include <stdio.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdint.h> #include <stdlib.h> #include "vasnprintf.h" #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* Print formatted output to string STR. Return string length of formatted string. On error, return a negative value. */ int sprintf (char *str, const char *format, ...) { char *output; size_t len; size_t lenbuf; va_list args; /* vasnprintf fails with EOVERFLOW when the buffer size argument is larger than INT_MAX (if that fits into a 'size_t' at all). Also note that glibc's iconv fails with E2BIG when we pass a length that is so large that str + lenbuf wraps around, i.e. (uintptr_t) (str + lenbuf) < (uintptr_t) str. Therefore set lenbuf = min (SIZE_MAX, INT_MAX, - (uintptr_t) str - 1). */ lenbuf = (SIZE_MAX < INT_MAX ? SIZE_MAX : INT_MAX); if (lenbuf > ~ (uintptr_t) str) lenbuf = ~ (uintptr_t) str; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { /* len is near SIZE_MAX. */ free (output); errno = EOVERFLOW; return -1; } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/imaxtostr.c������������������������������������������������������������0000664�0000000�0000000�00000000112�12166360012�014336� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define anytostr imaxtostr #define inttype intmax_t #include "anytostr.c" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xmalloc.c��������������������������������������������������������������0000664�0000000�0000000�00000006523�12166360012�013757� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xmalloc.c -- malloc with out of memory checking Copyright (C) 1990-2000, 2002-2006, 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #if ! HAVE_INLINE # define static_inline #endif #include "xalloc.h" #undef static_inline #include <stdlib.h> #include <string.h> /* 1 if calloc is known to be compatible with GNU calloc. This matters if we are not also using the calloc module, which defines HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */ #if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__) enum { HAVE_GNU_CALLOC = 1 }; #else enum { HAVE_GNU_CALLOC = 0 }; #endif /* Allocate N bytes of memory dynamically, with error checking. */ void * xmalloc (size_t n) { void *p = malloc (n); if (!p && n != 0) xalloc_die (); return p; } /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * xrealloc (void *p, size_t n) { if (!n && p) { /* The GNU and C99 realloc behaviors disagree here. Act like GNU, even if the underlying realloc is C99. */ free (p); return NULL; } p = realloc (p, n); if (!p && n) xalloc_die (); return p; } /* If P is null, allocate a block of at least *PN bytes; otherwise, reallocate P so that it contains more than *PN bytes. *PN must be nonzero unless P is null. Set *PN to the new block's size, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. */ void * x2realloc (void *p, size_t *pn) { return x2nrealloc (p, pn, 1); } /* Allocate S bytes of zeroed memory dynamically, with error checking. There's no need for xnzalloc (N, S), since it would be equivalent to xcalloc (N, S). */ void * xzalloc (size_t s) { return memset (xmalloc (s), 0, s); } /* Allocate zeroed memory for N elements of S bytes, with error checking. S must be nonzero. */ void * xcalloc (size_t n, size_t s) { void *p; /* Test for overflow, since some calloc implementations don't have proper overflow checks. But omit overflow and size-zero tests if HAVE_GNU_CALLOC, since GNU calloc catches overflow and never returns NULL if successful. */ if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) xalloc_die (); return p; } /* Clone an object P of size S, with error checking. There's no need for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any need for an arithmetic overflow check. */ void * xmemdup (void const *p, size_t s) { return memcpy (xmalloc (s), p, s); } /* Clone STRING. */ char * xstrdup (char const *string) { return xmemdup (string, strlen (string) + 1); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-ctype.c��������������������������������������������������������������0000664�0000000�0000000�00000025447�12166360012�013672� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Character handling in C locale. Copyright 2000-2003, 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #define NO_C_CTYPE_MACROS #include "c-ctype.h" /* The function isascii is not locale dependent. Its use in EBCDIC is questionable. */ bool c_isascii (int c) { return (c >= 0x00 && c <= 0x7f); } bool c_isalnum (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isalpha (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); #else return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isblank (int c) { return (c == ' ' || c == '\t'); } bool c_iscntrl (int c) { #if C_CTYPE_ASCII return ((c & ~0x1f) == 0 || c == 0x7f); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 0; default: return 1; } #endif } bool c_isdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS return (c >= '0' && c <= '9'); #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return 1; default: return 0; } #endif } bool c_islower (int c) { #if C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z'); #else switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isgraph (int c) { #if C_CTYPE_ASCII return (c >= '!' && c <= '~'); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isprint (int c) { #if C_CTYPE_ASCII return (c >= ' ' && c <= '~'); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_ispunct (int c) { #if C_CTYPE_ASCII return ((c >= '!' && c <= '~') && !((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isspace (int c) { return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'); } bool c_isupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE return (c >= 'A' && c <= 'Z'); #else switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': return 1; default: return 0; } #endif } bool c_isxdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')); #endif #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': return 1; default: return 0; } #endif } int c_tolower (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); #else switch (c) { case 'A': return 'a'; case 'B': return 'b'; case 'C': return 'c'; case 'D': return 'd'; case 'E': return 'e'; case 'F': return 'f'; case 'G': return 'g'; case 'H': return 'h'; case 'I': return 'i'; case 'J': return 'j'; case 'K': return 'k'; case 'L': return 'l'; case 'M': return 'm'; case 'N': return 'n'; case 'O': return 'o'; case 'P': return 'p'; case 'Q': return 'q'; case 'R': return 'r'; case 'S': return 's'; case 'T': return 't'; case 'U': return 'u'; case 'V': return 'v'; case 'W': return 'w'; case 'X': return 'x'; case 'Y': return 'y'; case 'Z': return 'z'; default: return c; } #endif } int c_toupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); #else switch (c) { case 'a': return 'A'; case 'b': return 'B'; case 'c': return 'C'; case 'd': return 'D'; case 'e': return 'E'; case 'f': return 'F'; case 'g': return 'G'; case 'h': return 'H'; case 'i': return 'I'; case 'j': return 'J'; case 'k': return 'K'; case 'l': return 'L'; case 'm': return 'M'; case 'n': return 'N'; case 'o': return 'O'; case 'p': return 'P'; case 'q': return 'Q'; case 'r': return 'R'; case 's': return 'S'; case 't': return 'T'; case 'u': return 'U'; case 'v': return 'V'; case 'w': return 'W'; case 'x': return 'X'; case 'y': return 'Y'; case 'z': return 'Z'; default: return c; } #endif } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/intprops.h�������������������������������������������������������������0000664�0000000�0000000�00000035006�12166360012�014201� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* intprops.h -- properties of integer types Copyright (C) 2001-2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #ifndef _GL_INTPROPS_H #define _GL_INTPROPS_H #include <limits.h> /* Return an integer value, converted to the same type as the integer expression E after integer type promotion. V is the unconverted value. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */ #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ #define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) #define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) #define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the signed integer expression E uses two's complement. */ #define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) /* True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* Return 1 if the integer expression E, after integer promotion, has a signed type. */ #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) /* Minimum and maximum values for integer types and expressions. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ /* The maximum and minimum values for the integer type T. */ #define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) /* The maximum and minimum values for the type of the expression E, after integer promotion. E should not have side effects. */ #define _GL_INT_MINIMUM(e) \ (_GL_INT_SIGNED (e) \ ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_CONVERT (e, 0)) #define _GL_INT_MAXIMUM(e) \ (_GL_INT_SIGNED (e) \ ? _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_NEGATE_CONVERT (e, 1)) #define _GL_SIGNED_INT_MAXIMUM(e) \ (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) /* Return 1 if the __typeof__ keyword works. This could be done by 'configure', but for now it's easier to do it by hand. */ #if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C # define _GL_HAVE___TYPEOF__ 1 #else # define _GL_HAVE___TYPEOF__ 0 #endif /* Return 1 if the integer type or expression T might be signed. Return 0 if it is definitely unsigned. This macro does not evaluate its argument, and expands to an integer constant expression. */ #if _GL_HAVE___TYPEOF__ # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) #else # define _GL_SIGNED_TYPE_OR_EXPR(t) 1 #endif /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The smallest value of B where this bound is not tight is 2621. */ #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed, and then add 1 more for a minus sign if needed. Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is signed, this macro may overestimate the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. */ #define INT_STRLEN_BOUND(t) \ (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + _GL_SIGNED_TYPE_OR_EXPR (t)) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) /* Range overflow checks. The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. They do not rely on undefined or implementation-defined behavior. Their implementations are simple and straightforward, but they are a bit harder to use than the INT_<op>_OVERFLOW macros described below. Example usage: long int i = ...; long int j = ...; if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) printf ("multiply would overflow"); else printf ("product is %ld", i * j); Restrictions on *_RANGE_OVERFLOW macros: These macros do not check for all possible numerical problems or undefined or unspecified behavior: they do not check for division by zero, for bad shift counts, or for shifting negative numbers. These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. The arithmetic arguments (including the MIN and MAX arguments) must be of the same integer type after the usual arithmetic conversions, and the type must have minimum value MIN and maximum MAX. Unsigned types should use a zero MIN of the proper type. These macros are tuned for constant MIN and MAX. For commutative operations such as A + B, they are also tuned for constant B. */ /* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? (a) < (min) - (b) \ : (max) - (b) < (a)) /* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? (max) + (b) < (a) \ : (a) < (min) + (b)) /* Return 1 if - A would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ ((min) < 0 \ ? (a) < - (max) \ : 0 < (a)) /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Avoid && and || as they tickle bugs in Sun C 5.11 2010/08/13 and other compilers; see <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? ((a) < 0 \ ? (a) < (max) / (b) \ : (b) == -1 \ ? 0 \ : (min) / (b) < (a)) \ : (b) == 0 \ ? 0 \ : ((a) < 0 \ ? (a) < (min) / (b) \ : (max) / (b) < (a))) /* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Do not check for division by zero. */ #define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ ((min) < 0 && (b) == -1 && (a) < - (max)) /* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Do not check for division by zero. Mathematically, % should never overflow, but on x86-like hosts INT_MIN % -1 traps, and the C standard permits this, so treat this as an overflow too. */ #define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) /* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Here, MIN and MAX are for A only, and B need not be of the same type as the other arguments. The C standard says that behavior is undefined for shifts unless 0 <= B < wordwidth, and that when A is negative then A << B has undefined behavior and A >> B has implementation-defined behavior, but do not check these other restrictions. */ #define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ ((a) < 0 \ ? (a) < (min) >> (b) \ : (max) >> (b) < (a)) /* The _GL*_OVERFLOW macros have the same restrictions as the *_RANGE_OVERFLOW macros, except that they do not assume that operands (e.g., A and B) have the same type as MIN and MAX. Instead, they assume that the result (e.g., A + B) has that type. */ #define _GL_ADD_OVERFLOW(a, b, min, max) \ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ : (a) < 0 ? (b) <= (a) + (b) \ : (b) < 0 ? (a) <= (a) + (b) \ : (a) + (b) < (b)) #define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ : (a) < 0 ? 1 \ : (b) < 0 ? (a) - (b) <= (a) \ : (a) < (b)) #define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ : (a) < 0 ? (b) <= (a) + (b) - 1 \ : (b) < 0 && (a) + (b) <= (a)) #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) /* Return a nonzero value if A is a mathematical multiple of B, where A is unsigned, B is negative, and MAX is the maximum value of A's type. A's type must be the same as (A % B)'s type. Normally (A % -B == 0) suffices, but things get tricky if -B would overflow. */ #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ ? (a) \ : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ : (a) % - (b)) \ == 0) /* Integer overflow checks. The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. They work correctly on all known practical hosts, and do not rely on undefined behavior due to signed arithmetic overflow. Example usage: long int i = ...; long int j = ...; if (INT_MULTIPLY_OVERFLOW (i, j)) printf ("multiply would overflow"); else printf ("product is %ld", i * j); These macros do not check for all possible numerical problems or undefined or unspecified behavior: they do not check for division by zero, for bad shift counts, or for shifting negative numbers. These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. These macros are tuned for their last argument being a constant. Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, A % B, and A << B would overflow, respectively. */ #define INT_ADD_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) #define INT_SUBTRACT_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) #define INT_NEGATE_OVERFLOW(a) \ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) #define INT_MULTIPLY_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) #define INT_DIVIDE_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) #define INT_REMAINDER_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) #define INT_LEFT_SHIFT_OVERFLOW(a, b) \ INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) /* Return 1 if the expression A <op> B would overflow, where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, assuming MIN and MAX are the minimum and maximum for the result type. Arguments should be free of side effects. */ #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ op_result_overflow (a, b, \ _GL_INT_MINIMUM (0 * (b) + (a)), \ _GL_INT_MAXIMUM (0 * (b) + (a))) #endif /* _GL_INTPROPS_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/unistd-safer.h���������������������������������������������������������0000664�0000000�0000000�00000002034�12166360012�014722� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Invoke unistd-like functions, but avoid some glitches. Copyright (C) 2001, 2003, 2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert and Eric Blake. */ int dup_safer (int); int fd_safer (int); int pipe_safer (int[2]); #if GNULIB_FD_SAFER_FLAG int dup_safer_flag (int, int); int fd_safer_flag (int, int); #endif #if GNULIB_PIPE2_SAFER int pipe2_safer (int[2], int); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fd-hook.h��������������������������������������������������������������0000664�0000000�0000000�00000011351�12166360012�013647� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hook for making making file descriptor functions close(), ioctl() extensible. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #ifndef FD_HOOK_H #define FD_HOOK_H #ifdef __cplusplus extern "C" { #endif /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* Type of function that closes FD. */ typedef int (*gl_close_fn) (int fd); /* Type of function that applies a control request to FD. */ typedef int (*gl_ioctl_fn) (int fd, int request, void *arg); /* An element of the list of file descriptor hooks. In CLOS (Common Lisp Object System) speak, it consists of an "around" method for the close() function and an "around" method for the ioctl() function. The fields of this structure are considered private. */ struct fd_hook { /* Doubly linked list. */ struct fd_hook *private_next; struct fd_hook *private_prev; /* Function that treats the types of FD that it knows about and calls execute_close_hooks (REMAINING_LIST, PRIMARY, FD) as a fallback. */ int (*private_close_fn) (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Function that treats the types of FD that it knows about and calls execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) as a fallback. */ int (*private_ioctl_fn) (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); }; /* This type of function closes FD, applying special knowledge for the FD types it knows about, and calls execute_close_hooks (REMAINING_LIST, PRIMARY, FD) for the other FD types. In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, and PRIMARY is the "primary" method for close(). */ typedef int (*close_hook_fn) (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Execute the close hooks in REMAINING_LIST, with PRIMARY as "primary" method. Return 0 or -1, like close() would do. */ extern int execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Execute all close hooks, with PRIMARY as "primary" method. Return 0 or -1, like close() would do. */ extern int execute_all_close_hooks (gl_close_fn primary, int fd); /* This type of function applies a control request to FD, applying special knowledge for the FD types it knows about, and calls execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) for the other FD types. In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, and PRIMARY is the "primary" method for ioctl(). */ typedef int (*ioctl_hook_fn) (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); /* Execute the ioctl hooks in REMAINING_LIST, with PRIMARY as "primary" method. Return 0 or -1, like ioctl() would do. */ extern int execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); /* Execute all ioctl hooks, with PRIMARY as "primary" method. Return 0 or -1, like ioctl() would do. */ extern int execute_all_ioctl_hooks (gl_ioctl_fn primary, int fd, int request, void *arg); /* Add a function pair to the list of file descriptor hooks. CLOSE_HOOK and IOCTL_HOOK may be NULL, indicating no change. The LINK variable points to a piece of memory which is guaranteed to be accessible until the corresponding call to unregister_fd_hook. */ extern void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link); /* Removes a hook from the list of file descriptor hooks. */ extern void unregister_fd_hook (struct fd_hook *link); #endif #ifdef __cplusplus } #endif #endif /* FD_HOOK_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stddef.in.h������������������������������������������������������������0000664�0000000�0000000�00000005343�12166360012�014202� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 <stddef.h> for platforms that have issues. * <http://www.opengroup.org/susv3xbd/stddef.h.html> */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of <stddef.h> that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by <stddef.h>. Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _@GUARD_PREFIX@_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _@GUARD_PREFIX@_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _@GUARD_PREFIX@_STDDEF_H # define _@GUARD_PREFIX@_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */ #endif /* __need_XXX */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/filenamecat-lgpl.c�����������������������������������������������������0000664�0000000�0000000�00000005442�12166360012�015523� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Concatenate two arbitrary file names. Copyright (C) 1996-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> /* Specification. */ #include "filenamecat.h" #include <stdlib.h> #include <string.h> #include "dirname.h" #if ! HAVE_MEMPCPY && ! defined mempcpy # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) #endif /* Return the longest suffix of F that is a relative file name. If it has no such suffix, return the empty string. */ static char const * _GL_ATTRIBUTE_PURE longest_relative_suffix (char const *f) { for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++) continue; return f; } /* Concatenate two file name components, DIR and ABASE, in newly-allocated storage and return the result. The resulting file name F is such that the commands "ls F" and "(cd DIR; ls BASE)" refer to the same file, where BASE is ABASE with any file system prefixes and leading separators removed. Arrange for a directory separator if necessary between DIR and BASE in the result, removing any redundant separators. In any case, if BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of ABASE in the returned concatenation. However, if ABASE begins with more than one slash, set *BASE_IN_RESULT to point to the sole corresponding slash that is copied into the result buffer. Return NULL if malloc fails. */ char * mfile_name_concat (char const *dir, char const *abase, char **base_in_result) { char const *dirbase = last_component (dir); size_t dirbaselen = base_len (dirbase); size_t dirlen = dirbase - dir + dirbaselen; size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1])); char const *base = longest_relative_suffix (abase); size_t baselen = strlen (base); char *p_concat = malloc (dirlen + needs_separator + baselen + 1); char *p; if (p_concat == NULL) return NULL; p = mempcpy (p_concat, dir, dirlen); *p = DIRECTORY_SEPARATOR; p += needs_separator; if (base_in_result) *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase); p = mempcpy (p, base, baselen); *p = '\0'; return p_concat; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/hash.c�����������������������������������������������������������������0000664�0000000�0000000�00000115175�12166360012�013247� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* hash - hashing table processing. Copyright (C) 1998-2004, 2006-2007, 2009-2012 Free Software Foundation, Inc. Written by Jim Meyering, 1992. 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 <http://www.gnu.org/licenses/>. */ /* A generic hash table package. */ /* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead of malloc. If you change USE_OBSTACK, you have to recompile! */ #include <config.h> #include "hash.h" #include "bitrotate.h" #include "xalloc-oversized.h" #include <stdint.h> #include <stdio.h> #include <stdlib.h> #if USE_OBSTACK # include "obstack.h" # ifndef obstack_chunk_alloc # define obstack_chunk_alloc malloc # endif # ifndef obstack_chunk_free # define obstack_chunk_free free # endif #endif struct hash_entry { void *data; struct hash_entry *next; }; struct hash_table { /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1, for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets are not empty, there are N_ENTRIES active entries in the table. */ struct hash_entry *bucket; struct hash_entry const *bucket_limit; size_t n_buckets; size_t n_buckets_used; size_t n_entries; /* Tuning arguments, kept in a physically separate structure. */ const Hash_tuning *tuning; /* Three functions are given to 'hash_initialize', see the documentation block for this function. In a word, HASHER randomizes a user entry into a number up from 0 up to some maximum minus 1; COMPARATOR returns true if two user entries compare equally; and DATA_FREER is the cleanup function for a user entry. */ Hash_hasher hasher; Hash_comparator comparator; Hash_data_freer data_freer; /* A linked list of freed struct hash_entry structs. */ struct hash_entry *free_entry_list; #if USE_OBSTACK /* Whenever obstacks are used, it is possible to allocate all overflowed entries into a single stack, so they all can be freed in a single operation. It is not clear if the speedup is worth the trouble. */ struct obstack entry_stack; #endif }; /* A hash table contains many internal entries, each holding a pointer to some user-provided data (also called a user entry). An entry indistinctly refers to both the internal entry and its associated user entry. A user entry contents may be hashed by a randomization function (the hashing function, or just "hasher" for short) into a number (or "slot") between 0 and the current table size. At each slot position in the hash table, starts a linked chain of entries for which the user data all hash to this slot. A bucket is the collection of all entries hashing to the same slot. A good "hasher" function will distribute entries rather evenly in buckets. In the ideal case, the length of each bucket is roughly the number of entries divided by the table size. Finding the slot for a data is usually done in constant time by the "hasher", and the later finding of a precise entry is linear in time with the size of the bucket. Consequently, a larger hash table size (that is, a larger number of buckets) is prone to yielding shorter chains, *given* the "hasher" function behaves properly. Long buckets slow down the lookup algorithm. One might use big hash table sizes in hope to reduce the average length of buckets, but this might become inordinate, as unused slots in the hash table take some space. The best bet is to make sure you are using a good "hasher" function (beware that those are not that easy to write! :-), and to use a table size larger than the actual number of entries. */ /* If an insertion makes the ratio of nonempty buckets to table size larger than the growth threshold (a number between 0.0 and 1.0), then increase the table size by multiplying by the growth factor (a number greater than 1.0). The growth threshold defaults to 0.8, and the growth factor defaults to 1.414, meaning that the table will have doubled its size every second time 80% of the buckets get used. */ #define DEFAULT_GROWTH_THRESHOLD 0.8f #define DEFAULT_GROWTH_FACTOR 1.414f /* If a deletion empties a bucket and causes the ratio of used buckets to table size to become smaller than the shrink threshold (a number between 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a number greater than the shrink threshold but smaller than 1.0). The shrink threshold and factor default to 0.0 and 1.0, meaning that the table never shrinks. */ #define DEFAULT_SHRINK_THRESHOLD 0.0f #define DEFAULT_SHRINK_FACTOR 1.0f /* Use this to initialize or reset a TUNING structure to some sensible values. */ static const Hash_tuning default_tuning = { DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR, DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR, false }; /* Information and lookup. */ /* The following few functions provide information about the overall hash table organization: the number of entries, number of buckets and maximum length of buckets. */ /* Return the number of buckets in the hash table. The table size, the total number of buckets (used plus unused), or the maximum number of slots, are the same quantity. */ size_t hash_get_n_buckets (const Hash_table *table) { return table->n_buckets; } /* Return the number of slots in use (non-empty buckets). */ size_t hash_get_n_buckets_used (const Hash_table *table) { return table->n_buckets_used; } /* Return the number of active entries. */ size_t hash_get_n_entries (const Hash_table *table) { return table->n_entries; } /* Return the length of the longest chain (bucket). */ size_t hash_get_max_bucket_length (const Hash_table *table) { struct hash_entry const *bucket; size_t max_bucket_length = 0; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry const *cursor = bucket; size_t bucket_length = 1; while (cursor = cursor->next, cursor) bucket_length++; if (bucket_length > max_bucket_length) max_bucket_length = bucket_length; } } return max_bucket_length; } /* Do a mild validation of a hash table, by traversing it and checking two statistics. */ bool hash_table_ok (const Hash_table *table) { struct hash_entry const *bucket; size_t n_buckets_used = 0; size_t n_entries = 0; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry const *cursor = bucket; /* Count bucket head. */ n_buckets_used++; n_entries++; /* Count bucket overflow. */ while (cursor = cursor->next, cursor) n_entries++; } } if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries) return true; return false; } void hash_print_statistics (const Hash_table *table, FILE *stream) { size_t n_entries = hash_get_n_entries (table); size_t n_buckets = hash_get_n_buckets (table); size_t n_buckets_used = hash_get_n_buckets_used (table); size_t max_bucket_length = hash_get_max_bucket_length (table); fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries); fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets); fprintf (stream, "# buckets used: %lu (%.2f%%)\n", (unsigned long int) n_buckets_used, (100.0 * n_buckets_used) / n_buckets); fprintf (stream, "max bucket length: %lu\n", (unsigned long int) max_bucket_length); } /* Hash KEY and return a pointer to the selected bucket. If TABLE->hasher misbehaves, abort. */ static struct hash_entry * safe_hasher (const Hash_table *table, const void *key) { size_t n = table->hasher (key, table->n_buckets); if (! (n < table->n_buckets)) abort (); return table->bucket + n; } /* If ENTRY matches an entry already in the hash table, return the entry from the table. Otherwise, return NULL. */ void * hash_lookup (const Hash_table *table, const void *entry) { struct hash_entry const *bucket = safe_hasher (table, entry); struct hash_entry const *cursor; if (bucket->data == NULL) return NULL; for (cursor = bucket; cursor; cursor = cursor->next) if (entry == cursor->data || table->comparator (entry, cursor->data)) return cursor->data; return NULL; } /* Walking. */ /* The functions in this page traverse the hash table and process the contained entries. For the traversal to work properly, the hash table should not be resized nor modified while any particular entry is being processed. In particular, entries should not be added, and an entry may be removed only if there is no shrink threshold and the entry being removed has already been passed to hash_get_next. */ /* Return the first data in the table, or NULL if the table is empty. */ void * hash_get_first (const Hash_table *table) { struct hash_entry const *bucket; if (table->n_entries == 0) return NULL; for (bucket = table->bucket; ; bucket++) if (! (bucket < table->bucket_limit)) abort (); else if (bucket->data) return bucket->data; } /* Return the user data for the entry following ENTRY, where ENTRY has been returned by a previous call to either 'hash_get_first' or 'hash_get_next'. Return NULL if there are no more entries. */ void * hash_get_next (const Hash_table *table, const void *entry) { struct hash_entry const *bucket = safe_hasher (table, entry); struct hash_entry const *cursor; /* Find next entry in the same bucket. */ cursor = bucket; do { if (cursor->data == entry && cursor->next) return cursor->next->data; cursor = cursor->next; } while (cursor != NULL); /* Find first entry in any subsequent bucket. */ while (++bucket < table->bucket_limit) if (bucket->data) return bucket->data; /* None found. */ return NULL; } /* Fill BUFFER with pointers to active user entries in the hash table, then return the number of pointers copied. Do not copy more than BUFFER_SIZE pointers. */ size_t hash_get_entries (const Hash_table *table, void **buffer, size_t buffer_size) { size_t counter = 0; struct hash_entry const *bucket; struct hash_entry const *cursor; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) { if (counter >= buffer_size) return counter; buffer[counter++] = cursor->data; } } } return counter; } /* Call a PROCESSOR function for each entry of a hash table, and return the number of entries for which the processor function returned success. A pointer to some PROCESSOR_DATA which will be made available to each call to the processor function. The PROCESSOR accepts two arguments: the first is the user entry being walked into, the second is the value of PROCESSOR_DATA as received. The walking continue for as long as the PROCESSOR function returns nonzero. When it returns zero, the walking is interrupted. */ size_t hash_do_for_each (const Hash_table *table, Hash_processor processor, void *processor_data) { size_t counter = 0; struct hash_entry const *bucket; struct hash_entry const *cursor; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) { if (! processor (cursor->data, processor_data)) return counter; counter++; } } } return counter; } /* Allocation and clean-up. */ /* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1. This is a convenience routine for constructing other hashing functions. */ #if USE_DIFF_HASH /* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm, Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash algorithms tend to be domain-specific, so what's good for [diffutils'] io.c may not be good for your application." */ size_t hash_string (const char *string, size_t n_buckets) { # define HASH_ONE_CHAR(Value, Byte) \ ((Byte) + rotl_sz (Value, 7)) size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = HASH_ONE_CHAR (value, ch); return value % n_buckets; # undef HASH_ONE_CHAR } #else /* not USE_DIFF_HASH */ /* This one comes from 'recode', and performs a bit better than the above as per a few experiments. It is inspired from a hashing routine found in the very old Cyber 'snoop', itself written in typical Greg Mansfield style. (By the way, what happened to this excellent man? Is he still alive?) */ size_t hash_string (const char *string, size_t n_buckets) { size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = (value * 31 + ch) % n_buckets; return value; } #endif /* not USE_DIFF_HASH */ /* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd number at least equal to 11. */ static bool _GL_ATTRIBUTE_CONST is_prime (size_t candidate) { size_t divisor = 3; size_t square = divisor * divisor; while (square < candidate && (candidate % divisor)) { divisor++; square += 4 * divisor; divisor++; } return (candidate % divisor ? true : false); } /* Round a given CANDIDATE number up to the nearest prime, and return that prime. Primes lower than 10 are merely skipped. */ static size_t _GL_ATTRIBUTE_CONST next_prime (size_t candidate) { /* Skip small primes. */ if (candidate < 10) candidate = 10; /* Make it definitely odd. */ candidate |= 1; while (SIZE_MAX != candidate && !is_prime (candidate)) candidate += 2; return candidate; } void hash_reset_tuning (Hash_tuning *tuning) { *tuning = default_tuning; } /* If the user passes a NULL hasher, we hash the raw pointer. */ static size_t raw_hasher (const void *data, size_t n) { /* When hashing unique pointers, it is often the case that they were generated by malloc and thus have the property that the low-order bits are 0. As this tends to give poorer performance with small tables, we rotate the pointer value before performing division, in an attempt to improve hash quality. */ size_t val = rotr_sz ((size_t) data, 3); return val % n; } /* If the user passes a NULL comparator, we use pointer comparison. */ static bool raw_comparator (const void *a, const void *b) { return a == b; } /* For the given hash TABLE, check the user supplied tuning structure for reasonable values, and return true if there is no gross error with it. Otherwise, definitively reset the TUNING field to some acceptable default in the hash table (that is, the user loses the right of further modifying tuning arguments), and return false. */ static bool check_tuning (Hash_table *table) { const Hash_tuning *tuning = table->tuning; float epsilon; if (tuning == &default_tuning) return true; /* Be a bit stricter than mathematics would require, so that rounding errors in size calculations do not cause allocations to fail to grow or shrink as they should. The smallest allocation is 11 (due to next_prime's algorithm), so an epsilon of 0.1 should be good enough. */ epsilon = 0.1f; if (epsilon < tuning->growth_threshold && tuning->growth_threshold < 1 - epsilon && 1 + epsilon < tuning->growth_factor && 0 <= tuning->shrink_threshold && tuning->shrink_threshold + epsilon < tuning->shrink_factor && tuning->shrink_factor <= 1 && tuning->shrink_threshold + epsilon < tuning->growth_threshold) return true; table->tuning = &default_tuning; return false; } /* Compute the size of the bucket array for the given CANDIDATE and TUNING, or return 0 if there is no possible way to allocate that many entries. */ static size_t _GL_ATTRIBUTE_PURE compute_bucket_size (size_t candidate, const Hash_tuning *tuning) { if (!tuning->is_n_buckets) { float new_candidate = candidate / tuning->growth_threshold; if (SIZE_MAX <= new_candidate) return 0; candidate = new_candidate; } candidate = next_prime (candidate); if (xalloc_oversized (candidate, sizeof (struct hash_entry *))) return 0; return candidate; } /* Allocate and return a new hash table, or NULL upon failure. The initial number of buckets is automatically selected so as to _guarantee_ that you may insert at least CANDIDATE different user entries before any growth of the hash table size occurs. So, if have a reasonably tight a-priori upper bound on the number of entries you intend to insert in the hash table, you may save some table memory and insertion time, by specifying it here. If the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE argument has its meaning changed to the wanted number of buckets. TUNING points to a structure of user-supplied values, in case some fine tuning is wanted over the default behavior of the hasher. If TUNING is NULL, the default tuning parameters are used instead. If TUNING is provided but the values requested are out of bounds or might cause rounding errors, return NULL. The user-supplied HASHER function, when not NULL, accepts two arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a slot number for that entry which should be in the range 0..TABLE_SIZE-1. This slot number is then returned. The user-supplied COMPARATOR function, when not NULL, accepts two arguments pointing to user data, it then returns true for a pair of entries that compare equal, or false otherwise. This function is internally called on entries which are already known to hash to the same bucket index, but which are distinct pointers. The user-supplied DATA_FREER function, when not NULL, may be later called with the user data as an argument, just before the entry containing the data gets freed. This happens from within 'hash_free' or 'hash_clear'. You should specify this function only if you want these functions to free all of your 'data' data. This is typically the case when your data is simply an auxiliary struct that you have malloc'd to aggregate several values. */ Hash_table * hash_initialize (size_t candidate, const Hash_tuning *tuning, Hash_hasher hasher, Hash_comparator comparator, Hash_data_freer data_freer) { Hash_table *table; if (hasher == NULL) hasher = raw_hasher; if (comparator == NULL) comparator = raw_comparator; table = malloc (sizeof *table); if (table == NULL) return NULL; if (!tuning) tuning = &default_tuning; table->tuning = tuning; if (!check_tuning (table)) { /* Fail if the tuning options are invalid. This is the only occasion when the user gets some feedback about it. Once the table is created, if the user provides invalid tuning options, we silently revert to using the defaults, and ignore further request to change the tuning options. */ goto fail; } table->n_buckets = compute_bucket_size (candidate, tuning); if (!table->n_buckets) goto fail; table->bucket = calloc (table->n_buckets, sizeof *table->bucket); if (table->bucket == NULL) goto fail; table->bucket_limit = table->bucket + table->n_buckets; table->n_buckets_used = 0; table->n_entries = 0; table->hasher = hasher; table->comparator = comparator; table->data_freer = data_freer; table->free_entry_list = NULL; #if USE_OBSTACK obstack_init (&table->entry_stack); #endif return table; fail: free (table); return NULL; } /* Make all buckets empty, placing any chained entries on the free list. Apply the user-specified function data_freer (if any) to the datas of any affected entries. */ void hash_clear (Hash_table *table) { struct hash_entry *bucket; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry *cursor; struct hash_entry *next; /* Free the bucket overflow. */ for (cursor = bucket->next; cursor; cursor = next) { if (table->data_freer) table->data_freer (cursor->data); cursor->data = NULL; next = cursor->next; /* Relinking is done one entry at a time, as it is to be expected that overflows are either rare or short. */ cursor->next = table->free_entry_list; table->free_entry_list = cursor; } /* Free the bucket head. */ if (table->data_freer) table->data_freer (bucket->data); bucket->data = NULL; bucket->next = NULL; } } table->n_buckets_used = 0; table->n_entries = 0; } /* Reclaim all storage associated with a hash table. If a data_freer function has been supplied by the user when the hash table was created, this function applies it to the data of each entry before freeing that entry. */ void hash_free (Hash_table *table) { struct hash_entry *bucket; struct hash_entry *cursor; struct hash_entry *next; /* Call the user data_freer function. */ if (table->data_freer && table->n_entries) { for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) table->data_freer (cursor->data); } } } #if USE_OBSTACK obstack_free (&table->entry_stack, NULL); #else /* Free all bucket overflowed entries. */ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { for (cursor = bucket->next; cursor; cursor = next) { next = cursor->next; free (cursor); } } /* Also reclaim the internal list of previously freed entries. */ for (cursor = table->free_entry_list; cursor; cursor = next) { next = cursor->next; free (cursor); } #endif /* Free the remainder of the hash table structure. */ free (table->bucket); free (table); } /* Insertion and deletion. */ /* Get a new hash entry for a bucket overflow, possibly by recycling a previously freed one. If this is not possible, allocate a new one. */ static struct hash_entry * allocate_entry (Hash_table *table) { struct hash_entry *new; if (table->free_entry_list) { new = table->free_entry_list; table->free_entry_list = new->next; } else { #if USE_OBSTACK new = obstack_alloc (&table->entry_stack, sizeof *new); #else new = malloc (sizeof *new); #endif } return new; } /* Free a hash entry which was part of some bucket overflow, saving it for later recycling. */ static void free_entry (Hash_table *table, struct hash_entry *entry) { entry->data = NULL; entry->next = table->free_entry_list; table->free_entry_list = entry; } /* This private function is used to help with insertion and deletion. When ENTRY matches an entry in the table, return a pointer to the corresponding user data and set *BUCKET_HEAD to the head of the selected bucket. Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in the table, unlink the matching entry. */ static void * hash_find_entry (Hash_table *table, const void *entry, struct hash_entry **bucket_head, bool delete) { struct hash_entry *bucket = safe_hasher (table, entry); struct hash_entry *cursor; *bucket_head = bucket; /* Test for empty bucket. */ if (bucket->data == NULL) return NULL; /* See if the entry is the first in the bucket. */ if (entry == bucket->data || table->comparator (entry, bucket->data)) { void *data = bucket->data; if (delete) { if (bucket->next) { struct hash_entry *next = bucket->next; /* Bump the first overflow entry into the bucket head, then save the previous first overflow entry for later recycling. */ *bucket = *next; free_entry (table, next); } else { bucket->data = NULL; } } return data; } /* Scan the bucket overflow. */ for (cursor = bucket; cursor->next; cursor = cursor->next) { if (entry == cursor->next->data || table->comparator (entry, cursor->next->data)) { void *data = cursor->next->data; if (delete) { struct hash_entry *next = cursor->next; /* Unlink the entry to delete, then save the freed entry for later recycling. */ cursor->next = next->next; free_entry (table, next); } return data; } } /* No entry found. */ return NULL; } /* Internal helper, to move entries from SRC to DST. Both tables must share the same free entry list. If SAFE, only move overflow entries, saving bucket heads for later, so that no allocations will occur. Return false if the free entry list is exhausted and an allocation fails. */ static bool transfer_entries (Hash_table *dst, Hash_table *src, bool safe) { struct hash_entry *bucket; struct hash_entry *cursor; struct hash_entry *next; for (bucket = src->bucket; bucket < src->bucket_limit; bucket++) if (bucket->data) { void *data; struct hash_entry *new_bucket; /* Within each bucket, transfer overflow entries first and then the bucket head, to minimize memory pressure. After all, the only time we might allocate is when moving the bucket head, but moving overflow entries first may create free entries that can be recycled by the time we finally get to the bucket head. */ for (cursor = bucket->next; cursor; cursor = next) { data = cursor->data; new_bucket = safe_hasher (dst, data); next = cursor->next; if (new_bucket->data) { /* Merely relink an existing entry, when moving from a bucket overflow into a bucket overflow. */ cursor->next = new_bucket->next; new_bucket->next = cursor; } else { /* Free an existing entry, when moving from a bucket overflow into a bucket header. */ new_bucket->data = data; dst->n_buckets_used++; free_entry (dst, cursor); } } /* Now move the bucket head. Be sure that if we fail due to allocation failure that the src table is in a consistent state. */ data = bucket->data; bucket->next = NULL; if (safe) continue; new_bucket = safe_hasher (dst, data); if (new_bucket->data) { /* Allocate or recycle an entry, when moving from a bucket header into a bucket overflow. */ struct hash_entry *new_entry = allocate_entry (dst); if (new_entry == NULL) return false; new_entry->data = data; new_entry->next = new_bucket->next; new_bucket->next = new_entry; } else { /* Move from one bucket header to another. */ new_bucket->data = data; dst->n_buckets_used++; } bucket->data = NULL; src->n_buckets_used--; } return true; } /* For an already existing hash table, change the number of buckets through specifying CANDIDATE. The contents of the hash table are preserved. The new number of buckets is automatically selected so as to _guarantee_ that the table may receive at least CANDIDATE different user entries, including those already in the table, before any other growth of the hash table size occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the exact number of buckets desired. Return true iff the rehash succeeded. */ bool hash_rehash (Hash_table *table, size_t candidate) { Hash_table storage; Hash_table *new_table; size_t new_size = compute_bucket_size (candidate, table->tuning); if (!new_size) return false; if (new_size == table->n_buckets) return true; new_table = &storage; new_table->bucket = calloc (new_size, sizeof *new_table->bucket); if (new_table->bucket == NULL) return false; new_table->n_buckets = new_size; new_table->bucket_limit = new_table->bucket + new_size; new_table->n_buckets_used = 0; new_table->n_entries = 0; new_table->tuning = table->tuning; new_table->hasher = table->hasher; new_table->comparator = table->comparator; new_table->data_freer = table->data_freer; /* In order for the transfer to successfully complete, we need additional overflow entries when distinct buckets in the old table collide into a common bucket in the new table. The worst case possible is a hasher that gives a good spread with the old size, but returns a constant with the new size; if we were to guarantee table->n_buckets_used-1 free entries in advance, then the transfer would be guaranteed to not allocate memory. However, for large tables, a guarantee of no further allocation introduces a lot of extra memory pressure, all for an unlikely corner case (most rehashes reduce, rather than increase, the number of overflow entries needed). So, we instead ensure that the transfer process can be reversed if we hit a memory allocation failure mid-transfer. */ /* Merely reuse the extra old space into the new table. */ #if USE_OBSTACK new_table->entry_stack = table->entry_stack; #endif new_table->free_entry_list = table->free_entry_list; if (transfer_entries (new_table, table, false)) { /* Entries transferred successfully; tie up the loose ends. */ free (table->bucket); table->bucket = new_table->bucket; table->bucket_limit = new_table->bucket_limit; table->n_buckets = new_table->n_buckets; table->n_buckets_used = new_table->n_buckets_used; table->free_entry_list = new_table->free_entry_list; /* table->n_entries and table->entry_stack already hold their value. */ return true; } /* We've allocated new_table->bucket (and possibly some entries), exhausted the free list, and moved some but not all entries into new_table. We must undo the partial move before returning failure. The only way to get into this situation is if new_table uses fewer buckets than the old table, so we will reclaim some free entries as overflows in the new table are put back into distinct buckets in the old table. There are some pathological cases where a single pass through the table requires more intermediate overflow entries than using two passes. Two passes give worse cache performance and takes longer, but at this point, we're already out of memory, so slow and safe is better than failure. */ table->free_entry_list = new_table->free_entry_list; if (! (transfer_entries (table, new_table, true) && transfer_entries (table, new_table, false))) abort (); /* table->n_entries already holds its value. */ free (new_table->bucket); return false; } /* Insert ENTRY into hash TABLE if there is not already a matching entry. Return -1 upon memory allocation failure. Return 1 if insertion succeeded. Return 0 if there is already a matching entry in the table, and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT to that entry. This interface is easier to use than hash_insert when you must distinguish between the latter two cases. More importantly, hash_insert is unusable for some types of ENTRY values. When using hash_insert, the only way to distinguish those cases is to compare the return value and ENTRY. That works only when you can have two different ENTRY values that point to data that compares "equal". Thus, when the ENTRY value is a simple scalar, you must use hash_insert_if_absent. ENTRY must not be NULL. */ int hash_insert_if_absent (Hash_table *table, void const *entry, void const **matched_ent) { void *data; struct hash_entry *bucket; /* The caller cannot insert a NULL entry, since hash_lookup returns NULL to indicate "not found", and hash_find_entry uses "bucket->data == NULL" to indicate an empty bucket. */ if (! entry) abort (); /* If there's a matching entry already in the table, return that. */ if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) { if (matched_ent) *matched_ent = data; return 0; } /* If the growth threshold of the buckets in use has been reached, increase the table size and rehash. There's no point in checking the number of entries: if the hashing function is ill-conditioned, rehashing is not likely to improve it. */ if (table->n_buckets_used > table->tuning->growth_threshold * table->n_buckets) { /* Check more fully, before starting real work. If tuning arguments became invalid, the second check will rely on proper defaults. */ check_tuning (table); if (table->n_buckets_used > table->tuning->growth_threshold * table->n_buckets) { const Hash_tuning *tuning = table->tuning; float candidate = (tuning->is_n_buckets ? (table->n_buckets * tuning->growth_factor) : (table->n_buckets * tuning->growth_factor * tuning->growth_threshold)); if (SIZE_MAX <= candidate) return -1; /* If the rehash fails, arrange to return NULL. */ if (!hash_rehash (table, candidate)) return -1; /* Update the bucket we are interested in. */ if (hash_find_entry (table, entry, &bucket, false) != NULL) abort (); } } /* ENTRY is not matched, it should be inserted. */ if (bucket->data) { struct hash_entry *new_entry = allocate_entry (table); if (new_entry == NULL) return -1; /* Add ENTRY in the overflow of the bucket. */ new_entry->data = (void *) entry; new_entry->next = bucket->next; bucket->next = new_entry; table->n_entries++; return 1; } /* Add ENTRY right in the bucket head. */ bucket->data = (void *) entry; table->n_entries++; table->n_buckets_used++; return 1; } /* hash_insert0 is the deprecated name for hash_insert_if_absent. . */ int hash_insert0 (Hash_table *table, void const *entry, void const **matched_ent) { return hash_insert_if_absent (table, entry, matched_ent); } /* If ENTRY matches an entry already in the hash table, return the pointer to the entry from the table. Otherwise, insert ENTRY and return ENTRY. Return NULL if the storage required for insertion cannot be allocated. This implementation does not support duplicate entries or insertion of NULL. */ void * hash_insert (Hash_table *table, void const *entry) { void const *matched_ent; int err = hash_insert_if_absent (table, entry, &matched_ent); return (err == -1 ? NULL : (void *) (err == 0 ? matched_ent : entry)); } /* If ENTRY is already in the table, remove it and return the just-deleted data (the user may want to deallocate its storage). If ENTRY is not in the table, don't modify the table and return NULL. */ void * hash_delete (Hash_table *table, const void *entry) { void *data; struct hash_entry *bucket; data = hash_find_entry (table, entry, &bucket, true); if (!data) return NULL; table->n_entries--; if (!bucket->data) { table->n_buckets_used--; /* If the shrink threshold of the buckets in use has been reached, rehash into a smaller table. */ if (table->n_buckets_used < table->tuning->shrink_threshold * table->n_buckets) { /* Check more fully, before starting real work. If tuning arguments became invalid, the second check will rely on proper defaults. */ check_tuning (table); if (table->n_buckets_used < table->tuning->shrink_threshold * table->n_buckets) { const Hash_tuning *tuning = table->tuning; size_t candidate = (tuning->is_n_buckets ? table->n_buckets * tuning->shrink_factor : (table->n_buckets * tuning->shrink_factor * tuning->growth_threshold)); if (!hash_rehash (table, candidate)) { /* Failure to allocate memory in an attempt to shrink the table is not fatal. But since memory is low, we can at least be kind and free any spare entries, rather than keeping them tied up in the free entry list. */ #if ! USE_OBSTACK struct hash_entry *cursor = table->free_entry_list; struct hash_entry *next; while (cursor) { next = cursor->next; free (cursor); cursor = next; } table->free_entry_list = NULL; #endif } } } } return data; } /* Testing. */ #if TESTING void hash_print (const Hash_table *table) { struct hash_entry *bucket = (struct hash_entry *) table->bucket; for ( ; bucket < table->bucket_limit; bucket++) { struct hash_entry *cursor; if (bucket) printf ("%lu:\n", (unsigned long int) (bucket - table->bucket)); for (cursor = bucket; cursor; cursor = cursor->next) { char const *s = cursor->data; /* FIXME */ if (s) printf (" %s\n", s); } } } #endif /* TESTING */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/isnand.c���������������������������������������������������������������0000664�0000000�0000000�00000001467�12166360012�013576� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include "isnan.c" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fpurge.c���������������������������������������������������������������0000664�0000000�0000000�00000011244�12166360012�013604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Flushing buffers of a FILE stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdio.h> #if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ # include <stdio_ext.h> #endif #include <stdlib.h> #include "stdio-impl.h" int fpurge (FILE *fp) { #if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ __fpurge (fp); /* The __fpurge function does not have a return value. */ return 0; #elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */ /* Call the system's fpurge function. */ # undef fpurge # if !HAVE_DECL_FPURGE extern int fpurge (FILE *); # endif int result = fpurge (fp); # if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ if (result == 0) /* Correct the invariants that fpurge broke. <stdio.h> on BSD systems says: "The following always hold: if _flags & __SRD, _w is 0." If this invariant is not fulfilled and the stream is read-write but currently reading, subsequent putc or fputc calls will write directly into the buffer, although they shouldn't be allowed to. */ if ((fp_->_flags & __SRD) != 0) fp_->_w = 0; # endif return result; #else /* Most systems provide FILE as a struct and the necessary bitmask in <stdio.h>, because they need it for implementing getc() and putc() as fast macros. */ # if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_IO_read_end = fp->_IO_read_ptr; fp->_IO_write_ptr = fp->_IO_write_base; /* Avoid memory leak when there is an active ungetc buffer. */ if (fp->_IO_save_base != NULL) { free (fp->_IO_save_base); fp->_IO_save_base = NULL; } return 0; # elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ fp_->_p = fp_->_bf._base; fp_->_r = 0; fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ ? fp_->_bf._size : 0); /* Avoid memory leak when there is an active ungetc buffer. */ if (fp_ub._base != NULL) { if (fp_ub._base != fp_->_ubuf) free (fp_ub._base); fp_ub._base = NULL; } return 0; # elif defined __EMX__ /* emx+gcc */ fp->_ptr = fp->_buffer; fp->_rcount = 0; fp->_wcount = 0; fp->_ungetc_count = 0; return 0; # elif defined __minix /* Minix */ fp->_ptr = fp->_buf; if (fp->_ptr != NULL) fp->_count = 0; return 0; # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ fp->_ptr = fp->_base; if (fp->_ptr != NULL) fp->_cnt = 0; return 0; # elif defined __UCLIBC__ /* uClibc */ # ifdef __STDIO_BUFFERS if (fp->__modeflags & __FLAG_WRITING) fp->__bufpos = fp->__bufstart; else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) fp->__bufpos = fp->__bufread; # endif return 0; # elif defined __QNX__ /* QNX */ fp->_Rback = fp->_Back + sizeof (fp->_Back); fp->_Rsave = NULL; if (fp->_Mode & 0x2000 /* _MWRITE */) /* fp->_Buf <= fp->_Next <= fp->_Wend */ fp->_Next = fp->_Buf; else /* fp->_Buf <= fp->_Next <= fp->_Rend */ fp->_Rend = fp->_Next; return 0; # elif defined __MINT__ /* Atari FreeMiNT */ if (fp->__pushed_back) { fp->__bufp = fp->__pushback_bufp; fp->__pushed_back = 0; } /* Preserve the current file position. */ if (fp->__target != -1) fp->__target += fp->__bufp - fp->__buffer; fp->__bufp = fp->__buffer; /* Nothing in the buffer, next getc is nontrivial. */ fp->__get_limit = fp->__bufp; /* Nothing in the buffer, next putc is nontrivial. */ fp->__put_limit = fp->__buffer; return 0; # else # error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib." # endif #endif } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/closedir.c�������������������������������������������������������������0000664�0000000�0000000�00000002642�12166360012�014122� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Stop reading the entries of a directory. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <dirent.h> #if REPLACE_FCHDIR # include <unistd.h> #endif #if HAVE_CLOSEDIR /* Override closedir(), to keep track of the open file descriptors. Needed because there is a function dirfd(). */ #else # include <stdlib.h> # include "dirent-private.h" #endif int closedir (DIR *dirp) { # if REPLACE_FCHDIR int fd = dirfd (dirp); # endif int retval; #if HAVE_CLOSEDIR # undef closedir retval = closedir (dirp); #else if (dirp->current != INVALID_HANDLE_VALUE) FindClose (dirp->current); free (dirp); retval = 0; #endif #if REPLACE_FCHDIR if (retval >= 0) _gl_unregister_fd (fd); #endif return retval; } ����������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/ref-add.sin������������������������������������������������������������0000664�0000000�0000000�00000002064�12166360012�014165� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Add this package to a list of references stored in a text file. # # Copyright (C) 2000, 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 by # the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible <haible@clisp.cons.org>. # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/chdir-long.c�����������������������������������������������������������0000664�0000000�0000000�00000015377�12166360012�014355� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* provide a chdir function that tries not to fail due to ENAMETOOLONG Copyright (C) 2004-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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #include <config.h> #include "chdir-long.h" #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <stdio.h> #ifndef PATH_MAX # error "compile this file only if your system defines PATH_MAX" #endif /* The results of openat() in this file are not leaked to any single-threaded code that could use stdio. FIXME - if the kernel ever adds support for multi-thread safety for avoiding standard fds, then we should use openat_safer. */ struct cd_buf { int fd; }; static inline void cdb_init (struct cd_buf *cdb) { cdb->fd = AT_FDCWD; } static inline int cdb_fchdir (struct cd_buf const *cdb) { return fchdir (cdb->fd); } static inline void cdb_free (struct cd_buf const *cdb) { if (0 <= cdb->fd) { bool close_fail = close (cdb->fd); assert (! close_fail); } } /* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd, try to open the CDB->fd-relative directory, DIR. If the open succeeds, update CDB->fd with the resulting descriptor, close the incoming file descriptor, and return zero. Upon failure, return -1 and set errno. */ static int cdb_advance_fd (struct cd_buf *cdb, char const *dir) { int new_fd = openat (cdb->fd, dir, O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); if (new_fd < 0) return -1; cdb_free (cdb); cdb->fd = new_fd; return 0; } /* Return a pointer to the first non-slash in S. */ static inline char * _GL_ATTRIBUTE_PURE find_non_slash (char const *s) { size_t n_slash = strspn (s, "/"); return (char *) s + n_slash; } /* This is a function much like chdir, but without the PATH_MAX limitation on the length of the directory name. A significant difference is that it must be able to modify (albeit only temporarily) the directory name. It handles an arbitrarily long directory name by operating on manageable portions of the name. On systems without the openat syscall, this means changing the working directory to more and more "distant" points along the long directory name and then restoring the working directory. If any of those attempts to save or restore the working directory fails, this function exits nonzero. Note that this function may still fail with errno == ENAMETOOLONG, but only if the specified directory name contains a component that is long enough to provoke such a failure all by itself (e.g. if the component has length PATH_MAX or greater on systems that define PATH_MAX). */ int chdir_long (char *dir) { int e = chdir (dir); if (e == 0 || errno != ENAMETOOLONG) return e; { size_t len = strlen (dir); char *dir_end = dir + len; struct cd_buf cdb; size_t n_leading_slash; cdb_init (&cdb); /* If DIR is the empty string, then the chdir above must have failed and set errno to ENOENT. */ assert (0 < len); assert (PATH_MAX <= len); /* Count leading slashes. */ n_leading_slash = strspn (dir, "/"); /* Handle any leading slashes as well as any name that matches the regular expression, m!^//hostname[/]*! . Handling this prefix separately usually results in a single additional cdb_advance_fd call, but it's worthwhile, since it makes the code in the following loop cleaner. */ if (n_leading_slash == 2) { int err; /* Find next slash. We already know that dir[2] is neither a slash nor '\0'. */ char *slash = memchr (dir + 3, '/', dir_end - (dir + 3)); if (slash == NULL) { errno = ENAMETOOLONG; return -1; } *slash = '\0'; err = cdb_advance_fd (&cdb, dir); *slash = '/'; if (err != 0) goto Fail; dir = find_non_slash (slash + 1); } else if (n_leading_slash) { if (cdb_advance_fd (&cdb, "/") != 0) goto Fail; dir += n_leading_slash; } assert (*dir != '/'); assert (dir <= dir_end); while (PATH_MAX <= dir_end - dir) { int err; /* Find a slash that is PATH_MAX or fewer bytes away from dir. I.e. see if there is a slash that will give us a name of length PATH_MAX-1 or less. */ char *slash = memrchr (dir, '/', PATH_MAX); if (slash == NULL) { errno = ENAMETOOLONG; return -1; } *slash = '\0'; assert (slash - dir < PATH_MAX); err = cdb_advance_fd (&cdb, dir); *slash = '/'; if (err != 0) goto Fail; dir = find_non_slash (slash + 1); } if (dir < dir_end) { if (cdb_advance_fd (&cdb, dir) != 0) goto Fail; } if (cdb_fchdir (&cdb) != 0) goto Fail; cdb_free (&cdb); return 0; Fail: { int saved_errno = errno; cdb_free (&cdb); errno = saved_errno; return -1; } } } #if TEST_CHDIR # include "closeout.h" # include "error.h" char *program_name; int main (int argc, char *argv[]) { char *line = NULL; size_t n = 0; int len; program_name = argv[0]; atexit (close_stdout); len = getline (&line, &n, stdin); if (len < 0) { int saved_errno = errno; if (feof (stdin)) exit (0); error (EXIT_FAILURE, saved_errno, "reading standard input"); } else if (len == 0) exit (0); if (line[len-1] == '\n') line[len-1] = '\0'; if (chdir_long (line) != 0) error (EXIT_FAILURE, errno, "chdir_long failed: %s", line); if (argc <= 1) { /* Using 'pwd' here makes sense only if it is a robust implementation, like the one in coreutils after the 2004-04-19 changes. */ char const *cmd = "pwd"; execlp (cmd, (char *) NULL); error (EXIT_FAILURE, errno, "%s", cmd); } fclose (stdin); fclose (stderr); exit (EXIT_SUCCESS); } #endif /* Local Variables: compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a" End: */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/freading.c�������������������������������������������������������������0000664�0000000�0000000�00000005456�12166360012�014103� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Retrieve information about a FILE stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "freading.h" #include "stdio-impl.h" /* Don't use glibc's __freading function in glibc < 2.7, see <http://sourceware.org/bugzilla/show_bug.cgi?id=4359> */ #if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))) bool freading (FILE *fp) { /* Most systems provide FILE as a struct and the necessary bitmask in <stdio.h>, because they need it for implementing getc() and putc() as fast macros. */ # if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ return ((fp->_flags & _IO_NO_WRITES) != 0 || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 && fp->_IO_read_base != NULL)); # elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ return (fp_->_flags & __SRD) != 0; # elif defined __EMX__ /* emx+gcc */ return (fp->_flags & _IOREAD) != 0; # elif defined __minix /* Minix */ return (fp->_flags & _IOREADING) != 0; # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ # if defined __sun /* Solaris */ return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0; # else return (fp->_flag & _IOREAD) != 0; # endif # elif defined __UCLIBC__ /* uClibc */ return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0; # elif defined __QNX__ /* QNX */ return ((fp->_Mode & 0x2 /* _MOPENW */) == 0 || (fp->_Mode & 0x1000 /* _MREAD */) != 0); # elif defined __MINT__ /* Atari FreeMiNT */ if (!fp->__mode.__write) return 1; if (!fp->__mode.__read) return 0; # ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */ return (fp->__flags & _IO_CURRENTLY_GETTING) != 0; # else return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/); # endif # else # error "Please port gnulib freading.c to your platform!" # endif } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbrtowc.c��������������������������������������������������������������0000664�0000000�0000000�00000024663�12166360012�014002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert multibyte character to wide character. Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #if GNULIB_defined_mbstate_t /* Implement mbrtowc() on top of mbtowc(). */ # include <errno.h> # include <stdlib.h> # include "localcharset.h" # include "streq.h" # include "verify.h" verify (sizeof (mbstate_t) >= 4); static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { char *pstate = (char *)ps; if (s == NULL) { pwc = NULL; s = ""; n = 1; } if (n == 0) return (size_t)(-2); /* Here n > 0. */ if (pstate == NULL) pstate = internal_state; { size_t nstate = pstate[0]; char buf[4]; const char *p; size_t m; switch (nstate) { case 0: p = s; m = n; break; case 3: buf[2] = pstate[3]; /*FALLTHROUGH*/ case 2: buf[1] = pstate[2]; /*FALLTHROUGH*/ case 1: buf[0] = pstate[1]; p = buf; m = nstate; buf[m++] = s[0]; if (n >= 2 && m < 4) { buf[m++] = s[1]; if (n >= 3 && m < 4) buf[m++] = s[2]; } break; default: errno = EINVAL; return (size_t)(-1); } /* Here m > 0. */ # if __GLIBC__ || defined __UCLIBC__ /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */ mbtowc (NULL, NULL, 0); # endif { int res = mbtowc (pwc, p, m); if (res >= 0) { if (pwc != NULL && ((*pwc == 0) != (res == 0))) abort (); if (nstate >= (res > 0 ? res : 1)) abort (); res -= nstate; pstate[0] = 0; return res; } /* mbtowc does not distinguish between invalid and incomplete multibyte sequences. But mbrtowc needs to make this distinction. There are two possible approaches: - Use iconv() and its return value. - Use built-in knowledge about the possible encodings. Given the low quality of implementation of iconv() on the systems that lack mbrtowc(), we use the second approach. The possible encodings are: - 8-bit encodings, - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - UTF-8. Use specialized code for each. */ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ { const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; if (c >= 0xc2) { if (c < 0xe0) { if (m == 1) goto incomplete; } else if (c < 0xf0) { if (m == 1) goto incomplete; if (m == 2) { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xe1 || c2 >= 0xa0) && (c != 0xed || c2 < 0xa0)) goto incomplete; } } else if (c <= 0xf4) { if (m == 1) goto incomplete; else /* m == 2 || m == 3 */ { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if ((c3 ^ 0x80) < 0x40) goto incomplete; } } } } } goto invalid; } /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) goto incomplete; } if (m == 2) { unsigned char c = (unsigned char) p[0]; if (c == 0x8f) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0xa1 && c2 < 0xff) goto incomplete; } } goto invalid; } if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if (c >= 0xa1 && c < 0xff) goto incomplete; } goto invalid; } if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c == 0x8e) goto incomplete; } goto invalid; } if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c >= 0x90 && c <= 0xe3) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0x30 && c2 <= 0x39) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if (c3 >= 0x81 && c3 <= 0xfe) goto incomplete; } } } } goto invalid; } if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) || (c >= 0xf0 && c <= 0xf9)) goto incomplete; } goto invalid; } /* An unknown multibyte encoding. */ goto incomplete; } incomplete: { size_t k = nstate; /* Here 0 <= k < m < 4. */ pstate[++k] = s[0]; if (k < m) { pstate[++k] = s[1]; if (k < m) pstate[++k] = s[2]; } if (k != m) abort (); } pstate[0] = m; return (size_t)(-2); invalid: errno = EILSEQ; /* The conversion state is undefined, says POSIX. */ return (size_t)(-1); } } } #else /* Override the system's mbrtowc() function. */ # undef mbrtowc size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG if (s == NULL) { pwc = NULL; s = ""; n = 1; } # endif # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; /* Override mbrtowc's internal state. We cannot call mbsinit() on the hidden internal state, but we can call it on our variable. */ if (ps == NULL) ps = &internal_state; if (!mbsinit (ps)) { /* Parse the rest of the multibyte character byte for byte. */ size_t count = 0; for (; n > 0; s++, n--) { wchar_t wc; size_t ret = mbrtowc (&wc, s, 1, ps); if (ret == (size_t)(-1)) return (size_t)(-1); count++; if (ret != (size_t)(-2)) { /* The multibyte character has been completed. */ if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : count); } } return (size_t)(-2); } } # endif # if MBRTOWC_NUL_RETVAL_BUG { wchar_t wc; size_t ret = mbrtowc (&wc, s, n, ps); if (ret != (size_t)(-1) && ret != (size_t)(-2)) { if (pwc != NULL) *pwc = wc; if (wc == 0) ret = 0; } return ret; } # else { # if MBRTOWC_NULL_ARG1_BUG wchar_t dummy; if (pwc == NULL) pwc = &dummy; # endif return mbrtowc (pwc, s, n, ps); } # endif } #endif �����������������������������������������������������������������������������id-utils-4.6+git20120811/lib/wchar.in.h�������������������������������������������������������������0000664�0000000�0000000�00000077606�12166360012�014050� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A substitute for ISO C99 <wchar.h>, for platforms that have issues. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * ISO C 99 <wchar.h> for platforms that have issues. * <http://www.opengroup.org/susv3xbd/wchar.h.html> * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H /* Special invocation convention: - Inside glibc and uClibc header files. - On HP-UX 11.00 we have a sequence of nested includes <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>, once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's <wchar.h>. - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and the latter includes <wchar.h>. But here, we have no way to detect whether <wctype.h> is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H #if @HAVE_FEATURES_H@ # include <features.h> /* for __GLIBC__ */ #endif /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included before <wchar.h>. In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined by <stddef.h>. But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include <stddef.h> #endif #ifndef __GLIBC__ # include <stdio.h> # include <time.h> #endif /* Include the original <wchar.h> if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _@GUARD_PREFIX@_WCHAR_H #define _@GUARD_PREFIX@_WCHAR_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define wint_t and WEOF. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else /* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>. This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be "unchanged by default argument promotions". Override it. */ # if defined _MSC_VER # if !GNULIB_defined_wint_t # include <crtdefs.h> typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t # define GNULIB_defined_wint_t 1 # endif # endif # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ # if !GNULIB_defined_mbstate_t typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 # endif #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef btowc # define btowc rpl_btowc # endif _GL_FUNCDECL_RPL (btowc, wint_t, (int c)); _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # else # if !@HAVE_BTOWC@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c)); # endif _GL_CXXALIAS_SYS (btowc, wint_t, (int c)); # endif _GL_CXXALIASWARN (btowc); #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); # endif #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctob # define wctob rpl_wctob # endif _GL_FUNCDECL_RPL (wctob, int, (wint_t wc)); _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); # else # if !defined wctob && !@HAVE_DECL_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc)); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif _GL_CXXALIASWARN (wctob); #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); # endif #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsinit # define mbsinit rpl_mbsinit # endif _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); # else # if !@HAVE_MBSINIT@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsinit); #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); # endif #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif _GL_FUNCDECL_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRTOWC@ _GL_FUNCDECL_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrtowc); #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); # endif #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrlen # define mbrlen rpl_mbrlen # endif _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRLEN@ _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrlen); #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif _GL_FUNCDECL_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSRTOWCS@ _GL_FUNCDECL_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif _GL_FUNCDECL_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSNRTOWCS@ _GL_FUNCDECL_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsnrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # else # if !@HAVE_WCRTOMB@ _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcrtomb); #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif _GL_FUNCDECL_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSRTOMBS@ _GL_FUNCDECL_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if @REPLACE_WCSNRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsnrtombs # define wcsnrtombs rpl_wcsnrtombs # endif _GL_FUNCDECL_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSNRTOMBS@ _GL_FUNCDECL_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsnrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); # endif #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcwidth # define wcwidth rpl_wcwidth # endif _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t)); _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); # else # if !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t)); # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif _GL_CXXALIASWARN (wcwidth); #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); # endif #endif /* Search N wide characters of S for C. */ #if @GNULIB_WMEMCHR@ # if !@HAVE_WMEMCHR@ _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (wmemchr, wchar_t *, (const wchar_t *, wchar_t, size_t), const wchar_t *, (const wchar_t *, wchar_t, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); # else _GL_CXXALIASWARN (wmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef wmemchr # if HAVE_RAW_DECL_WMEMCHR _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " "use gnulib module wmemchr for portability"); # endif #endif /* Compare N wide characters of S1 and S2. */ #if @GNULIB_WMEMCMP@ # if !@HAVE_WMEMCMP@ _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wmemcmp); #elif defined GNULIB_POSIXCHECK # undef wmemcmp # if HAVE_RAW_DECL_WMEMCMP _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " "use gnulib module wmemcmp for portability"); # endif #endif /* Copy N wide characters of SRC to DEST. */ #if @GNULIB_WMEMCPY@ # if !@HAVE_WMEMCPY@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemcpy); #elif defined GNULIB_POSIXCHECK # undef wmemcpy # if HAVE_RAW_DECL_WMEMCPY _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " "use gnulib module wmemcpy for portability"); # endif #endif /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ #if @GNULIB_WMEMMOVE@ # if !@HAVE_WMEMMOVE@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemmove); #elif defined GNULIB_POSIXCHECK # undef wmemmove # if HAVE_RAW_DECL_WMEMMOVE _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " "use gnulib module wmemmove for portability"); # endif #endif /* Set N wide characters of S to C. */ #if @GNULIB_WMEMSET@ # if !@HAVE_WMEMSET@ _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); # endif _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN (wmemset); #elif defined GNULIB_POSIXCHECK # undef wmemset # if HAVE_RAW_DECL_WMEMSET _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " "use gnulib module wmemset for portability"); # endif #endif /* Return the number of wide characters in S. */ #if @GNULIB_WCSLEN@ # if !@HAVE_WCSLEN@ _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s)); # endif _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); _GL_CXXALIASWARN (wcslen); #elif defined GNULIB_POSIXCHECK # undef wcslen # if HAVE_RAW_DECL_WCSLEN _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " "use gnulib module wcslen for portability"); # endif #endif /* Return the number of wide characters in S, but at most MAXLEN. */ #if @GNULIB_WCSNLEN@ # if !@HAVE_WCSNLEN@ _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); # endif _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); _GL_CXXALIASWARN (wcsnlen); #elif defined GNULIB_POSIXCHECK # undef wcsnlen # if HAVE_RAW_DECL_WCSNLEN _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " "use gnulib module wcsnlen for portability"); # endif #endif /* Copy SRC to DEST. */ #if @GNULIB_WCSCPY@ # if !@HAVE_WCSCPY@ _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscpy); #elif defined GNULIB_POSIXCHECK # undef wcscpy # if HAVE_RAW_DECL_WCSCPY _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " "use gnulib module wcscpy for portability"); # endif #endif /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if @GNULIB_WCPCPY@ # if !@HAVE_WCPCPY@ _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcpcpy); #elif defined GNULIB_POSIXCHECK # undef wcpcpy # if HAVE_RAW_DECL_WCPCPY _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " "use gnulib module wcpcpy for portability"); # endif #endif /* Copy no more than N wide characters of SRC to DEST. */ #if @GNULIB_WCSNCPY@ # if !@HAVE_WCSNCPY@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncpy); #elif defined GNULIB_POSIXCHECK # undef wcsncpy # if HAVE_RAW_DECL_WCSNCPY _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " "use gnulib module wcsncpy for portability"); # endif #endif /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if @GNULIB_WCPNCPY@ # if !@HAVE_WCPNCPY@ _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcpncpy); #elif defined GNULIB_POSIXCHECK # undef wcpncpy # if HAVE_RAW_DECL_WCPNCPY _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " "use gnulib module wcpncpy for portability"); # endif #endif /* Append SRC onto DEST. */ #if @GNULIB_WCSCAT@ # if !@HAVE_WCSCAT@ _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscat); #elif defined GNULIB_POSIXCHECK # undef wcscat # if HAVE_RAW_DECL_WCSCAT _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " "use gnulib module wcscat for portability"); # endif #endif /* Append no more than N wide characters of SRC onto DEST. */ #if @GNULIB_WCSNCAT@ # if !@HAVE_WCSNCAT@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncat); #elif defined GNULIB_POSIXCHECK # undef wcsncat # if HAVE_RAW_DECL_WCSNCAT _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " "use gnulib module wcsncat for portability"); # endif #endif /* Compare S1 and S2. */ #if @GNULIB_WCSCMP@ # if !@HAVE_WCSCMP@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscmp); #elif defined GNULIB_POSIXCHECK # undef wcscmp # if HAVE_RAW_DECL_WCSCMP _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " "use gnulib module wcscmp for portability"); # endif #endif /* Compare no more than N wide characters of S1 and S2. */ #if @GNULIB_WCSNCMP@ # if !@HAVE_WCSNCMP@ _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncmp); #elif defined GNULIB_POSIXCHECK # undef wcsncmp # if HAVE_RAW_DECL_WCSNCMP _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " "use gnulib module wcsncmp for portability"); # endif #endif /* Compare S1 and S2, ignoring case. */ #if @GNULIB_WCSCASECMP@ # if !@HAVE_WCSCASECMP@ _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscasecmp); #elif defined GNULIB_POSIXCHECK # undef wcscasecmp # if HAVE_RAW_DECL_WCSCASECMP _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " "use gnulib module wcscasecmp for portability"); # endif #endif /* Compare no more than N chars of S1 and S2, ignoring case. */ #if @GNULIB_WCSNCASECMP@ # if !@HAVE_WCSNCASECMP@ _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncasecmp); #elif defined GNULIB_POSIXCHECK # undef wcsncasecmp # if HAVE_RAW_DECL_WCSNCASECMP _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " "use gnulib module wcsncasecmp for portability"); # endif #endif /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ #if @GNULIB_WCSCOLL@ # if !@HAVE_WCSCOLL@ _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscoll); #elif defined GNULIB_POSIXCHECK # undef wcscoll # if HAVE_RAW_DECL_WCSCOLL _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " "use gnulib module wcscoll for portability"); # endif #endif /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying 'wcscoll' to the original strings. */ #if @GNULIB_WCSXFRM@ # if !@HAVE_WCSXFRM@ _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsxfrm); #elif defined GNULIB_POSIXCHECK # undef wcsxfrm # if HAVE_RAW_DECL_WCSXFRM _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " "use gnulib module wcsxfrm for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_WCSDUP@ # if !@HAVE_WCSDUP@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); # endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); _GL_CXXALIASWARN (wcsdup); #elif defined GNULIB_POSIXCHECK # undef wcsdup # if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); # endif #endif /* Find the first occurrence of WC in WCS. */ #if @GNULIB_WCSCHR@ # if !@HAVE_WCSCHR@ _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcschr (const wchar_t *, wchar_t); wchar_t * std::wcschr (wchar_t *, wchar_t); } */ _GL_CXXALIAS_SYS_CAST2 (wcschr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); # else _GL_CXXALIASWARN (wcschr); # endif #elif defined GNULIB_POSIXCHECK # undef wcschr # if HAVE_RAW_DECL_WCSCHR _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " "use gnulib module wcschr for portability"); # endif #endif /* Find the last occurrence of WC in WCS. */ #if @GNULIB_WCSRCHR@ # if !@HAVE_WCSRCHR@ _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); wchar_t * std::wcsrchr (wchar_t *, wchar_t); } */ _GL_CXXALIAS_SYS_CAST2 (wcsrchr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); # else _GL_CXXALIASWARN (wcsrchr); # endif #elif defined GNULIB_POSIXCHECK # undef wcsrchr # if HAVE_RAW_DECL_WCSRCHR _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " "use gnulib module wcsrchr for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ #if @GNULIB_WCSCSPN@ # if !@HAVE_WCSCSPN@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); # endif _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); _GL_CXXALIASWARN (wcscspn); #elif defined GNULIB_POSIXCHECK # undef wcscspn # if HAVE_RAW_DECL_WCSCSPN _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " "use gnulib module wcscspn for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ #if @GNULIB_WCSSPN@ # if !@HAVE_WCSSPN@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); # endif _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN (wcsspn); #elif defined GNULIB_POSIXCHECK # undef wcsspn # if HAVE_RAW_DECL_WCSSPN _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " "use gnulib module wcsspn for portability"); # endif #endif /* Find the first occurrence in WCS of any character in ACCEPT. */ #if @GNULIB_WCSPBRK@ # if !@HAVE_WCSPBRK@ _GL_FUNCDECL_SYS (wcspbrk, wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); } */ _GL_CXXALIAS_SYS_CAST2 (wcspbrk, wchar_t *, (const wchar_t *, const wchar_t *), const wchar_t *, (const wchar_t *, const wchar_t *)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcspbrk, wchar_t *, (wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); # else _GL_CXXALIASWARN (wcspbrk); # endif #elif defined GNULIB_POSIXCHECK # undef wcspbrk # if HAVE_RAW_DECL_WCSPBRK _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " "use gnulib module wcspbrk for portability"); # endif #endif /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_WCSSTR@ # if !@HAVE_WCSSTR@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); wchar_t * std::wcsstr (wchar_t *, const wchar_t *); } */ _GL_CXXALIAS_SYS_CAST2 (wcsstr, wchar_t *, (const wchar_t *, const wchar_t *), const wchar_t *, (const wchar_t *, const wchar_t *)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, (wchar_t *haystack, const wchar_t *needle)); _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); # else _GL_CXXALIASWARN (wcsstr); # endif #elif defined GNULIB_POSIXCHECK # undef wcsstr # if HAVE_RAW_DECL_WCSSTR _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " "use gnulib module wcsstr for portability"); # endif #endif /* Divide WCS into tokens separated by characters in DELIM. */ #if @GNULIB_WCSTOK@ # if !@HAVE_WCSTOK@ _GL_FUNCDECL_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); # endif _GL_CXXALIAS_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); _GL_CXXALIASWARN (wcstok); #elif defined GNULIB_POSIXCHECK # undef wcstok # if HAVE_RAW_DECL_WCSTOK _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " "use gnulib module wcstok for portability"); # endif #endif /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ #if @GNULIB_WCSWIDTH@ # if @REPLACE_WCSWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcswidth # define wcswidth rpl_wcswidth # endif _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)); _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); # else # if !@HAVE_WCSWIDTH@ _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif _GL_CXXALIASWARN (wcswidth); #elif defined GNULIB_POSIXCHECK # undef wcswidth # if HAVE_RAW_DECL_WCSWIDTH _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " "use gnulib module wcswidth for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif ��������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/itold.c����������������������������������������������������������������0000664�0000000�0000000�00000002010�12166360012�013416� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Replacement for 'int' to 'long double' conversion routine. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <float.h> void _Qp_itoq (long double *result, int a) { /* Convert from 'int' to 'double', then from 'double' to 'long double'. */ *result = (double) a; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/exitfail.c�������������������������������������������������������������0000664�0000000�0000000�00000001533�12166360012�014121� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Failure exit status Copyright (C) 2002-2003, 2005-2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "exitfail.h" #include <stdlib.h> int volatile exit_failure = EXIT_FAILURE; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fseeko.c���������������������������������������������������������������0000664�0000000�0000000�00000012217�12166360012�013571� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* An fseeko() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <stdio.h> /* Get off_t and lseek. */ #include <unistd.h> #include "stdio-impl.h" int fseeko (FILE *fp, off_t offset, int whence) #undef fseeko #if !HAVE_FSEEKO # undef fseek # define fseeko fseek #endif { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return EOF; #endif /* These tests are based on fpurge.c. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ if (fp->_IO_read_end == fp->_IO_read_ptr && fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_save_base == NULL) #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an fseeko that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } # endif if (fp_->_p == fp_->_bf._base && fp_->_r == 0 && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ ? fp_->_bf._size : 0) && fp_ub._base == NULL) #elif defined __EMX__ /* emx+gcc */ if (fp->_ptr == fp->_buffer && fp->_rcount == 0 && fp->_wcount == 0 && fp->_ungetc_count == 0) #elif defined __minix /* Minix */ if (fp_->_ptr == fp_->_buf && (fp_->_ptr == NULL || fp_->_count == 0)) #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ if (fp_->_ptr == fp_->_base && (fp_->_ptr == NULL || fp_->_cnt == 0)) #elif defined __UCLIBC__ /* uClibc */ if (((fp->__modeflags & __FLAG_WRITING) == 0 || fp->__bufpos == fp->__bufstart) && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 || fp->__bufpos == fp->__bufread)) #elif defined __QNX__ /* QNX */ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) && fp->_Rback == fp->_Back + sizeof (fp->_Back) && fp->_Rsave == NULL) #elif defined __MINT__ /* Atari FreeMiNT */ if (fp->__bufp == fp->__buffer && fp->__get_limit == fp->__bufp && fp->__put_limit == fp->__bufp && !fp->__pushed_back) #else #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." #endif { /* We get here when an fflush() call immediately preceded this one (or if ftell() has created buffers but no I/O has occurred on a newly-opened stream). We know there are no buffers. */ off_t pos = lseek (fileno (fp), offset, whence); if (pos == -1) { #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ fp_->_flags &= ~__SOFF; #endif return -1; } #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; fp->_offset = pos; #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __CYGWIN__ /* fp_->_offset is typed as an integer. */ fp_->_offset = pos; # else /* fp_->_offset is an fpos_t. */ { /* Use a union, since on NetBSD, the compilation flags determine whether fpos_t is typedef'd to off_t or a struct containing a single off_t member. */ union { fpos_t f; off_t o; } u; u.o = pos; fp_->_offset = u.f; } # endif fp_->_flags |= __SOFF; fp_->_flags &= ~__SEOF; #elif defined __EMX__ /* emx+gcc */ fp->_flags &= ~_IOEOF; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ fp->_flag &= ~_IOEOF; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__offset = pos; fp->__eof = 0; #endif return 0; } return fseeko (fp, offset, whence); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xstrndup.c�������������������������������������������������������������0000664�0000000�0000000�00000002245�12166360012�014204� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003, 2006-2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "xstrndup.h" #include <string.h> #include "xalloc.h" /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ char * xstrndup (const char *string, size_t n) { char *s = strndup (string, n); if (! s) xalloc_die (); return s; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/openat.h���������������������������������������������������������������0000664�0000000�0000000�00000005233�12166360012�013610� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* provide a replacement openat function Copyright (C) 2004-2006, 2008-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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #ifndef _GL_HEADER_OPENAT #define _GL_HEADER_OPENAT #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdbool.h> #if !HAVE_OPENAT int openat_permissive (int fd, char const *file, int flags, mode_t mode, int *cwd_errno); bool openat_needs_fchdir (void); #else # define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \ openat (Fd, File, Flags, Mode) # define openat_needs_fchdir() false #endif _Noreturn void openat_restore_fail (int); _Noreturn void openat_save_fail (int); /* Using these function names makes application code slightly more readable than it would be with fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW). */ #if GNULIB_FCHOWNAT static inline int chownat (int fd, char const *file, uid_t owner, gid_t group) { return fchownat (fd, file, owner, group, 0); } static inline int lchownat (int fd, char const *file, uid_t owner, gid_t group) { return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW); } #endif #if GNULIB_FCHMODAT static inline int chmodat (int fd, char const *file, mode_t mode) { return fchmodat (fd, file, mode, 0); } static inline int lchmodat (int fd, char const *file, mode_t mode) { return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW); } #endif #if GNULIB_FSTATAT static inline int statat (int fd, char const *name, struct stat *st) { return fstatat (fd, name, st, 0); } static inline int lstatat (int fd, char const *name, struct stat *st) { return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW); } #endif /* For now, there are no wrappers named laccessat or leuidaccessat, since gnulib doesn't support faccessat(,AT_SYMLINK_NOFOLLOW) and since access rights on symlinks are of limited utility. Likewise, wrappers are not provided for accessat or euidaccessat, so as to avoid dragging in -lgen on some platforms. */ #endif /* _GL_HEADER_OPENAT */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbtowc.c���������������������������������������������������������������0000664�0000000�0000000�00000001646�12166360012�013614� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert multibyte character to wide character. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <wchar.h> #include "mbtowc-impl.h" ������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/vasnprintf.h�����������������������������������������������������������0000664�0000000�0000000�00000005711�12166360012�014515� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* vsprintf with automatic memory allocation. Copyright (C) 2002-2004, 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include <stdarg.h> /* Get size_t. */ #include <stddef.h> /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ #if REPLACE_VASNPRINTF # define asnprintf rpl_asnprintf # define vasnprintf rpl_vasnprintf #endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ �������������������������������������������������������id-utils-4.6+git20120811/lib/asnprintf.c������������������������������������������������������������0000664�0000000�0000000�00000002157�12166360012�014323� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to strings. Copyright (C) 1999, 2002, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include "vasnprintf.h" #include <stdarg.h> char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; va_start (args, format); result = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return result; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/hash.h�����������������������������������������������������������������0000664�0000000�0000000�00000010401�12166360012�013236� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* hash - hashing table processing. Copyright (C) 1998-1999, 2001, 2003, 2009-2012 Free Software Foundation, Inc. Written by Jim Meyering <meyering@ascend.com>, 1998. 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 <http://www.gnu.org/licenses/>. */ /* A generic hash table package. */ /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use obstacks instead of malloc, and recompile 'hash.c' with same setting. */ #ifndef HASH_H_ # define HASH_H_ # include <stdio.h> # include <stdbool.h> /* The __attribute__ feature is available in gcc versions 2.5 and later. The warn_unused_result attribute appeared first in gcc-3.4.0. */ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) # else # define _GL_ATTRIBUTE_WUR /* empty */ # endif # ifndef _GL_ATTRIBUTE_DEPRECATED /* The __attribute__((__deprecated__)) feature is available in gcc versions 3.1 and newer. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) # define _GL_ATTRIBUTE_DEPRECATED /* empty */ # else # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) # endif # endif typedef size_t (*Hash_hasher) (const void *, size_t); typedef bool (*Hash_comparator) (const void *, const void *); typedef void (*Hash_data_freer) (void *); typedef bool (*Hash_processor) (void *, void *); struct hash_tuning { /* This structure is mainly used for 'hash_initialize', see the block documentation of 'hash_reset_tuning' for more complete comments. */ float shrink_threshold; /* ratio of used buckets to trigger a shrink */ float shrink_factor; /* ratio of new smaller size to original size */ float growth_threshold; /* ratio of used buckets to trigger a growth */ float growth_factor; /* ratio of new bigger size to original size */ bool is_n_buckets; /* if CANDIDATE really means table size */ }; typedef struct hash_tuning Hash_tuning; struct hash_table; typedef struct hash_table Hash_table; /* Information and lookup. */ size_t hash_get_n_buckets (const Hash_table *) _GL_ATTRIBUTE_PURE; size_t hash_get_n_buckets_used (const Hash_table *) _GL_ATTRIBUTE_PURE; size_t hash_get_n_entries (const Hash_table *) _GL_ATTRIBUTE_PURE; size_t hash_get_max_bucket_length (const Hash_table *) _GL_ATTRIBUTE_PURE; bool hash_table_ok (const Hash_table *) _GL_ATTRIBUTE_PURE; void hash_print_statistics (const Hash_table *, FILE *); void *hash_lookup (const Hash_table *, const void *); /* Walking. */ void *hash_get_first (const Hash_table *) _GL_ATTRIBUTE_PURE; void *hash_get_next (const Hash_table *, const void *); size_t hash_get_entries (const Hash_table *, void **, size_t); size_t hash_do_for_each (const Hash_table *, Hash_processor, void *); /* Allocation and clean-up. */ size_t hash_string (const char *, size_t) _GL_ATTRIBUTE_PURE; void hash_reset_tuning (Hash_tuning *); Hash_table *hash_initialize (size_t, const Hash_tuning *, Hash_hasher, Hash_comparator, Hash_data_freer) _GL_ATTRIBUTE_WUR; void hash_clear (Hash_table *); void hash_free (Hash_table *); /* Insertion and deletion. */ bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR; void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR; /* Deprecate this interface. It has been renamed to hash_insert_if_absent. */ int hash_insert0 (Hash_table *table, /* FIXME: remove in 2013 */ const void *entry, const void **matched_ent) _GL_ATTRIBUTE_DEPRECATED; int hash_insert_if_absent (Hash_table *table, const void *entry, const void **matched_ent); void *hash_delete (Hash_table *, const void *); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/msvc-nothrow.c���������������������������������������������������������0000664�0000000�0000000�00000002545�12166360012�014766� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include "msvc-nothrow.h" /* Get declarations of the native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include "msvc-inval.h" #undef _get_osfhandle #if HAVE_MSVC_INVALID_PARAMETER_HANDLER intptr_t _gl_nothrow_get_osfhandle (int fd) { intptr_t result; TRY_MSVC_INVAL { result = _get_osfhandle (fd); } CATCH_MSVC_INVAL { result = (intptr_t) INVALID_HANDLE_VALUE; } DONE_MSVC_INVAL; return result; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/freading.h�������������������������������������������������������������0000664�0000000�0000000�00000003600�12166360012�014075� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Retrieve information about a FILE stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <stdbool.h> #include <stdio.h> /* Return true if the stream STREAM is opened read-only, or if the last operation on the stream was a read operation. Return false if the stream is opened write-only or append-only, or if it supports writing and there is no current read operation (such as fgetc). freading and fwriting will never both be true. If STREAM supports both reads and writes, then: - both freading and fwriting might be false when the stream is first opened, after read encounters EOF, or after fflush, - freading might be false or true and fwriting might be false after repositioning (such as fseek, fsetpos, or rewind), depending on the underlying implementation. STREAM must not be wide-character oriented. */ #if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) /* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7 */ # include <stdio_ext.h> # define freading(stream) (__freading (stream) != 0) #else # ifdef __cplusplus extern "C" { # endif extern bool freading (FILE *stream); # ifdef __cplusplus } # endif #endif ��������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/gnulib.mk��������������������������������������������������������������0000664�0000000�0000000�00000267260�12166360012�013774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file 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 file 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 file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=get-rusage-as-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt announce-gen argv-iter autobuild calloc closeout dirname do-release-commit-and-tag error exclude exitfail extensions fflush fnmatch fnmatch-gnu fopen fpending fprintf-posix freopen getcwd getopt-gnu gettext-h git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update gnumakefile gnupload havelib ignore-value inttostr lstat maintainer-makefile malloc manywarnings mbchar mbuiter mempcpy obstack pathmax perl posix-shell printf-posix progname quote quotearg readme-release realloc regex sprintf-posix stat-macros stdbool strcase strcasestr strnlen1 strsep sys_ioctl update-copyright useless-if-before-free vc-list-files warnings xalloc xalloc-die xgetcwd MOSTLYCLEANFILES += core *.stackdump noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = ## begin gnulib module alloca libgnu_a_LIBADD += @ALLOCA@ libgnu_a_DEPENDENCIES += @ALLOCA@ EXTRA_DIST += alloca.c EXTRA_libgnu_a_SOURCES += alloca.c ## end gnulib module alloca ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create <alloca.h> when the system # doesn't have one that works with the given compiler. if GL_GENERATE_ALLOCA_H alloca.h: alloca.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module announce-gen EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen ## end gnulib module announce-gen ## begin gnulib module argv-iter libgnu_a_SOURCES += argv-iter.c argv-iter.h ## end gnulib module argv-iter ## begin gnulib module at-internal EXTRA_DIST += openat-priv.h openat-proc.c EXTRA_libgnu_a_SOURCES += openat-proc.c ## end gnulib module at-internal ## begin gnulib module bitrotate libgnu_a_SOURCES += bitrotate.h ## end gnulib module bitrotate ## begin gnulib module btowc EXTRA_DIST += btowc.c EXTRA_libgnu_a_SOURCES += btowc.c ## end gnulib module btowc ## begin gnulib module c-ctype libgnu_a_SOURCES += c-ctype.h c-ctype.c ## end gnulib module c-ctype ## begin gnulib module c-strcase libgnu_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c ## end gnulib module c-strcase ## begin gnulib module c-strcaseeq EXTRA_DIST += c-strcaseeq.h ## end gnulib module c-strcaseeq ## begin gnulib module calloc-gnu EXTRA_DIST += calloc.c EXTRA_libgnu_a_SOURCES += calloc.c ## end gnulib module calloc-gnu ## begin gnulib module calloc-posix EXTRA_DIST += calloc.c EXTRA_libgnu_a_SOURCES += calloc.c ## end gnulib module calloc-posix ## begin gnulib module chdir-long EXTRA_DIST += chdir-long.c chdir-long.h EXTRA_libgnu_a_SOURCES += chdir-long.c ## end gnulib module chdir-long ## begin gnulib module cloexec libgnu_a_SOURCES += cloexec.c EXTRA_DIST += cloexec.h ## end gnulib module cloexec ## begin gnulib module close EXTRA_DIST += close.c EXTRA_libgnu_a_SOURCES += close.c ## end gnulib module close ## begin gnulib module close-stream libgnu_a_SOURCES += close-stream.c EXTRA_DIST += close-stream.h ## end gnulib module close-stream ## begin gnulib module closedir EXTRA_DIST += closedir.c dirent-private.h EXTRA_libgnu_a_SOURCES += closedir.c ## end gnulib module closedir ## begin gnulib module closeout libgnu_a_SOURCES += closeout.c EXTRA_DIST += closeout.h ## end gnulib module closeout ## begin gnulib module configmake # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t mv -f $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t ## end gnulib module configmake ## begin gnulib module dirent BUILT_SOURCES += dirent.h # We need the following in order to create <dirent.h> when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/dirent.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += dirent.h dirent.h-t EXTRA_DIST += dirent.in.h ## end gnulib module dirent ## begin gnulib module dirfd EXTRA_DIST += dirfd.c EXTRA_libgnu_a_SOURCES += dirfd.c ## end gnulib module dirfd ## begin gnulib module dirname libgnu_a_SOURCES += dirname.c basename.c EXTRA_DIST += stripslash.c EXTRA_libgnu_a_SOURCES += stripslash.c ## end gnulib module dirname ## begin gnulib module dirname-lgpl libgnu_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c EXTRA_DIST += dirname.h ## end gnulib module dirname-lgpl ## begin gnulib module do-release-commit-and-tag EXTRA_DIST += $(top_srcdir)/build-aux/do-release-commit-and-tag ## end gnulib module do-release-commit-and-tag ## begin gnulib module dosname EXTRA_DIST += dosname.h ## end gnulib module dosname ## begin gnulib module dup EXTRA_DIST += dup.c EXTRA_libgnu_a_SOURCES += dup.c ## end gnulib module dup ## begin gnulib module dup2 EXTRA_DIST += dup2.c EXTRA_libgnu_a_SOURCES += dup2.c ## end gnulib module dup2 ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create <errno.h> when the system # doesn't have one that is POSIX compliant. if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module error EXTRA_DIST += error.c error.h EXTRA_libgnu_a_SOURCES += error.c ## end gnulib module error ## begin gnulib module exclude libgnu_a_SOURCES += exclude.c EXTRA_DIST += exclude.h ## end gnulib module exclude ## begin gnulib module exitfail libgnu_a_SOURCES += exitfail.c EXTRA_DIST += exitfail.h ## end gnulib module exitfail ## begin gnulib module fchdir EXTRA_DIST += fchdir.c EXTRA_libgnu_a_SOURCES += fchdir.c ## end gnulib module fchdir ## begin gnulib module fcntl EXTRA_DIST += fcntl.c EXTRA_libgnu_a_SOURCES += fcntl.c ## end gnulib module fcntl ## begin gnulib module fcntl-h BUILT_SOURCES += fcntl.h # We need the following in order to create <fcntl.h> when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h ## end gnulib module fcntl-h ## begin gnulib module fd-hook libgnu_a_SOURCES += fd-hook.c EXTRA_DIST += fd-hook.h ## end gnulib module fd-hook ## begin gnulib module fdopendir EXTRA_DIST += fdopendir.c EXTRA_libgnu_a_SOURCES += fdopendir.c ## end gnulib module fdopendir ## begin gnulib module fflush EXTRA_DIST += fflush.c stdio-impl.h EXTRA_libgnu_a_SOURCES += fflush.c ## end gnulib module fflush ## begin gnulib module filename EXTRA_DIST += filename.h ## end gnulib module filename ## begin gnulib module filenamecat-lgpl libgnu_a_SOURCES += filenamecat-lgpl.c EXTRA_DIST += filenamecat.h ## end gnulib module filenamecat-lgpl ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create <float.h> when the system # doesn't have one that works with the given compiler. if GL_GENERATE_FLOAT_H float.h: float.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ else float.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += float.h float.h-t EXTRA_DIST += float.c float.in.h itold.c EXTRA_libgnu_a_SOURCES += float.c itold.c ## end gnulib module float ## begin gnulib module fnmatch BUILT_SOURCES += $(FNMATCH_H) # We need the following in order to create <fnmatch.h> when the system # doesn't have one that supports the required API. if GL_GENERATE_FNMATCH_H fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/fnmatch.in.h; \ } > $@-t && \ mv -f $@-t $@ else fnmatch.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c ## end gnulib module fnmatch ## begin gnulib module fopen EXTRA_DIST += fopen.c EXTRA_libgnu_a_SOURCES += fopen.c ## end gnulib module fopen ## begin gnulib module fpending EXTRA_DIST += fpending.c fpending.h EXTRA_libgnu_a_SOURCES += fpending.c ## end gnulib module fpending ## begin gnulib module fprintf-posix EXTRA_DIST += fprintf.c EXTRA_libgnu_a_SOURCES += fprintf.c ## end gnulib module fprintf-posix ## begin gnulib module fpucw EXTRA_DIST += fpucw.h ## end gnulib module fpucw ## begin gnulib module fpurge EXTRA_DIST += fpurge.c stdio-impl.h EXTRA_libgnu_a_SOURCES += fpurge.c ## end gnulib module fpurge ## begin gnulib module freading libgnu_a_SOURCES += freading.c EXTRA_DIST += freading.h stdio-impl.h ## end gnulib module freading ## begin gnulib module freopen EXTRA_DIST += freopen.c EXTRA_libgnu_a_SOURCES += freopen.c ## end gnulib module freopen ## begin gnulib module frexp-nolibm EXTRA_DIST += frexp.c EXTRA_libgnu_a_SOURCES += frexp.c ## end gnulib module frexp-nolibm ## begin gnulib module frexpl-nolibm EXTRA_DIST += frexp.c frexpl.c EXTRA_libgnu_a_SOURCES += frexp.c frexpl.c ## end gnulib module frexpl-nolibm ## begin gnulib module fseek EXTRA_DIST += fseek.c EXTRA_libgnu_a_SOURCES += fseek.c ## end gnulib module fseek ## begin gnulib module fseeko EXTRA_DIST += fseeko.c stdio-impl.h EXTRA_libgnu_a_SOURCES += fseeko.c ## end gnulib module fseeko ## begin gnulib module fseterr libgnu_a_SOURCES += fseterr.c EXTRA_DIST += fseterr.h stdio-impl.h ## end gnulib module fseterr ## begin gnulib module fstat EXTRA_DIST += fstat.c EXTRA_libgnu_a_SOURCES += fstat.c ## end gnulib module fstat ## begin gnulib module fstatat EXTRA_DIST += at-func.c fstatat.c openat-priv.h EXTRA_libgnu_a_SOURCES += at-func.c fstatat.c ## end gnulib module fstatat ## begin gnulib module ftell EXTRA_DIST += ftell.c EXTRA_libgnu_a_SOURCES += ftell.c ## end gnulib module ftell ## begin gnulib module ftello EXTRA_DIST += ftello.c stdio-impl.h EXTRA_libgnu_a_SOURCES += ftello.c ## end gnulib module ftello ## begin gnulib module gendocs EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh ## end gnulib module gendocs ## begin gnulib module getcwd EXTRA_DIST += getcwd.c EXTRA_libgnu_a_SOURCES += getcwd.c ## end gnulib module getcwd ## begin gnulib module getcwd-lgpl EXTRA_DIST += getcwd-lgpl.c EXTRA_libgnu_a_SOURCES += getcwd-lgpl.c ## end gnulib module getcwd-lgpl ## begin gnulib module getdelim EXTRA_DIST += getdelim.c EXTRA_libgnu_a_SOURCES += getdelim.c ## end gnulib module getdelim ## begin gnulib module getdtablesize EXTRA_DIST += getdtablesize.c EXTRA_libgnu_a_SOURCES += getdtablesize.c ## end gnulib module getdtablesize ## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) # We need the following in order to create <getopt.h> when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c ## end gnulib module getopt-posix ## begin gnulib module gettext-h libgnu_a_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module git-version-gen EXTRA_DIST += $(top_srcdir)/build-aux/git-version-gen ## end gnulib module git-version-gen ## begin gnulib module gitlog-to-changelog EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog ## end gnulib module gitlog-to-changelog ## begin gnulib module gnu-make ##Sample usage of gnu-make module: #if GNU_MAKE # [nicer features that work only with GNU Make] #else # [fallback features that work in any 'make' implementation; see # http://www.opengroup.org/susv3/utilities/make.html # for the 2004 POSIX specification] #endif ## end gnulib module gnu-make ## begin gnulib module gnu-web-doc-update EXTRA_DIST += $(top_srcdir)/build-aux/gnu-web-doc-update ## end gnulib module gnu-web-doc-update ## begin gnulib module gnumakefile distclean-local: clean-GNUmakefile clean-GNUmakefile: test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || : EXTRA_DIST += $(top_srcdir)/GNUmakefile ## end gnulib module gnumakefile ## begin gnulib module gnupload EXTRA_DIST += $(top_srcdir)/build-aux/gnupload ## end gnulib module gnupload ## begin gnulib module hash libgnu_a_SOURCES += hash.c EXTRA_DIST += hash.h ## end gnulib module hash ## begin gnulib module havelib EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath ## end gnulib module havelib ## begin gnulib module ignore-value EXTRA_DIST += ignore-value.h ## end gnulib module ignore-value ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module inttostr libgnu_a_SOURCES += \ imaxtostr.c \ inttostr.c \ offtostr.c \ uinttostr.c \ umaxtostr.c EXTRA_DIST += anytostr.c inttostr.h EXTRA_libgnu_a_SOURCES += anytostr.c ## end gnulib module inttostr ## begin gnulib module isnand-nolibm EXTRA_DIST += float+.h isnan.c isnand-nolibm.h isnand.c EXTRA_libgnu_a_SOURCES += isnan.c isnand.c ## end gnulib module isnand-nolibm ## begin gnulib module isnanf-nolibm EXTRA_DIST += float+.h isnan.c isnanf-nolibm.h isnanf.c EXTRA_libgnu_a_SOURCES += isnan.c isnanf.c ## end gnulib module isnanf-nolibm ## begin gnulib module isnanl-nolibm EXTRA_DIST += float+.h isnan.c isnanl-nolibm.h isnanl.c EXTRA_libgnu_a_SOURCES += isnan.c isnanl.c ## end gnulib module isnanl-nolibm ## begin gnulib module iswblank EXTRA_DIST += iswblank.c EXTRA_libgnu_a_SOURCES += iswblank.c ## end gnulib module iswblank ## begin gnulib module langinfo BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # <langinfo.h> when the system doesn't have one. langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t EXTRA_DIST += langinfo.in.h ## end gnulib module langinfo ## begin gnulib module localcharset libgnu_a_SOURCES += localcharset.h localcharset.c # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ SUFFIXES += .sed .sin .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ CLEANFILES += charset.alias ref-add.sed ref-del.sed EXTRA_DIST += config.charset ref-add.sin ref-del.sin ## end gnulib module localcharset ## begin gnulib module lseek EXTRA_DIST += lseek.c EXTRA_libgnu_a_SOURCES += lseek.c ## end gnulib module lseek ## begin gnulib module lstat EXTRA_DIST += lstat.c EXTRA_libgnu_a_SOURCES += lstat.c ## end gnulib module lstat ## begin gnulib module maintainer-makefile EXTRA_DIST += $(top_srcdir)/maint.mk ## end gnulib module maintainer-makefile ## begin gnulib module malloc-gnu EXTRA_DIST += malloc.c EXTRA_libgnu_a_SOURCES += malloc.c ## end gnulib module malloc-gnu ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libgnu_a_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module math BUILT_SOURCES += math.h # We need the following in order to create <math.h> when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ < $(srcdir)/math.in.h | \ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += math.h math.h-t EXTRA_DIST += math.in.h ## end gnulib module math ## begin gnulib module mbchar libgnu_a_SOURCES += mbchar.c EXTRA_DIST += mbchar.h ## end gnulib module mbchar ## begin gnulib module mbrtowc EXTRA_DIST += mbrtowc.c EXTRA_libgnu_a_SOURCES += mbrtowc.c ## end gnulib module mbrtowc ## begin gnulib module mbscasecmp libgnu_a_SOURCES += mbscasecmp.c ## end gnulib module mbscasecmp ## begin gnulib module mbsinit EXTRA_DIST += mbsinit.c EXTRA_libgnu_a_SOURCES += mbsinit.c ## end gnulib module mbsinit ## begin gnulib module mbsrtowcs EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c EXTRA_libgnu_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c ## end gnulib module mbsrtowcs ## begin gnulib module mbtowc EXTRA_DIST += mbtowc-impl.h mbtowc.c EXTRA_libgnu_a_SOURCES += mbtowc.c ## end gnulib module mbtowc ## begin gnulib module mbuiter libgnu_a_SOURCES += mbuiter.h ## end gnulib module mbuiter ## begin gnulib module memchr EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libgnu_a_SOURCES += memchr.c ## end gnulib module memchr ## begin gnulib module mempcpy EXTRA_DIST += mempcpy.c EXTRA_libgnu_a_SOURCES += mempcpy.c ## end gnulib module mempcpy ## begin gnulib module memrchr EXTRA_DIST += memrchr.c EXTRA_libgnu_a_SOURCES += memrchr.c ## end gnulib module memrchr ## begin gnulib module msvc-inval EXTRA_DIST += msvc-inval.c msvc-inval.h EXTRA_libgnu_a_SOURCES += msvc-inval.c ## end gnulib module msvc-inval ## begin gnulib module msvc-nothrow EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h EXTRA_libgnu_a_SOURCES += msvc-nothrow.c ## end gnulib module msvc-nothrow ## begin gnulib module nl_langinfo EXTRA_DIST += nl_langinfo.c EXTRA_libgnu_a_SOURCES += nl_langinfo.c ## end gnulib module nl_langinfo ## begin gnulib module obstack EXTRA_DIST += obstack.c obstack.h EXTRA_libgnu_a_SOURCES += obstack.c ## end gnulib module obstack ## begin gnulib module open EXTRA_DIST += open.c EXTRA_libgnu_a_SOURCES += open.c ## end gnulib module open ## begin gnulib module openat EXTRA_DIST += openat-priv.h openat.c EXTRA_libgnu_a_SOURCES += openat.c ## end gnulib module openat ## begin gnulib module openat-die libgnu_a_SOURCES += openat-die.c ## end gnulib module openat-die ## begin gnulib module openat-h EXTRA_DIST += openat.h ## end gnulib module openat-h ## begin gnulib module opendir EXTRA_DIST += dirent-private.h opendir.c EXTRA_libgnu_a_SOURCES += opendir.c ## end gnulib module opendir ## begin gnulib module pathmax EXTRA_DIST += pathmax.h ## end gnulib module pathmax ## begin gnulib module posix-shell ##Sample usage of posix-shell module: #script: script.in # rm -f $@-t $@ # sed -e 's#@''PREFERABLY_POSIX_SHELL''@#$(PREFERABLY_POSIX_SHELL)#g' \ # -e 's#@''POSIX_SHELL''@#$(POSIX_SHELL)#g' \ # -e $(srcdir)/$@.in >$@-t # chmod a+x $@-t # mv $@-t $@ #EXTRA_DIST += script.in #MOSTLYCLEANFILES += script script-t ## end gnulib module posix-shell ## begin gnulib module printf-frexp libgnu_a_SOURCES += printf-frexp.c EXTRA_DIST += printf-frexp.h ## end gnulib module printf-frexp ## begin gnulib module printf-frexpl libgnu_a_SOURCES += printf-frexpl.c EXTRA_DIST += printf-frexp.c printf-frexpl.h EXTRA_libgnu_a_SOURCES += printf-frexp.c ## end gnulib module printf-frexpl ## begin gnulib module printf-posix EXTRA_DIST += printf.c EXTRA_libgnu_a_SOURCES += printf.c ## end gnulib module printf-posix ## begin gnulib module progname libgnu_a_SOURCES += progname.h progname.c ## end gnulib module progname ## begin gnulib module quote libgnu_a_SOURCES += quote.c EXTRA_DIST += quote.h ## end gnulib module quote ## begin gnulib module quotearg libgnu_a_SOURCES += quotearg.c EXTRA_DIST += quotearg.h ## end gnulib module quotearg ## begin gnulib module readdir EXTRA_DIST += dirent-private.h readdir.c EXTRA_libgnu_a_SOURCES += readdir.c ## end gnulib module readdir ## begin gnulib module readme-release EXTRA_DIST += $(top_srcdir)/README-release ## end gnulib module readme-release ## begin gnulib module realloc-gnu EXTRA_DIST += realloc.c EXTRA_libgnu_a_SOURCES += realloc.c ## end gnulib module realloc-gnu ## begin gnulib module realloc-posix EXTRA_DIST += realloc.c EXTRA_libgnu_a_SOURCES += realloc.c ## end gnulib module realloc-posix ## begin gnulib module regex EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c ## end gnulib module regex ## begin gnulib module rewinddir EXTRA_DIST += dirent-private.h rewinddir.c EXTRA_libgnu_a_SOURCES += rewinddir.c ## end gnulib module rewinddir ## begin gnulib module save-cwd libgnu_a_SOURCES += save-cwd.c EXTRA_DIST += save-cwd.h ## end gnulib module save-cwd ## begin gnulib module signbit EXTRA_DIST += float+.h signbitd.c signbitf.c signbitl.c EXTRA_libgnu_a_SOURCES += signbitd.c signbitf.c signbitl.c ## end gnulib module signbit ## begin gnulib module size_max libgnu_a_SOURCES += size_max.h ## end gnulib module size_max ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += c++defs.h # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += c++defs.h c++defs.h-t CXXDEFS_H=c++defs.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h ## end gnulib module snippet/warn-on-use ## begin gnulib module sprintf-posix EXTRA_DIST += sprintf.c EXTRA_libgnu_a_SOURCES += sprintf.c ## end gnulib module sprintf-posix ## begin gnulib module stat EXTRA_DIST += stat.c EXTRA_libgnu_a_SOURCES += stat.c ## end gnulib module stat ## begin gnulib module stat-macros EXTRA_DIST += stat-macros.h ## end gnulib module stat-macros ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create <stdbool.h> when the system # doesn't have one that works. if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create <stddef.h> when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create <stdint.h> when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdio BUILT_SOURCES += stdio.h # We need the following in order to create <stdio.h> when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio.in.h ## end gnulib module stdio ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create <stdlib.h> when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module strcase EXTRA_DIST += strcasecmp.c strncasecmp.c EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c ## end gnulib module strcase ## begin gnulib module strcasestr-simple EXTRA_DIST += str-two-way.h strcasestr.c EXTRA_libgnu_a_SOURCES += strcasestr.c ## end gnulib module strcasestr-simple ## begin gnulib module strdup-posix EXTRA_DIST += strdup.c EXTRA_libgnu_a_SOURCES += strdup.c ## end gnulib module strdup-posix ## begin gnulib module streq EXTRA_DIST += streq.h ## end gnulib module streq ## begin gnulib module strerror EXTRA_DIST += strerror.c EXTRA_libgnu_a_SOURCES += strerror.c ## end gnulib module strerror ## begin gnulib module strerror-override EXTRA_DIST += strerror-override.c strerror-override.h EXTRA_libgnu_a_SOURCES += strerror-override.c ## end gnulib module strerror-override ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create <string.h> when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strings BUILT_SOURCES += strings.h # We need the following in order to create <strings.h> when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t EXTRA_DIST += strings.in.h ## end gnulib module strings ## begin gnulib module strndup EXTRA_DIST += strndup.c EXTRA_libgnu_a_SOURCES += strndup.c ## end gnulib module strndup ## begin gnulib module strnlen EXTRA_DIST += strnlen.c EXTRA_libgnu_a_SOURCES += strnlen.c ## end gnulib module strnlen ## begin gnulib module strnlen1 libgnu_a_SOURCES += strnlen1.h strnlen1.c ## end gnulib module strnlen1 ## begin gnulib module strsep EXTRA_DIST += strsep.c EXTRA_libgnu_a_SOURCES += strsep.c ## end gnulib module strsep ## begin gnulib module sys_ioctl BUILT_SOURCES += sys/ioctl.h # We need the following in order to create <sys/ioctl.h> when the system # does not have a complete one. sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_ioctl.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_ioctl.in.h ## end gnulib module sys_ioctl ## begin gnulib module sys_stat BUILT_SOURCES += sys/stat.h # We need the following in order to create <sys/stat.h> when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module sys_types BUILT_SOURCES += sys/types.h # We need the following in order to create <sys/types.h> when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/types.h sys/types.h-t EXTRA_DIST += sys_types.in.h ## end gnulib module sys_types ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create <time.h> when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module unistd-safer libgnu_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c EXTRA_DIST += unistd--.h unistd-safer.h ## end gnulib module unistd-safer ## begin gnulib module unitypes BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) unitypes.h: unitypes.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unitypes.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unitypes.h unitypes.h-t EXTRA_DIST += unitypes.in.h ## end gnulib module unitypes ## begin gnulib module uniwidth/base BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H) uniwidth.h: uniwidth.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uniwidth.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t EXTRA_DIST += localcharset.h uniwidth.in.h ## end gnulib module uniwidth/base ## begin gnulib module uniwidth/width if LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH libgnu_a_SOURCES += uniwidth/width.c endif EXTRA_DIST += uniwidth/cjk.h ## end gnulib module uniwidth/width ## begin gnulib module update-copyright EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright ## end gnulib module update-copyright ## begin gnulib module useless-if-before-free EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free ## end gnulib module useless-if-before-free ## begin gnulib module vasnprintf EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf ## begin gnulib module vc-list-files EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files ## end gnulib module vc-list-files ## begin gnulib module verify EXTRA_DIST += verify.h ## end gnulib module verify ## begin gnulib module vfprintf-posix EXTRA_DIST += vfprintf.c EXTRA_libgnu_a_SOURCES += vfprintf.c ## end gnulib module vfprintf-posix ## begin gnulib module wchar BUILT_SOURCES += wchar.h # We need the following in order to create <wchar.h> when the system # version does not work standalone. wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module wcrtomb EXTRA_DIST += wcrtomb.c EXTRA_libgnu_a_SOURCES += wcrtomb.c ## end gnulib module wcrtomb ## begin gnulib module wctype-h BUILT_SOURCES += wctype.h # We need the following in order to create <wctype.h> when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h ## end gnulib module wctype-h ## begin gnulib module wcwidth EXTRA_DIST += wcwidth.c EXTRA_libgnu_a_SOURCES += wcwidth.c ## end gnulib module wcwidth ## begin gnulib module xalloc libgnu_a_SOURCES += xmalloc.c EXTRA_DIST += xalloc.h ## end gnulib module xalloc ## begin gnulib module xalloc-die libgnu_a_SOURCES += xalloc-die.c ## end gnulib module xalloc-die ## begin gnulib module xalloc-oversized EXTRA_DIST += xalloc-oversized.h ## end gnulib module xalloc-oversized ## begin gnulib module xgetcwd libgnu_a_SOURCES += xgetcwd.c EXTRA_DIST += xgetcwd.h ## end gnulib module xgetcwd ## begin gnulib module xsize libgnu_a_SOURCES += xsize.h ## end gnulib module xsize ## begin gnulib module xstrndup libgnu_a_SOURCES += xstrndup.h xstrndup.c ## end gnulib module xstrndup mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/isnanf.c���������������������������������������������������������������0000664�0000000�0000000�00000001517�12166360012�013574� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #define USE_FLOAT #include "isnan.c" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/readdir.c��������������������������������������������������������������0000664�0000000�0000000�00000005676�12166360012�013742� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Read the next entry of a directory. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <dirent.h> #include <errno.h> #include <stddef.h> #include "dirent-private.h" struct dirent * readdir (DIR *dirp) { char type; struct dirent *result; /* There is no need to add code to produce entries for "." and "..". According to the POSIX:2008 section "4.12 Pathname Resolution" <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html> "." and ".." are syntactic entities. POSIX also says: "If entries for dot or dot-dot exist, one entry shall be returned for dot and one entry shall be returned for dot-dot; otherwise, they shall not be returned." */ switch (dirp->status) { case -2: /* End of directory already reached. */ return NULL; case -1: break; case 0: if (!FindNextFile (dirp->current, &dirp->entry)) { switch (GetLastError ()) { case ERROR_NO_MORE_FILES: dirp->status = -2; return NULL; default: errno = EIO; return NULL; } } break; default: errno = dirp->status; return NULL; } dirp->status = 0; if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) type = DT_DIR; else if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) type = DT_LNK; else if ((dirp->entry.dwFileAttributes & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_TEMPORARY | FILE_ATTRIBUTE_SPARSE_FILE | FILE_ATTRIBUTE_COMPRESSED | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | FILE_ATTRIBUTE_ENCRYPTED)) == 0) /* Devices like COM1, LPT1, NUL would also have the attributes 0x20 but they cannot occur here. */ type = DT_REG; else type = DT_UNKNOWN; /* Reuse the memory of dirp->entry for the result. */ result = (struct dirent *) ((char *) dirp->entry.cFileName - offsetof (struct dirent, d_name[0])); result->d_type = type; return result; } ������������������������������������������������������������������id-utils-4.6+git20120811/lib/memchr.c���������������������������������������������������������������0000664�0000000�0000000�00000013346�12166360012�013574� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _LIBC # include <config.h> #endif #include <string.h> #include <stddef.h> #if defined _LIBC # include <memcopy.h> #else # define reg_char char #endif #include <limits.h> #if HAVE_BP_SYM_H || defined _LIBC # include <bp-sym.h> #else # define BP_SYM(sym) sym #endif #undef __memchr #ifdef _LIBC # undef memchr #endif #ifndef weak_alias # define __memchr memchr #endif /* Search no more than N bytes of S for C. */ void * __memchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n, ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stdint.in.h������������������������������������������������������������0000664�0000000�0000000�00000043716�12166360012�014244� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * ISO C 99 <stdint.h> for platforms that lack it. * <http://www.opengroup.org/susv3xbd/stdint.h.html> */ #ifndef _@GUARD_PREFIX@_STDINT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* When including a system file that in turn includes <inttypes.h>, use the system <inttypes.h>, not our substitute. This avoids problems with (for example) VMS, whose <sys/bitypes.h> includes <inttypes.h>. */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* On Android (Bionic libc), <sys/types.h> includes this file before having defined 'time_t'. Therefore in this case avoid including other system header files; just include the system's <stdint.h>. Ideally we should test __BIONIC__ here, but it is only defined after <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */ #if defined __ANDROID__ \ && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_ # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #else /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Some pre-C++11 <stdint.h> implementations need this. */ # ifdef __cplusplus # ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS 1 # endif # ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 # endif # endif /* Other systems may have an incomplete or buggy <stdint.h>. Include it before <inttypes.h>, since any "#include <stdint.h>" in <inttypes.h> would reinclude us, skipping our contents because _@GUARD_PREFIX@_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _@GUARD_PREFIX@_STDINT_H /* <sys/types.h> defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). AIX 5.2 <sys/types.h> isn't needed and causes troubles. MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but relies on the system <stdint.h> definitions, so include <sys/types.h> after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include <sys/types.h> #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include <limits.h> #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. <inttypes.h> also defines intptr_t and uintptr_t. */ # include <inttypes.h> #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include <sys/inttypes.h> #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by <sys/types.h>. */ # include <sys/bitypes.h> #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for an integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* If the system defines INT64_MAX, assume int64_t works. That way, if the underlying platform defines int64_t to be a 64-bit long long int, the code below won't mistakenly define it to be a 64-bit long int, which would mess up C++ name mangling. We must use #ifdef rather than #if, to avoid an error with HP-UX 10.20 cc. */ #ifdef INT64_MAX # define GL_INT64_T #else /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ # if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # endif #endif #ifdef UINT64_MAX # define GL_UINT64_T #else # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # endif #endif /* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other <stdint.h> substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ /* If the system defines INTMAX_MAX, assume that intmax_t works, and similarly for UINTMAX_MAX and uintmax_t. This avoids problems with assuming one type where another is used by the system. */ #ifndef INTMAX_MAX # undef INTMAX_C # undef intmax_t # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t # elif defined GL_INT64_T # define intmax_t int64_t # else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t # endif #endif #ifndef UINTMAX_MAX # undef UINTMAX_C # undef uintmax_t # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t # elif defined GL_UINT64_T # define uintmax_t uint64_t # else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t # endif #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) ? 1 : -1]; #define GNULIB_defined_stdint_types 1 #endif /* !GNULIB_defined_stdint_types */ /* 7.18.2. Limits of specified-width integer types */ /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #if defined GL_INT64_T && ! defined INT64_MAX /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #if defined GL_UINT64_T && ! defined UINT64_MAX # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #ifndef INTMAX_MAX # undef INTMAX_MIN # ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX # else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX # endif #endif #ifndef UINTMAX_MAX # ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX # else # define UINTMAX_MAX UINT32_MAX # endif #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes <stdint.h> and assumes its types are already defined. */ #if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included before <wchar.h>. */ # include <stddef.h> # include <stdio.h> # include <time.h> # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include <wchar.h> # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) /* 7.18.4. Macros for integer constants */ /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #ifndef INTMAX_C # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL # elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) # else # define INTMAX_C(x) x##L # endif #endif #ifndef UINTMAX_C # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL # elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) # else # define UINTMAX_C(x) x##UL # endif #endif #endif /* _@GUARD_PREFIX@_STDINT_H */ #endif /* !(defined __ANDROID__ && ...) */ #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ ��������������������������������������������������id-utils-4.6+git20120811/lib/stdbool.in.h�����������������������������������������������������������0000664�0000000�0000000�00000011660�12166360012�014376� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 <stdbool.h> for platforms that lack it. */ /* Usage suggestions: Programs that use <stdbool.h> should be aware of some limitations and standards compliance issues. Standards compliance: - <stdbool.h> must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - <stdbool.h> must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. - C99 allows the use of (_Bool)0.0 in constant expressions, but this substitute cannot always provide this property. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include <OS.h> /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if <stdbool.h> was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ ��������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fpucw.h����������������������������������������������������������������0000664�0000000�0000000�00000011006�12166360012�013441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Manipulating the FPU control word. Copyright (C) 2007-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. 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 <http://www.gnu.org/licenses/>. */ #ifndef _FPUCW_H #define _FPUCW_H /* The i386 floating point hardware (the 387 compatible FPU, not the modern SSE/SSE2 hardware) has a controllable rounding precision. It is specified through the 'PC' bits in the FPU control word ('fctrl' register). (See the GNU libc i386 <fpu_control.h> header for details.) On some platforms, such as Linux or Solaris, the default precision setting is set to "extended precision". This means that 'long double' instructions operate correctly, but 'double' computations often produce slightly different results as on strictly IEEE 754 conforming systems. On some platforms, such as NetBSD, the default precision is set to "double precision". This means that 'long double' instructions will operate only as 'double', i.e. lead wrong results. The FPU control word is under control of the application, i.e. it is not required to be set either way by the ABI. (In fact, the i386 ABI http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 is not clear about it. But in any case, gcc treats the control word like a "preserved" register: it emits code that assumes that the control word is preserved across calls, and it restores the control word at the end of functions that modify it.) See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html for a good explanation. See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for some argumentation which setting should be the default. */ /* This header file provides the following facilities: fpucw_t integral type holding the value of 'fctrl' FPU_PC_MASK bit mask denoting the precision control FPU_PC_DOUBLE precision control for 53 bits mantissa FPU_PC_EXTENDED precision control for 64 bits mantissa GET_FPUCW () yields the current FPU control word SET_FPUCW (word) sets the FPU control word DECL_LONG_DOUBLE_ROUNDING variable declaration for BEGIN/END_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with 'long double' safe operation precision END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with 'long double' safe operation precision */ /* Inline assembler like this works only with GNU C. */ #if (defined __i386__ || defined __x86_64__) && defined __GNUC__ typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */ # define FPU_PC_MASK 0x0300 # define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */ # define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */ # define GET_FPUCW() \ ({ fpucw_t _cw; \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \ _cw; \ }) # define SET_FPUCW(word) \ (void)({ fpucw_t _ncw = (word); \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \ }) # define DECL_LONG_DOUBLE_ROUNDING \ fpucw_t oldcw; # define BEGIN_LONG_DOUBLE_ROUNDING() \ (void)(oldcw = GET_FPUCW (), \ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED)) # define END_LONG_DOUBLE_ROUNDING() \ SET_FPUCW (oldcw) #else typedef unsigned int fpucw_t; # define FPU_PC_MASK 0 # define FPU_PC_DOUBLE 0 # define FPU_PC_EXTENDED 0 # define GET_FPUCW() 0 # define SET_FPUCW(word) (void)(word) # define DECL_LONG_DOUBLE_ROUNDING # define BEGIN_LONG_DOUBLE_ROUNDING() # define END_LONG_DOUBLE_ROUNDING() #endif #endif /* _FPUCW_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/progname.c�������������������������������������������������������������0000664�0000000�0000000�00000006150�12166360012�014124� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Program name management. Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ #include "progname.h" #include <errno.h> /* get program_invocation_name declaration */ #include <stdio.h> #include <stdlib.h> #include <string.h> /* String containing name the program is called with. To be initialized by main(). */ const char *program_name = NULL; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ void set_program_name (const char *argv0) { /* libtool creates a temporary executable whose name is sometimes prefixed with "lt-" (depends on the platform). It also makes argv[0] absolute. But the name of the temporary executable is a detail that should not be visible to the end user and to the test suite. Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */ const char *slash; const char *base; /* Sanity check. POSIX requires the invoking process to pass a non-NULL argv[0]. */ if (argv0 == NULL) { /* It's a bug in the invoking program. Help diagnosing it. */ fputs ("A NULL argv[0] was passed through an exec system call.\n", stderr); abort (); } slash = strrchr (argv0, '/'); base = (slash != NULL ? slash + 1 : argv0); if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) { argv0 = base; if (strncmp (base, "lt-", 3) == 0) { argv0 = base + 3; /* On glibc systems, remove the "lt-" prefix from the variable program_invocation_short_name. */ #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME program_invocation_short_name = (char *) argv0; #endif } } /* But don't strip off a leading <dirname>/ in general, because when the user runs /some/hidden/place/bin/cp foo foo he should get the error message /some/hidden/place/bin/cp: `foo' and `foo' are the same file not cp: `foo' and `foo' are the same file */ program_name = argv0; /* On glibc systems, the error() function comes from libc and uses the variable program_invocation_name, not program_name. So set this variable as well. */ #if HAVE_DECL_PROGRAM_INVOCATION_NAME program_invocation_name = (char *) argv0; #endif } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/error.c����������������������������������������������������������������0000664�0000000�0000000�00000024106�12166360012�013446� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Error handler for noninteractive utilities Copyright (C) 1990-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */ #if !_LIBC # include <config.h> #endif #include "error.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #if !_LIBC && ENABLE_NLS # include "gettext.h" # define _(msgid) gettext (msgid) #endif #ifdef _LIBC # include <libintl.h> # include <stdbool.h> # include <stdint.h> # include <wchar.h> # define mbsrtowcs __mbsrtowcs #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifndef _ # define _(String) String #endif /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ void (*error_print_progname) (void); /* This variable is incremented each time 'error' is called. */ unsigned int error_message_count; #ifdef _LIBC /* In the GNU C library, there is a predefined variable for this. */ # define program_name program_invocation_name # include <errno.h> # include <limits.h> # include <libio/libioP.h> /* In GNU libc we want do not want to use the common name 'error' directly. Instead make it a weak alias. */ extern void __error (int status, int errnum, const char *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern void __error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) __attribute__ ((__format__ (__printf__, 5, 6)));; # define error __error # define error_at_line __error_at_line # include <libio/iolibio.h> # define fflush(s) INTUSE(_IO_fflush) (s) # undef putc # define putc(c, fp) INTUSE(_IO_putc) (c, fp) # include <bits/libc-lock.h> #else /* not _LIBC */ # include <fcntl.h> # include <unistd.h> # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" # endif /* The gnulib override of fcntl is not needed in this file. */ # undef fcntl # if !HAVE_DECL_STRERROR_R # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif # if STRERROR_R_CHAR_P char *strerror_r (); # else int strerror_r (); # endif # endif /* The calling program should define program_name and set it to the name of the executing program. */ extern char *program_name; # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r # endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ #if !_LIBC /* Return non-zero if FD is open. */ static inline int is_open (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows: The initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE. There is no fcntl, and the gnulib replacement fcntl does not support F_GETFL. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; # else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); # endif } #endif static inline void flush_stdout (void) { #if !_LIBC int stdout_fd; # if GNULIB_FREOPEN_SAFER /* Use of gnulib's freopen-safer module normally ensures that fileno (stdout) == 1 whenever stdout is open. */ stdout_fd = STDOUT_FILENO; # else /* POSIX states that fileno (stdout) after fclose is unspecified. But in practice it is not a problem, because stdout is statically allocated and the fd of a FILE stream is stored as a field in its allocated memory. */ stdout_fd = fileno (stdout); # endif /* POSIX states that fflush (stdout) after fclose is unspecified; it is safe in glibc, but not on all other platforms. fflush (NULL) is always defined, but too draconian. */ if (0 <= stdout_fd && is_open (stdout_fd)) #endif fflush (stdout); } static void print_errno_message (int errnum) { char const *s; #if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; # if STRERROR_R_CHAR_P || _LIBC s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) s = errbuf; else s = 0; # endif #else s = strerror (errnum); #endif #if !_LIBC if (! s) s = _("Unknown system error"); #endif #if _LIBC __fxprintf (NULL, ": %s", s); #else fprintf (stderr, ": %s", s); #endif } static void error_tail (int status, int errnum, const char *message, va_list args) { #if _LIBC if (_IO_fwide (stderr, 0) > 0) { # define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; size_t res; const char *tmp; bool use_malloc = false; while (1) { if (__libc_use_alloca (len * sizeof (wchar_t))) wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); else { if (!use_malloc) wmessage = NULL; wchar_t *p = (wchar_t *) realloc (wmessage, len * sizeof (wchar_t)); if (p == NULL) { free (wmessage); fputws_unlocked (L"out of memory\n", stderr); return; } wmessage = p; use_malloc = true; } memset (&st, '\0', sizeof (st)); tmp = message; res = mbsrtowcs (wmessage, &tmp, len, &st); if (res != len) break; if (__builtin_expect (len >= SIZE_MAX / 2, 0)) { /* This really should not happen if everything is fine. */ res = (size_t) -1; break; } len *= 2; } if (res == (size_t) -1) { /* The string cannot be converted. */ if (use_malloc) { free (wmessage); use_malloc = false; } wmessage = (wchar_t *) L"???"; } __vfwprintf (stderr, wmessage, args); if (use_malloc) free (wmessage); } else #endif vfprintf (stderr, message, args); va_end (args); ++error_message_count; if (errnum) print_errno_message (errnum); #if _LIBC __fxprintf (NULL, "\n"); #else putc ('\n', stderr); #endif fflush (stderr); if (status) exit (status); } /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ void error (int status, int errnum, const char *message, ...) { va_list args; #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s: ", program_name); #else fprintf (stderr, "%s: ", program_name); #endif } va_start (args, message); error_tail (status, errnum, message, args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ int error_one_per_line; void error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) { va_list args; if (error_one_per_line) { static const char *old_file_name; static unsigned int old_line_number; if (old_line_number == line_number && (file_name == old_file_name || strcmp (old_file_name, file_name) == 0)) /* Simply return and print nothing. */ return; old_file_name = file_name; old_line_number = line_number; } #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s:", program_name); #else fprintf (stderr, "%s:", program_name); #endif } #if _LIBC __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", file_name, line_number); #else fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", file_name, line_number); #endif va_start (args, message); error_tail (status, errnum, message, args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } #ifdef _LIBC /* Make the weak alias. */ # undef error # undef error_at_line weak_alias (__error, error) weak_alias (__error_at_line, error_at_line) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/progname.h�������������������������������������������������������������0000664�0000000�0000000�00000003737�12166360012�014141� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Program name management. Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. 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 <http://www.gnu.org/licenses/>. */ #ifndef _PROGNAME_H #define _PROGNAME_H /* Programs using this file should do the following in main(): set_program_name (argv[0]); */ #ifdef __cplusplus extern "C" { #endif /* String containing name the program is called with. */ extern const char *program_name; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ extern void set_program_name (const char *argv0); #if ENABLE_RELOCATABLE /* Set program_name, based on argv[0], and original installation prefix and directory, for relocatability. */ extern void set_program_name_and_installdir (const char *argv0, const char *orig_installprefix, const char *orig_installdir); #undef set_program_name #define set_program_name(ARG0) \ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) /* Return the full pathname of the current executable, based on the earlier call to set_program_name_and_installdir. Return NULL if unknown. */ extern char *get_full_program_name (void); #endif #ifdef __cplusplus } #endif #endif /* _PROGNAME_H */ ���������������������������������id-utils-4.6+git20120811/lib/inttostr.h�������������������������������������������������������������0000664�0000000�0000000�00000003202�12166360012�014202� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* inttostr.h -- convert integers to printable strings Copyright (C) 2001-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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert */ #include <stdint.h> #include <sys/types.h> #include "intprops.h" #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif char *imaxtostr (intmax_t, char *) __attribute_warn_unused_result__; char *inttostr (int, char *) __attribute_warn_unused_result__; char *offtostr (off_t, char *) __attribute_warn_unused_result__; char *uinttostr (unsigned int, char *) __attribute_warn_unused_result__; char *umaxtostr (uintmax_t, char *) __attribute_warn_unused_result__; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/exclude.c��������������������������������������������������������������0000664�0000000�0000000�00000033756�12166360012�013761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* exclude.c -- exclude file names Copyright (C) 1992-1994, 1997, 1999-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert <eggert@twinsun.com> and Sergey Poznyakoff <gray@gnu.org>. Thanks to Phil Proudman <phil@proudman51.freeserve.co.uk> for improvement suggestions. */ #include <config.h> #include <stdbool.h> #include <ctype.h> #include <errno.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <wctype.h> #include "exclude.h" #include "hash.h" #include "mbuiter.h" #include "fnmatch.h" #include "xalloc.h" #include "verify.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif /* Non-GNU systems lack these options, so we don't need to check them. */ #ifndef FNM_CASEFOLD # define FNM_CASEFOLD 0 #endif #ifndef FNM_EXTMATCH # define FNM_EXTMATCH 0 #endif #ifndef FNM_LEADING_DIR # define FNM_LEADING_DIR 0 #endif verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS) & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR | FNM_CASEFOLD | FNM_EXTMATCH)) == 0); /* Exclusion patterns are grouped into a singly-linked list of "exclusion segments". Each segment represents a set of patterns that can be matches using the same algorithm. Non-wildcard patterns are kept in hash tables, to speed up searches. Wildcard patterns are stored as arrays of patterns. */ /* An exclude pattern-options pair. The options are fnmatch options ORed with EXCLUDE_* options. */ struct patopts { char const *pattern; int options; }; /* An array of pattern-options pairs. */ struct exclude_pattern { struct patopts *exclude; size_t exclude_alloc; size_t exclude_count; }; enum exclude_type { exclude_hash, /* a hash table of excluded names */ exclude_pattern /* an array of exclude patterns */ }; struct exclude_segment { struct exclude_segment *next; /* next segment in list */ enum exclude_type type; /* type of this segment */ int options; /* common options for this segment */ union { Hash_table *table; /* for type == exclude_hash */ struct exclude_pattern pat; /* for type == exclude_pattern */ } v; }; /* The exclude structure keeps a singly-linked list of exclude segments */ struct exclude { struct exclude_segment *head, *tail; }; /* Return true if str has wildcard characters */ bool fnmatch_pattern_has_wildcards (const char *str, int options) { const char *cset = "\\?*[]"; if (options & FNM_NOESCAPE) cset++; while (*str) { size_t n = strcspn (str, cset); if (str[n] == 0) break; else if (str[n] == '\\') { str += n + 1; if (*str) str++; } else return true; } return false; } static void unescape_pattern (char *str) { int inset = 0; char *q = str; do { if (inset) { if (*q == ']') inset = 0; } else if (*q == '[') inset = 1; else if (*q == '\\') q++; } while ((*str++ = *q++)); } /* Return a newly allocated and empty exclude list. */ struct exclude * new_exclude (void) { return xzalloc (sizeof *new_exclude ()); } /* Calculate the hash of string. */ static size_t string_hasher (void const *data, size_t n_buckets) { char const *p = data; return hash_string (p, n_buckets); } /* Ditto, for case-insensitive hashes */ static size_t string_hasher_ci (void const *data, size_t n_buckets) { char const *p = data; mbui_iterator_t iter; size_t value = 0; for (mbui_init (iter, p); mbui_avail (iter); mbui_advance (iter)) { mbchar_t m = mbui_cur (iter); wchar_t wc; if (m.wc_valid) wc = towlower (m.wc); else wc = *m.ptr; value = (value * 31 + wc) % n_buckets; } return value; } /* compare two strings for equality */ static bool string_compare (void const *data1, void const *data2) { char const *p1 = data1; char const *p2 = data2; return strcmp (p1, p2) == 0; } /* compare two strings for equality, case-insensitive */ static bool string_compare_ci (void const *data1, void const *data2) { char const *p1 = data1; char const *p2 = data2; return mbscasecmp (p1, p2) == 0; } static void string_free (void *data) { free (data); } /* Create new exclude segment of given TYPE and OPTIONS, and attach it to the tail of list in EX */ static struct exclude_segment * new_exclude_segment (struct exclude *ex, enum exclude_type type, int options) { struct exclude_segment *sp = xzalloc (sizeof (struct exclude_segment)); sp->type = type; sp->options = options; switch (type) { case exclude_pattern: break; case exclude_hash: sp->v.table = hash_initialize (0, NULL, (options & FNM_CASEFOLD) ? string_hasher_ci : string_hasher, (options & FNM_CASEFOLD) ? string_compare_ci : string_compare, string_free); break; } if (ex->tail) ex->tail->next = sp; else ex->head = sp; ex->tail = sp; return sp; } /* Free a single exclude segment */ static void free_exclude_segment (struct exclude_segment *seg) { switch (seg->type) { case exclude_pattern: free (seg->v.pat.exclude); break; case exclude_hash: hash_free (seg->v.table); break; } free (seg); } /* Free the storage associated with an exclude list. */ void free_exclude (struct exclude *ex) { struct exclude_segment *seg; for (seg = ex->head; seg; ) { struct exclude_segment *next = seg->next; free_exclude_segment (seg); seg = next; } free (ex); } /* Return zero if PATTERN matches F, obeying OPTIONS, except that (unlike fnmatch) wildcards are disabled in PATTERN. */ static int fnmatch_no_wildcards (char const *pattern, char const *f, int options) { if (! (options & FNM_LEADING_DIR)) return ((options & FNM_CASEFOLD) ? mbscasecmp (pattern, f) : strcmp (pattern, f)); else if (! (options & FNM_CASEFOLD)) { size_t patlen = strlen (pattern); int r = strncmp (pattern, f, patlen); if (! r) { r = f[patlen]; if (r == '/') r = 0; } return r; } else { /* Walk through a copy of F, seeing whether P matches any prefix of F. FIXME: This is an O(N**2) algorithm; it should be O(N). Also, the copy should not be necessary. However, fixing this will probably involve a change to the mbs* API. */ char *fcopy = xstrdup (f); char *p; int r; for (p = fcopy; ; *p++ = '/') { p = strchr (p, '/'); if (p) *p = '\0'; r = mbscasecmp (pattern, fcopy); if (!p || r <= 0) break; } free (fcopy); return r; } } bool exclude_fnmatch (char const *pattern, char const *f, int options) { int (*matcher) (char const *, char const *, int) = (options & EXCLUDE_WILDCARDS ? fnmatch : fnmatch_no_wildcards); bool matched = ((*matcher) (pattern, f, options) == 0); char const *p; if (! (options & EXCLUDE_ANCHORED)) for (p = f; *p && ! matched; p++) if (*p == '/' && p[1] != '/') matched = ((*matcher) (pattern, p + 1, options) == 0); return matched; } /* Return true if the exclude_pattern segment SEG excludes F. */ static bool excluded_file_pattern_p (struct exclude_segment const *seg, char const *f) { size_t exclude_count = seg->v.pat.exclude_count; struct patopts const *exclude = seg->v.pat.exclude; size_t i; bool excluded = !! (exclude[0].options & EXCLUDE_INCLUDE); /* Scan through the options, until they change excluded */ for (i = 0; i < exclude_count; i++) { char const *pattern = exclude[i].pattern; int options = exclude[i].options; if (exclude_fnmatch (pattern, f, options)) return !excluded; } return excluded; } /* Return true if the exclude_hash segment SEG excludes F. BUFFER is an auxiliary storage of the same length as F (with nul terminator included) */ static bool excluded_file_name_p (struct exclude_segment const *seg, char const *f, char *buffer) { int options = seg->options; bool excluded = !! (options & EXCLUDE_INCLUDE); Hash_table *table = seg->v.table; do { /* initialize the pattern */ strcpy (buffer, f); while (1) { if (hash_lookup (table, buffer)) return !excluded; if (options & FNM_LEADING_DIR) { char *p = strrchr (buffer, '/'); if (p) { *p = 0; continue; } } break; } if (!(options & EXCLUDE_ANCHORED)) { f = strchr (f, '/'); if (f) f++; } else break; } while (f); return excluded; } /* Return true if EX excludes F. */ bool excluded_file_name (struct exclude const *ex, char const *f) { struct exclude_segment *seg; bool excluded; char *filename = NULL; /* If no patterns are given, the default is to include. */ if (!ex->head) return false; /* Otherwise, the default is the opposite of the first option. */ excluded = !! (ex->head->options & EXCLUDE_INCLUDE); /* Scan through the segments, seeing whether they change status from excluded to included or vice versa. */ for (seg = ex->head; seg; seg = seg->next) { bool rc; switch (seg->type) { case exclude_pattern: rc = excluded_file_pattern_p (seg, f); break; case exclude_hash: if (!filename) filename = xmalloc (strlen (f) + 1); rc = excluded_file_name_p (seg, f, filename); break; default: abort (); } if (rc != excluded) { excluded = rc; break; } } free (filename); return excluded; } /* Append to EX the exclusion PATTERN with OPTIONS. */ void add_exclude (struct exclude *ex, char const *pattern, int options) { struct exclude_segment *seg; if ((options & EXCLUDE_WILDCARDS) && fnmatch_pattern_has_wildcards (pattern, options)) { struct exclude_pattern *pat; struct patopts *patopts; if (ex->tail && ex->tail->type == exclude_pattern && ((ex->tail->options & EXCLUDE_INCLUDE) == (options & EXCLUDE_INCLUDE))) seg = ex->tail; else seg = new_exclude_segment (ex, exclude_pattern, options); pat = &seg->v.pat; if (pat->exclude_count == pat->exclude_alloc) pat->exclude = x2nrealloc (pat->exclude, &pat->exclude_alloc, sizeof *pat->exclude); patopts = &pat->exclude[pat->exclude_count++]; patopts->pattern = pattern; patopts->options = options; } else { char *str, *p; #define EXCLUDE_HASH_FLAGS (EXCLUDE_INCLUDE|EXCLUDE_ANCHORED|\ FNM_LEADING_DIR|FNM_CASEFOLD) if (ex->tail && ex->tail->type == exclude_hash && ((ex->tail->options & EXCLUDE_HASH_FLAGS) == (options & EXCLUDE_HASH_FLAGS))) seg = ex->tail; else seg = new_exclude_segment (ex, exclude_hash, options); str = xstrdup (pattern); if (options & EXCLUDE_WILDCARDS) unescape_pattern (str); p = hash_insert (seg->v.table, str); if (p != str) free (str); } } /* Use ADD_FUNC to append to EX the patterns in FILE_NAME, each with OPTIONS. LINE_END terminates each pattern in the file. If LINE_END is a space character, ignore trailing spaces and empty lines in FILE. Return -1 on failure, 0 on success. */ int add_exclude_file (void (*add_func) (struct exclude *, char const *, int), struct exclude *ex, char const *file_name, int options, char line_end) { bool use_stdin = file_name[0] == '-' && !file_name[1]; FILE *in; char *buf = NULL; char *p; char const *pattern; char const *lim; size_t buf_alloc = 0; size_t buf_count = 0; int c; int e = 0; if (use_stdin) in = stdin; else if (! (in = fopen (file_name, "r"))) return -1; while ((c = getc (in)) != EOF) { if (buf_count == buf_alloc) buf = x2realloc (buf, &buf_alloc); buf[buf_count++] = c; } if (ferror (in)) e = errno; if (!use_stdin && fclose (in) != 0) e = errno; buf = xrealloc (buf, buf_count + 1); buf[buf_count] = line_end; lim = buf + buf_count + ! (buf_count == 0 || buf[buf_count - 1] == line_end); pattern = buf; for (p = buf; p < lim; p++) if (*p == line_end) { char *pattern_end = p; if (isspace ((unsigned char) line_end)) { for (; ; pattern_end--) if (pattern_end == pattern) goto next_pattern; else if (! isspace ((unsigned char) pattern_end[-1])) break; } *pattern_end = '\0'; (*add_func) (ex, pattern, options); next_pattern: pattern = p + 1; } errno = e; return e ? -1 : 0; } ������������������id-utils-4.6+git20120811/lib/frexp.c����������������������������������������������������������������0000664�0000000�0000000�00000010361�12166360012�013437� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a double into fraction and mantissa. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Paolo Bonzini <bonzini@gnu.org>, 2003, and Bruno Haible <bruno@clisp.org>, 2007. */ #if ! defined USE_LONG_DOUBLE # include <config.h> #endif /* Specification. */ #include <math.h> #include <float.h> #ifdef USE_LONG_DOUBLE # include "isnanl-nolibm.h" # include "fpucw.h" #else # include "isnand-nolibm.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 1.0, not < 1.0. */ #ifdef USE_LONG_DOUBLE # define FUNC frexpl # define DOUBLE long double # define ISNAN isnanl # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC frexp # define DOUBLE double # define ISNAN isnand # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int sign; int exponent; DECL_ROUNDING /* Test for NaN, infinity, and zero. */ if (ISNAN (x) || x + x == x) { *expptr = 0; return x; } sign = 0; if (x < 0) { x = - x; sign = -1; } BEGIN_ROUNDING (); { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A positive exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Avoid making x too small, as it could become a denormalized number and thus lose precision. */ while (i > 0 && x < pow2[i - 1]) { i--; powh_i = powh[i]; } exponent += (1 << i); x *= powh_i; /* Here 2^-2^i <= x < 1.0. */ } else { /* A negative or zero exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x < powh_i) { exponent -= (1 << i); x *= pow2_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Here 2^-2^i <= x < 1.0. */ } /* Invariants: x * 2^exponent = argument, and 2^-2^i <= x < 1.0. */ while (i > 0) { i--; if (x < powh[i]) { exponent -= (1 << i); x *= pow2[i]; } } /* Here 0.5 <= x < 1.0. */ } if (sign < 0) x = - x; END_ROUNDING (); *expptr = exponent; return x; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/localcharset.h���������������������������������������������������������0000664�0000000�0000000�00000002543�12166360012�014767� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dirname-lgpl.c���������������������������������������������������������0000664�0000000�0000000�00000006120�12166360012�014664� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000-2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <stdlib.h> #include <string.h> /* Return the length of the prefix of FILE that will be used by dir_name. If FILE is in the working directory, this returns zero even though 'dir_name (FILE)' will return ".". Works properly even if there are trailing slashes (by effectively ignoring them). */ size_t dir_len (char const *file) { size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); size_t length; /* Advance prefix_length beyond important leading slashes. */ prefix_length += (prefix_length != 0 ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && ISSLASH (file[prefix_length])) : (ISSLASH (file[0]) ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT && ISSLASH (file[1]) && ! ISSLASH (file[2]) ? 2 : 1)) : 0)); /* Strip the basename and any redundant slashes before it. */ for (length = last_component (file) - file; prefix_length < length; length--) if (! ISSLASH (file[length - 1])) break; return length; } /* In general, we can't use the builtin 'dirname' function if available, since it has different meanings in different environments. In some environments the builtin 'dirname' modifies its argument. Return the leading directories part of FILE, allocated with malloc. Works properly even if there are trailing slashes (by effectively ignoring them). Return NULL on failure. If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); lstat (base_name (FILE)); } will access the same file. Likewise, if the sequence { chdir (dir_name (FILE)); rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE to "foo" in the same directory FILE was in. */ char * mdir_name (char const *file) { size_t length = dir_len (file); bool append_dot = (length == 0 || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && length == FILE_SYSTEM_PREFIX_LEN (file) && file[2] != '\0' && ! ISSLASH (file[2]))); char *dir = malloc (length + append_dot + 1); if (!dir) return NULL; memcpy (dir, file, length); if (append_dot) dir[length++] = '.'; dir[length] = '\0'; return dir; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/wctype.in.h������������������������������������������������������������0000664�0000000�0000000�00000031244�12166360012�014243� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A substitute for ISO C99 <wctype.h>, for platforms that lack it. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible and Paul Eggert. */ /* * ISO C 99 <wctype.h> for platforms that lack it. * <http://www.opengroup.org/susv3xbd/wctype.h.html> * * iswctype, towctrans, towlower, towupper, wctrans, wctype, * wctrans_t, and wctype_t are not yet implemented. */ #ifndef _@GUARD_PREFIX@_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included before <wchar.h>. */ # include <stddef.h> # include <stdio.h> # include <time.h> # include <wchar.h> #endif /* Include the original <wctype.h> if it exists. BeOS 5 has the functions but no <wctype.h>. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCTYPE_H@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which #defines a number of identifiers in the application namespace. Revert these #defines. */ #ifdef __sun # undef multibyte # undef eucw1 # undef eucw2 # undef eucw3 # undef scrw1 # undef scrw2 # undef scrw3 #endif /* Define wint_t and WEOF. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else /* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>. This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be "unchanged by default argument promotions". Override it. */ # if defined _MSC_VER # if !GNULIB_defined_wint_t # include <crtdefs.h> typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t # define GNULIB_defined_wint_t 1 # endif # endif # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif #if !GNULIB_defined_wctype_functions /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions. Linux libc5 has <wctype.h> and the functions but they are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ /* IRIX 5.3 has macros but no functions, its isw* macros refer to an undefined variable _ctmp_ and to <ctype.h> macros like _P, and they refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ # undef iswalnum # undef iswalpha # undef iswblank # undef iswcntrl # undef iswdigit # undef iswgraph # undef iswlower # undef iswprint # undef iswpunct # undef iswspace # undef iswupper # undef iswxdigit # undef towlower # undef towupper /* Linux libc5 has <wctype.h> and the functions but they are broken. */ # if @REPLACE_ISWCNTRL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank # define iswcntrl rpl_iswcntrl # define iswdigit rpl_iswdigit # define iswgraph rpl_iswgraph # define iswlower rpl_iswlower # define iswprint rpl_iswprint # define iswpunct rpl_iswpunct # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit # endif # endif # if @REPLACE_TOWLOWER@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif # endif static inline int # if @REPLACE_ISWCNTRL@ rpl_iswalnum # else iswalnum # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswalpha # else iswalpha # endif (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswblank # else iswblank # endif (wint_t wc) { return wc == ' ' || wc == '\t'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswcntrl # else iswcntrl # endif (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswdigit # else iswdigit # endif (wint_t wc) { return wc >= '0' && wc <= '9'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswgraph # else iswgraph # endif (wint_t wc) { return wc >= '!' && wc <= '~'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswlower # else iswlower # endif (wint_t wc) { return wc >= 'a' && wc <= 'z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswprint # else iswprint # endif (wint_t wc) { return wc >= ' ' && wc <= '~'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswpunct # else iswpunct # endif (wint_t wc) { return (wc >= '!' && wc <= '~' && !((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswspace # else iswspace # endif (wint_t wc) { return (wc == ' ' || wc == '\t' || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswupper # else iswupper # endif (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswxdigit # else iswxdigit # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } static inline wint_t # if @REPLACE_TOWLOWER@ rpl_towlower # else towlower # endif (wint_t wc) { return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } static inline wint_t # if @REPLACE_TOWLOWER@ rpl_towupper # else towupper # endif (wint_t wc) { return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } # elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) /* Only the iswblank function is missing. */ # if @REPLACE_ISWBLANK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswblank rpl_iswblank # endif _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); # else _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); # endif # endif # if defined __MINGW32__ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library to take a wchar_t argument and return a wchar_t result. mingw declares these functions to take a wint_t argument and return a wint_t result. This means that: 1. When the user passes an argument outside the range 0x0000..0xFFFF, the function will look only at the lower 16 bits. This is allowed according to POSIX. 2. The return value is returned in the lower 16 bits of the result register. The upper 16 bits are random: whatever happened to be in that part of the result register. We need to fix this by adding a zero-extend from wchar_t to wint_t after the call. */ static inline wint_t rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # endif static inline wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towupper rpl_towupper # endif # endif /* __MINGW32__ */ # define GNULIB_defined_wctype_functions 1 #endif #if @REPLACE_ISWCNTRL@ _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); #else _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); #endif _GL_CXXALIASWARN (iswalnum); _GL_CXXALIASWARN (iswalpha); _GL_CXXALIASWARN (iswcntrl); _GL_CXXALIASWARN (iswdigit); _GL_CXXALIASWARN (iswgraph); _GL_CXXALIASWARN (iswlower); _GL_CXXALIASWARN (iswprint); _GL_CXXALIASWARN (iswpunct); _GL_CXXALIASWARN (iswspace); _GL_CXXALIASWARN (iswupper); _GL_CXXALIASWARN (iswxdigit); #if @GNULIB_ISWBLANK@ # if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); # else _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); # endif _GL_CXXALIASWARN (iswblank); #endif #if !@HAVE_WCTYPE_T@ # if !GNULIB_defined_wctype_t typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif #endif /* Get a descriptor for a wide character property. */ #if @GNULIB_WCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); _GL_CXXALIASWARN (wctype); #elif defined GNULIB_POSIXCHECK # undef wctype # if HAVE_RAW_DECL_WCTYPE _GL_WARN_ON_USE (wctype, "wctype is unportable - " "use gnulib module wctype for portability"); # endif #endif /* Test whether a wide character has a given property. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if @GNULIB_ISWCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); # endif _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); _GL_CXXALIASWARN (iswctype); #elif defined GNULIB_POSIXCHECK # undef iswctype # if HAVE_RAW_DECL_ISWCTYPE _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " "use gnulib module iswctype for portability"); # endif #endif #if @REPLACE_TOWLOWER@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); #endif _GL_CXXALIASWARN (towlower); _GL_CXXALIASWARN (towupper); #if !@HAVE_WCTRANS_T@ # if !GNULIB_defined_wctrans_t typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif #endif /* Get a descriptor for a wide character case conversion. */ #if @GNULIB_WCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); _GL_CXXALIASWARN (wctrans); #elif defined GNULIB_POSIXCHECK # undef wctrans # if HAVE_RAW_DECL_WCTRANS _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " "use gnulib module wctrans for portability"); # endif #endif /* Perform a given case conversion on a wide character. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if @GNULIB_TOWCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); # endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); _GL_CXXALIASWARN (towctrans); #elif defined GNULIB_POSIXCHECK # undef towctrans # if HAVE_RAW_DECL_TOWCTRANS _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " "use gnulib module towctrans for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_WCTYPE_H */ #endif /* _@GUARD_PREFIX@_WCTYPE_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/ref-del.sin������������������������������������������������������������0000664�0000000�0000000�00000002007�12166360012�014176� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000, 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 by # the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible <haible@clisp.cons.org>. # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/closeout.h�������������������������������������������������������������0000664�0000000�0000000�00000002042�12166360012�014152� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Close standard output and standard error. Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-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 <http://www.gnu.org/licenses/>. */ #ifndef CLOSEOUT_H # define CLOSEOUT_H 1 # include <stdbool.h> # ifdef __cplusplus extern "C" { # endif void close_stdout_set_file_name (const char *file); void close_stdout_set_ignore_EPIPE (bool ignore); void close_stdout (void); # ifdef __cplusplus } # endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/openat-proc.c����������������������������������������������������������0000664�0000000�0000000�00000007363�12166360012�014552� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Create /proc/self/fd-related names for subfiles of open directories. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #include <config.h> #include "openat-priv.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "intprops.h" /* The results of open() in this file are not used with fchdir, and we do not leak fds to any single-threaded code that could use stdio, therefore save some unnecessary work in fchdir.c. FIXME - if the kernel ever adds support for multi-thread safety for avoiding standard fds, then we should use open_safer. */ #undef open #undef close #define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" #define PROC_SELF_FD_NAME_SIZE_BOUND(len) \ (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \ + INT_STRLEN_BOUND (int) + (len) + 1) /* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE respectively for %d and %s. If successful, return BUF if the result fits in BUF, dynamically allocated memory otherwise. But return NULL if /proc is not reliable, either because the operating system support is lacking or because memory is low. */ char * openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) { static int proc_status = 0; /* Make sure the caller gets ENOENT when appropriate. */ if (!*file) { buf[0] = '\0'; return buf; } if (! proc_status) { /* Set PROC_STATUS to a positive value if /proc/self/fd is reliable, and a negative value otherwise. Solaris 10 /proc/self/fd mishandles "..", and any file name might expand to ".." after symbolic link expansion, so avoid /proc/self/fd if it mishandles "..". Solaris 10 has openat, but this problem is exhibited on code that built on Solaris 8 and running on Solaris 10. */ int proc_self_fd = open ("/proc/self/fd", O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); if (proc_self_fd < 0) proc_status = -1; else { /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the number of a file descriptor open on /proc/self/fd. On Linux, that name resolves to /proc/self/fd, which was opened above. However, on Solaris, it may resolve to /proc/self/fd/fd, which cannot exist, since all names in /proc/self/fd are numeric. */ char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)]; sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd"); proc_status = access (dotdot_buf, F_OK) ? -1 : 1; close (proc_self_fd); } } if (proc_status < 0) return NULL; else { size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); char *result = buf; if (OPENAT_BUFFER_SIZE < bufsize) { result = malloc (bufsize); if (! result) return NULL; } sprintf (result, PROC_SELF_FD_FORMAT, fd, file); return result; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/basename-lgpl.c��������������������������������������������������������0000664�0000000�0000000�00000004061�12166360012�015022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998-2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <string.h> /* Return the address of the last file name component of NAME. If NAME has no relative file name components because it is a file system root, return the empty string. */ char * last_component (char const *name) { char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); char const *p; bool saw_slash = false; while (ISSLASH (*base)) base++; for (p = base; *p; p++) { if (ISSLASH (*p)) saw_slash = true; else if (saw_slash) { base = p; saw_slash = false; } } return (char *) base; } /* Return the length of the basename NAME. Typically NAME is the value returned by base_name or last_component. Act like strlen (NAME), except omit all trailing slashes. */ size_t base_len (char const *name) { size_t len; size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) return 2; if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len && len == prefix_len && ISSLASH (name[prefix_len])) return prefix_len + 1; return len; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbchar.h���������������������������������������������������������������0000664�0000000�0000000�00000033125�12166360012�013557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Multibyte character data type. Copyright (C) 2001, 2005-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>. */ /* A multibyte character is a short subsequence of a char* string, representing a single wide character. We use multibyte characters instead of wide characters because of the following goals: 1) correct multibyte handling, i.e. operate according to the LC_CTYPE locale, 2) ease of maintenance, i.e. the maintainer needs not know all details of the ISO C 99 standard, 3) don't fail grossly if the input is not in the encoding set by the locale, because often different encodings are in use in the same countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), 4) fast in the case of ASCII characters, 5) portability, i.e. don't make unportable assumptions about wchar_t. Multibyte characters are only accessed through the mb* macros. mb_ptr (mbc) return a pointer to the beginning of the multibyte sequence. mb_len (mbc) returns the number of bytes occupied by the multibyte sequence. Always > 0. mb_iseq (mbc, sc) returns true if mbc is the standard ASCII character sc. mb_isnul (mbc) returns true if mbc is the nul character. mb_cmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2. mb_casecmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2, modulo upper/lowercase conversion. mb_equal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal. mb_caseequal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. mb_isalnum (mbc) returns true if mbc is alphanumeric. mb_isalpha (mbc) returns true if mbc is alphabetic. mb_isascii(mbc) returns true if mbc is plain ASCII. mb_isblank (mbc) returns true if mbc is a blank. mb_iscntrl (mbc) returns true if mbc is a control character. mb_isdigit (mbc) returns true if mbc is a decimal digit. mb_isgraph (mbc) returns true if mbc is a graphic character. mb_islower (mbc) returns true if mbc is lowercase. mb_isprint (mbc) returns true if mbc is a printable character. mb_ispunct (mbc) returns true if mbc is a punctuation character. mb_isspace (mbc) returns true if mbc is a space character. mb_isupper (mbc) returns true if mbc is uppercase. mb_isxdigit (mbc) returns true if mbc is a hexadecimal digit. mb_width (mbc) returns the number of columns on the output device occupied by mbc. Always >= 0. mb_putc (mbc, stream) outputs mbc on stream, a byte oriented FILE stream opened for output. mb_setascii (&mbc, sc) assigns the standard ASCII character sc to mbc. mb_copy (&destmbc, &srcmbc) copies srcmbc to destmbc. Here are the function prototypes of the macros. extern const char * mb_ptr (const mbchar_t mbc); extern size_t mb_len (const mbchar_t mbc); extern bool mb_iseq (const mbchar_t mbc, char sc); extern bool mb_isnul (const mbchar_t mbc); extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_isalnum (const mbchar_t mbc); extern bool mb_isalpha (const mbchar_t mbc); extern bool mb_isascii (const mbchar_t mbc); extern bool mb_isblank (const mbchar_t mbc); extern bool mb_iscntrl (const mbchar_t mbc); extern bool mb_isdigit (const mbchar_t mbc); extern bool mb_isgraph (const mbchar_t mbc); extern bool mb_islower (const mbchar_t mbc); extern bool mb_isprint (const mbchar_t mbc); extern bool mb_ispunct (const mbchar_t mbc); extern bool mb_isspace (const mbchar_t mbc); extern bool mb_isupper (const mbchar_t mbc); extern bool mb_isxdigit (const mbchar_t mbc); extern int mb_width (const mbchar_t mbc); extern void mb_putc (const mbchar_t mbc, FILE *stream); extern void mb_setascii (mbchar_t *new, char sc); extern void mb_copy (mbchar_t *new, const mbchar_t *old); */ #ifndef _MBCHAR_H #define _MBCHAR_H 1 #include <stdbool.h> #include <string.h> /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before <wchar.h>. */ #include <stdio.h> #include <time.h> #include <wchar.h> #include <wctype.h> #define MBCHAR_BUF_SIZE 24 struct mbchar { const char *ptr; /* pointer to current character */ size_t bytes; /* number of bytes of current character, > 0 */ bool wc_valid; /* true if wc is a valid wide character */ wchar_t wc; /* if wc_valid: the current character */ char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ }; /* EOF (not a real character) is represented with bytes = 0 and wc_valid = false. */ typedef struct mbchar mbchar_t; /* Access the current character. */ #define mb_ptr(mbc) ((mbc).ptr) #define mb_len(mbc) ((mbc).bytes) /* Comparison of characters. */ #define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) #define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) #define mb_cmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) (mbc1).wc - (int) (mbc2).wc \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_casecmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_equal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? (mbc1).wc == (mbc2).wc \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) #define mb_caseequal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) /* <ctype.h>, <wctype.h> classification. */ #define mb_isascii(mbc) \ ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) #define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) #define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) #define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) #define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) #define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) #define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) #define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) #define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) #define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) #define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) #define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) #define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) /* Extra <wchar.h> function. */ /* Unprintable characters appear as a small box of width 1. */ #define MB_UNPRINTABLE_WIDTH 1 static inline int mb_width_aux (wint_t wc) { int w = wcwidth (wc); /* For unprintable characters, arbitrarily return 0 for control characters and MB_UNPRINTABLE_WIDTH otherwise. */ return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); } #define mb_width(mbc) \ ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) /* Output. */ #define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) /* Assignment. */ #define mb_setascii(mbc, sc) \ ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ (mbc)->wc = (mbc)->buf[0] = (sc)) /* Copying a character. */ static inline void mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) { if (old_mbc->ptr == &old_mbc->buf[0]) { memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); new_mbc->ptr = &new_mbc->buf[0]; } else new_mbc->ptr = old_mbc->ptr; new_mbc->bytes = old_mbc->bytes; if ((new_mbc->wc_valid = old_mbc->wc_valid)) new_mbc->wc = old_mbc->wc; } /* is_basic(c) tests whether the single-byte character c is in the ISO C "basic character set". This is a convenience function, and is in this file only to share code between mbiter_multi.h and mbfile_multi.h. */ #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ISO-646, not EBCDIC. */ # define IS_BASIC_ASCII 1 extern const unsigned int is_basic_table[]; static inline bool is_basic (char c) { return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; } #else static inline bool is_basic (char c) { switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } } #endif #endif /* _MBCHAR_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/getdelim.c�������������������������������������������������������������0000664�0000000�0000000�00000007160�12166360012�014110� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getdelim.c --- Implementation of replacement getdelim function. Copyright (C) 1994, 1996-1998, 2001, 2003, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Ported from glibc by Simon Josefsson. */ #include <config.h> /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ #define _GL_ARG_NONNULL(params) #include <stdio.h> #include <limits.h> #include <stdint.h> #include <stdlib.h> #include <errno.h> #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" # define getc_maybe_unlocked(fp) getc(fp) #elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED # undef flockfile # undef funlockfile # define flockfile(x) ((void) 0) # define funlockfile(x) ((void) 0) # define getc_maybe_unlocked(fp) getc(fp) #else # define getc_maybe_unlocked(fp) getc_unlocked(fp) #endif /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'ed as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) { ssize_t result; size_t cur_len = 0; if (lineptr == NULL || n == NULL || fp == NULL) { errno = EINVAL; return -1; } flockfile (fp); if (*lineptr == NULL || *n == 0) { char *new_lineptr; *n = 120; new_lineptr = (char *) realloc (*lineptr, *n); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; } for (;;) { int i; i = getc_maybe_unlocked (fp); if (i == EOF) { result = -1; break; } /* Make enough space for len+1 (for final NUL) bytes. */ if (cur_len + 1 >= *n) { size_t needed_max = SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; size_t needed = 2 * *n + 1; /* Be generous. */ char *new_lineptr; if (needed_max < needed) needed = needed_max; if (cur_len + 1 >= needed) { result = -1; errno = EOVERFLOW; goto unlock_return; } new_lineptr = (char *) realloc (*lineptr, needed); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; *n = needed; } (*lineptr)[cur_len] = i; cur_len++; if (i == delimiter) break; } (*lineptr)[cur_len] = '\0'; result = cur_len ? cur_len : result; unlock_return: funlockfile (fp); /* doesn't set errno */ return result; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-ctype.h��������������������������������������������������������������0000664�0000000�0000000�00000022134�12166360012�013665� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Character handling in C locale. These functions work like the corresponding functions in <ctype.h>, except that they have the C (POSIX) locale hardwired, whereas the <ctype.h> functions' behaviour depends on the current locale set via setlocale. Copyright (C) 2000-2003, 2006, 2008-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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_CTYPE_H #define C_CTYPE_H #include <stdbool.h> #ifdef __cplusplus extern "C" { #endif /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. */ /* Check whether the ASCII optimizations apply. */ /* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that '0', '1', ..., '9' have consecutive integer values. */ #define C_CTYPE_CONSECUTIVE_DIGITS 1 #if ('A' <= 'Z') \ && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ && ('Y' + 1 == 'Z') #define C_CTYPE_CONSECUTIVE_UPPERCASE 1 #endif #if ('a' <= 'z') \ && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ && ('y' + 1 == 'z') #define C_CTYPE_CONSECUTIVE_LOWERCASE 1 #endif #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ASCII or one of its variants or extensions, not EBCDIC. Testing the value of '\n' and '\r' is not relevant. */ #define C_CTYPE_ASCII 1 #endif /* Function declarations. */ /* Unlike the functions in <ctype.h>, which require an argument in the range of the 'unsigned char' type, the functions here operate on values that are in the 'unsigned char' range or in the 'char' range. In other words, when you have a 'char' value, you need to cast it before using it as argument to a <ctype.h> function: const char *s = ...; if (isalpha ((unsigned char) *s)) ... but you don't need to cast it for the functions defined in this file: const char *s = ...; if (c_isalpha (*s)) ... */ extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */ extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST; extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST; extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST; extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST; extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST; extern bool c_islower (int c) _GL_ATTRIBUTE_CONST; extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST; extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST; extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST; extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST; extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST; extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST; extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS /* ASCII optimizations. */ #undef c_isascii #define c_isascii(c) \ ({ int __c = (c); \ (__c >= 0x00 && __c <= 0x7f); \ }) #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ }) #else #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'Z') \ || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ }) #else #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #undef c_isblank #define c_isblank(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t'); \ }) #if C_CTYPE_ASCII #undef c_iscntrl #define c_iscntrl(c) \ ({ int __c = (c); \ ((__c & ~0x1f) == 0 || __c == 0x7f); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS #undef c_isdigit #define c_isdigit(c) \ ({ int __c = (c); \ (__c >= '0' && __c <= '9'); \ }) #endif #if C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_islower #define c_islower(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z'); \ }) #endif #if C_CTYPE_ASCII #undef c_isgraph #define c_isgraph(c) \ ({ int __c = (c); \ (__c >= '!' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_isprint #define c_isprint(c) \ ({ int __c = (c); \ (__c >= ' ' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_ispunct #define c_ispunct(c) \ ({ int _c = (c); \ (c_isgraph (_c) && ! c_isalnum (_c)); \ }) #endif #undef c_isspace #define c_isspace(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t' \ || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ }) #if C_CTYPE_CONSECUTIVE_UPPERCASE #undef c_isupper #define c_isupper(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z'); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ }) #else #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'F') \ || (__c >= 'a' && __c <= 'f')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_tolower #define c_tolower(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ }) #undef c_toupper #define c_toupper(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ }) #endif #endif /* optimizing for speed */ #ifdef __cplusplus } #endif #endif /* C_CTYPE_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/uinttostr.c������������������������������������������������������������0000664�0000000�0000000�00000000116�12166360012�014363� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define anytostr uinttostr #define inttype unsigned int #include "anytostr.c" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/chdir-long.h�����������������������������������������������������������0000664�0000000�0000000�00000002067�12166360012�014352� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* provide a chdir function that tries not to fail due to ENAMETOOLONG Copyright (C) 2004-2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <unistd.h> #include <limits.h> #include "pathmax.h" /* On systems without PATH_MAX, presume that chdir accepts arbitrarily long directory names. */ #ifndef PATH_MAX # define chdir_long(Dir) chdir (Dir) #else int chdir_long (char *dir); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/filename.h�������������������������������������������������������������0000664�0000000�0000000�00000003652�12166360012�014105� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Basic filename support macros. Copyright (C) 2001-2004, 2007-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 <http://www.gnu.org/licenses/>. */ #ifndef _FILENAME_H #define _FILENAME_H #ifdef __cplusplus extern "C" { #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif #ifdef __cplusplus } #endif #endif /* _FILENAME_H */ ��������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/uniwidth/��������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465165�014006� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/uniwidth/cjk.h���������������������������������������������������������0000664�0000000�0000000�00000003105�12166360012�014720� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for CJK encoding. Copyright (C) 2001-2002, 2005-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. 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 <http://www.gnu.org/licenses/>. */ #include "streq.h" static int is_cjk_encoding (const char *encoding) { if (0 /* Legacy Japanese encodings */ || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) /* Legacy Chinese encodings */ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) /* Legacy Korean encodings */ || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) return 1; return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/uniwidth/width.c�������������������������������������������������������0000664�0000000�0000000�00000050540�12166360012�015270� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine display width of Unicode character. Copyright (C) 2001-2002, 2006-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "uniwidth.h" #include "cjk.h" /* * Non-spacing attribute table. * Consists of: * - Non-spacing characters; generated from PropList.txt or * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" * - Format control characters; generated from * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt" * - Zero width characters; generated from * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" */ static const unsigned char nonspacing_table_data[27*64] = { /* 0x0000-0x01ff */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */ /* 0x0200-0x03ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */ /* 0x0400-0x05ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */ 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */ 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */ 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */ /* 0x0600-0x07ff */ 0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */ 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */ 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */ 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */ 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */ /* 0x0800-0x09ff */ 0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */ 0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */ /* 0x0a00-0x0bff */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */ 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */ 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */ 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */ 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */ /* 0x0c00-0x0dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */ 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */ 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */ 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */ /* 0x0e00-0x0fff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */ 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */ 0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */ /* 0x1000-0x11ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */ 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */ 0x64, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */ /* 0x1200-0x13ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */ 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */ /* 0x1600-0x17ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */ 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */ 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */ 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */ /* 0x1800-0x19ff */ 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */ /* 0x1a00-0x1bff */ 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ 0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */ 0x00, 0x00, 0x00, 0x00, 0x40, 0xa3, 0x03, 0x00, /* 0x1bc0-0x1bff */ /* 0x1c00-0x1dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */ 0x00, 0x00, 0xf7, 0xff, 0xfd, 0x21, 0x00, 0x00, /* 0x1cc0-0x1cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, /* 0x1dc0-0x1dff */ /* 0x2000-0x21ff */ 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */ /* 0x2c00-0x2dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, /* 0x2cc0-0x2cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x2d40-0x2d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */ /* 0x3000-0x31ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */ /* 0xa600-0xa7ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, /* 0xa6c0-0xa6ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */ /* 0xa800-0xa9ff */ 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */ /* 0xaa00-0xabff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */ 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xc1, /* 0xaa80-0xaabf */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */ 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, /* 0xabc0-0xabff */ /* 0xfa00-0xfbff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */ /* 0xfe00-0xffff */ 0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */ /* 0x10000-0x101ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */ /* 0x10a00-0x10bff */ 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */ /* 0x11000-0x111ff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */ 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11040-0x1107f */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11100-0x1113f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11140-0x1117f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11180-0x111bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */ /* 0x1d000-0x1d1ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0xff, /* 0x1d140-0x1d17f */ 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */ /* 0x1d200-0x1d3ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1d3c0-0x1d3ff */ }; static const signed char nonspacing_table_ind[240] = { 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */ 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */ 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */ 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */ -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ 22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */ 24, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ 25, 26, -1, -1, -1, -1, -1, -1 /* 0x1d000-0x1dfff */ }; /* Determine number of column positions required for UC. */ int uc_width (ucs4_t uc, const char *encoding) { /* Test for non-spacing or control character. */ if ((uc >> 9) < 240) { int ind = nonspacing_table_ind[uc >> 9]; if (ind >= 0) if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1) { if (uc > 0 && uc < 0xa0) return -1; else return 0; } } else if ((uc >> 9) == (0xe0000 >> 9)) { if (uc >= 0xe0100) { if (uc <= 0xe01ef) return 0; } else { if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001) return 0; } } /* Test for double-width character. * Generated from "grep '^[^;]\{4,5\};[WF]' EastAsianWidth.txt" * and "grep '^[^;]\{4,5\};[^WF]' EastAsianWidth.txt" */ if (uc >= 0x1100 && ((uc < 0x1160) /* Hangul Jamo */ || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */ || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */ && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00)) || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */ || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */ || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */ || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */ || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */ || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */ || (uc >= 0x20000 && uc <= 0x2ffff) /* Supplementary Ideographic Plane */ || (uc >= 0x30000 && uc <= 0x3ffff) /* Tertiary Ideographic Plane */ ) ) return 2; /* In ancient CJK encodings, Cyrillic and most other characters are double-width as well. */ if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9 && is_cjk_encoding (encoding)) return 2; return 1; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/lstat.c����������������������������������������������������������������0000664�0000000�0000000�00000006703�12166360012�013447� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Work around a bug of lstat on some systems Copyright (C) 1997-2006, 2008-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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ /* If the user's config.h happens to include <sys/stat.h>, let it include only the system's <sys/stat.h> here, so that orig_lstat doesn't recurse to rpl_lstat. */ #define __need_system_sys_stat_h #include <config.h> #if !HAVE_LSTAT /* On systems that lack symlinks, our replacement <sys/stat.h> already defined lstat as stat, so there is nothing further to do other than avoid an empty file. */ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ # include <sys/types.h> # include <sys/stat.h> # undef __need_system_sys_stat_h static inline int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } /* Specification. */ /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <sys/stat.h> above. */ # include "sys/stat.h" # include <string.h> # include <errno.h> /* lstat works differently on Linux and Solaris systems. POSIX (see "pathname resolution" in the glossary) requires that programs like 'ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, then use stat() to get more info on the referent of FILE. If the referent is a non-directory, then set errno to ENOTDIR and return -1. Otherwise, return stat's result. */ int rpl_lstat (const char *file, struct stat *sbuf) { size_t len; int lstat_result = orig_lstat (file, sbuf); if (lstat_result != 0) return lstat_result; /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ len = strlen (file); if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) return 0; /* At this point, a trailing slash is only permitted on symlink-to-dir; but it should have found information on the directory, not the symlink. Call stat() to get info about the link's referent. Our replacement stat guarantees valid results, even if the symlink is not pointing to a directory. */ if (!S_ISLNK (sbuf->st_mode)) { errno = ENOTDIR; return -1; } return stat (file, sbuf); } #endif /* HAVE_LSTAT */ �������������������������������������������������������������id-utils-4.6+git20120811/lib/xalloc-oversized.h�����������������������������������������������������0000664�0000000�0000000�00000003237�12166360012�015616� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xalloc-oversized.h -- memory allocation size checking Copyright (C) 1990-2000, 2003-2004, 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 <http://www.gnu.org/licenses/>. */ #ifndef XALLOC_OVERSIZED_H_ # define XALLOC_OVERSIZED_H_ # include <stddef.h> /* Return 1 if an array of N objects, each of size S, cannot exist due to size arithmetic overflow. S must be positive and N must be nonnegative. This is a macro, not an inline function, so that it works correctly even when SIZE_MAX < N. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative dividend to use here is SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. However, malloc (SIZE_MAX) fails on all known hosts where sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for exactly-SIZE_MAX allocations on such hosts; this avoids a test and branch when S is known to be 1. */ # define xalloc_oversized(n, s) \ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) #endif /* !XALLOC_OVERSIZED_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fstatat.c��������������������������������������������������������������0000664�0000000�0000000�00000010565�12166360012�013767� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Work around an fstatat bug on Solaris 9. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert and Jim Meyering. */ /* If the user's config.h happens to include <sys/stat.h>, let it include only the system's <sys/stat.h> here, so that orig_fstatat doesn't recurse to rpl_fstatat. */ #define __need_system_sys_stat_h #include <config.h> /* Get the original definition of fstatat. It might be defined as a macro. */ #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h #if HAVE_FSTATAT static inline int orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) { return fstatat (fd, filename, buf, flags); } #endif /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <sys/stat.h> above. */ #include "sys/stat.h" #include <errno.h> #include <fcntl.h> #include <string.h> #if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG # ifndef LSTAT_FOLLOWS_SLASHED_SYMLINK # define LSTAT_FOLLOWS_SLASHED_SYMLINK 0 # endif /* fstatat should always follow symbolic links that end in /, but on Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. Likewise, trailing slash on a non-directory should be an error. These are the same problems that lstat.c and stat.c address, so solve it in a similar way. AIX 7.1 fstatat (AT_FDCWD, ..., 0) always fails, which is a bug. Work around this bug if FSTATAT_AT_FDCWD_0_BROKEN is nonzero. */ int rpl_fstatat (int fd, char const *file, struct stat *st, int flag) { int result = orig_fstatat (fd, file, st, flag); size_t len; if (LSTAT_FOLLOWS_SLASHED_SYMLINK || result != 0) return result; len = strlen (file); if (flag & AT_SYMLINK_NOFOLLOW) { /* Fix lstat behavior. */ if (file[len - 1] != '/' || S_ISDIR (st->st_mode)) return 0; if (!S_ISLNK (st->st_mode)) { errno = ENOTDIR; return -1; } result = orig_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); } /* Fix stat behavior. */ if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/') { errno = ENOTDIR; return -1; } return result; } #else /* ! (HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG) */ /* On mingw, the gnulib <sys/stat.h> defines 'stat' as a function-like macro; but using it in AT_FUNC_F2 causes compilation failure because the preprocessor sees a use of a macro that requires two arguments but is only given one. Hence, we need an inline forwarder to get past the preprocessor. */ static inline int stat_func (char const *name, struct stat *st) { return stat (name, st); } /* Likewise, if there is no native 'lstat', then the gnulib <sys/stat.h> defined it as stat, which also needs adjustment. */ # if !HAVE_LSTAT # undef lstat # define lstat stat_func # endif /* Replacement for Solaris' function by the same name. <http://www.google.com/search?q=fstatat+site:docs.sun.com> First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), then give a diagnostic and exit nonzero. Otherwise, this function works just like Solaris' fstatat. */ # define AT_FUNC_NAME fstatat # define AT_FUNC_F1 lstat # define AT_FUNC_F2 stat_func # define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW # define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag # define AT_FUNC_POST_FILE_ARGS , st # include "at-func.c" # undef AT_FUNC_NAME # undef AT_FUNC_F1 # undef AT_FUNC_F2 # undef AT_FUNC_USE_F1_COND # undef AT_FUNC_POST_FILE_PARAM_DECLS # undef AT_FUNC_POST_FILE_ARGS #endif /* !HAVE_FSTATAT */ �������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dirfd.c����������������������������������������������������������������0000664�0000000�0000000�00000001735�12166360012�013410� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dirfd.c -- return the file descriptor associated with an open DIR* Copyright (C) 2001, 2006, 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include <dirent.h> #include <errno.h> int dirfd (DIR *dir_p) { int fd = DIR_TO_FD (dir_p); if (fd == -1) errno = ENOTSUP; return fd; } �����������������������������������id-utils-4.6+git20120811/lib/mbuiter.h��������������������������������������������������������������0000664�0000000�0000000�00000017215�12166360012�013774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Iterating through multibyte strings: macros for multi-byte encodings. Copyright (C) 2001, 2005, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>. */ /* The macros in this file implement forward iteration through a multi-byte string, without knowing its length a-priori. With these macros, an iteration loop that looks like char *iter; for (iter = buf; *iter != '\0'; iter++) { do_something (*iter); } becomes mbui_iterator_t iter; for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter)) { do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter))); } The benefit of these macros over plain use of mbrtowc is: - Handling of invalid multibyte sequences is possible without making the code more complicated, while still preserving the invalid multibyte sequences. Compared to mbiter.h, the macros here don't need to know the string's length a-priori. The downside is that at each step, the look-ahead that guards against overrunning the terminating '\0' is more expensive. The mbui_* macros are therefore suitable when there is a high probability that only the first few multibyte characters need to be inspected. Whereas the mbi_* macros are better if usually the iteration runs through the entire string. mbui_iterator_t is a type usable for variable declarations. mbui_init (iter, startptr) initializes the iterator, starting at startptr. mbui_avail (iter) returns true if there are more multibyte chracters available before the end of string is reached. In this case, mbui_cur (iter) is initialized to the next multibyte chracter. mbui_advance (iter) advances the iterator by one multibyte character. mbui_cur (iter) returns the current multibyte character, of type mbchar_t. All the macros defined in mbchar.h can be used on it. mbui_cur_ptr (iter) return a pointer to the beginning of the current multibyte character. mbui_reloc (iter, ptrdiff) relocates iterator when the string is moved by ptrdiff bytes. mbui_copy (&destiter, &srciter) copies srciter to destiter. Here are the function prototypes of the macros. extern void mbui_init (mbui_iterator_t iter, const char *startptr); extern bool mbui_avail (mbui_iterator_t iter); extern void mbui_advance (mbui_iterator_t iter); extern mbchar_t mbui_cur (mbui_iterator_t iter); extern const char * mbui_cur_ptr (mbui_iterator_t iter); extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff); extern void mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old); */ #ifndef _MBUITER_H #define _MBUITER_H 1 #include <assert.h> #include <stdbool.h> #include <stddef.h> #include <stdlib.h> #include <string.h> /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before <wchar.h>. */ #include <stdio.h> #include <time.h> #include <wchar.h> #include "mbchar.h" #include "strnlen1.h" struct mbuiter_multi { bool in_shift; /* true if next byte may not be interpreted as ASCII */ mbstate_t state; /* if in_shift: current shift state */ bool next_done; /* true if mbui_avail has already filled the following */ struct mbchar cur; /* the current character: const char *cur.ptr pointer to current character The following are only valid after mbui_avail. size_t cur.bytes number of bytes of current character bool cur.wc_valid true if wc is a valid wide character wchar_t cur.wc if wc_valid: the current character */ }; static inline void mbuiter_multi_next (struct mbuiter_multi *iter) { if (iter->next_done) return; if (iter->in_shift) goto with_shift; /* Handle most ASCII characters quickly, without calling mbrtowc(). */ if (is_basic (*iter->cur.ptr)) { /* These characters are part of the basic character set. ISO C 99 guarantees that their wide character code is identical to their char code. */ iter->cur.bytes = 1; iter->cur.wc = *iter->cur.ptr; iter->cur.wc_valid = true; } else { assert (mbsinit (&iter->state)); iter->in_shift = true; with_shift: iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, strnlen1 (iter->cur.ptr, MB_CUR_MAX), &iter->state); if (iter->cur.bytes == (size_t) -1) { /* An invalid multibyte sequence was encountered. */ iter->cur.bytes = 1; iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not very important; the string is bogus anyway. */ } else if (iter->cur.bytes == (size_t) -2) { /* An incomplete multibyte character at the end. */ iter->cur.bytes = strlen (iter->cur.ptr); iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not important; the string end is reached anyway. */ } else { if (iter->cur.bytes == 0) { /* A null wide character was encountered. */ iter->cur.bytes = 1; assert (*iter->cur.ptr == '\0'); assert (iter->cur.wc == 0); } iter->cur.wc_valid = true; /* When in the initial state, we can go back treating ASCII characters more quickly. */ if (mbsinit (&iter->state)) iter->in_shift = false; } } iter->next_done = true; } static inline void mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) { iter->cur.ptr += ptrdiff; } static inline void mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter) { if ((new_iter->in_shift = old_iter->in_shift)) memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t)); else memset (&new_iter->state, 0, sizeof (mbstate_t)); new_iter->next_done = old_iter->next_done; mb_copy (&new_iter->cur, &old_iter->cur); } /* Iteration macros. */ typedef struct mbuiter_multi mbui_iterator_t; #define mbui_init(iter, startptr) \ ((iter).cur.ptr = (startptr), \ (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ (iter).next_done = false) #define mbui_avail(iter) \ (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur)) #define mbui_advance(iter) \ ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) /* Access to the current character. */ #define mbui_cur(iter) (iter).cur #define mbui_cur_ptr(iter) (iter).cur.ptr /* Relocation. */ #define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) /* Copying an iterator. */ #define mbui_copy mbuiter_multi_copy #endif /* _MBUITER_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strncasecmp.c����������������������������������������������������������0000664�0000000�0000000�00000003670�12166360012�014642� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* strncasecmp.c -- case insensitive string comparator Copyright (C) 1998-1999, 2005-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <string.h> #include <ctype.h> #include <limits.h> #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ int strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } ������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbsrtowcs-impl.h�������������������������������������������������������0000664�0000000�0000000�00000007133�12166360012�015305� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert string to wide string. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) { if (ps == NULL) ps = &_gl_mbsrtowcs_state; { const char *src = *srcp; if (dest != NULL) { wchar_t *destptr = dest; for (; len > 0; destptr++, len--) { size_t src_avail; size_t ret; /* An optimized variant of src_avail = strnlen1 (src, MB_LEN_MAX); */ if (src[0] == '\0') src_avail = 1; else if (src[1] == '\0') src_avail = 2; else if (src[2] == '\0') src_avail = 3; else if (MB_LEN_MAX <= 4 || src[3] == '\0') src_avail = 4; else src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); /* Parse the next multibyte character. */ ret = mbrtowc (destptr, src, src_avail, ps); if (ret == (size_t)(-2)) /* Encountered a multibyte character that extends past a '\0' byte or that is longer than MB_LEN_MAX bytes. Cannot happen. */ abort (); if (ret == (size_t)(-1)) goto bad_input; if (ret == 0) { src = NULL; /* Here mbsinit (ps). */ break; } src += ret; } *srcp = src; return destptr - dest; } else { /* Ignore dest and len, don't store *srcp at the end, and don't clobber *ps. */ mbstate_t state = *ps; size_t totalcount = 0; for (;; totalcount++) { size_t src_avail; size_t ret; /* An optimized variant of src_avail = strnlen1 (src, MB_LEN_MAX); */ if (src[0] == '\0') src_avail = 1; else if (src[1] == '\0') src_avail = 2; else if (src[2] == '\0') src_avail = 3; else if (MB_LEN_MAX <= 4 || src[3] == '\0') src_avail = 4; else src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); /* Parse the next multibyte character. */ ret = mbrtowc (NULL, src, src_avail, &state); if (ret == (size_t)(-2)) /* Encountered a multibyte character that extends past a '\0' byte or that is longer than MB_LEN_MAX bytes. Cannot happen. */ abort (); if (ret == (size_t)(-1)) goto bad_input2; if (ret == 0) { /* Here mbsinit (&state). */ break; } src += ret; } return totalcount; } bad_input: *srcp = src; bad_input2: errno = EILSEQ; return (size_t)(-1); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/vasnprintf.c�����������������������������������������������������������0000664�0000000�0000000�00000664763�12166360012�014532� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's <stdio.h> to provide a prototype for snprintf(). This must come before <config.h> because <config.h> may include <features.h>, and once <features.h> has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include <config.h> #endif #ifndef IN_LIBINTL # include <alloca.h> #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include <locale.h> /* localeconv() */ #include <stdio.h> /* snprintf(), sprintf() */ #include <stdlib.h> /* abort(), malloc(), realloc(), free() */ #include <string.h> /* memcpy(), strlen() */ #include <errno.h> /* errno */ #include <limits.h> /* CHAR_BIT */ #include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include <langinfo.h> #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #include "verify.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include <math.h> # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include <math.h> # include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include <math.h> # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include <math.h> # include "isnand-nolibm.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include <math.h> # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # define DCHAR_SET wmemset # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # define DCHAR_SET memset # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the function _snwprintf() or - on mingw - snwprintf() instead. The mingw function snwprintf() has fewer bugs than the MSVCRT function _snwprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snwprintf # else # define SNPRINTF _snwprintf # endif # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. Also don't use it on Linux libc5, since there snprintf with size = 1 writes any output without bounds, like sprintf. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT function _snprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # else # define SNPRINTF _snprintf # endif # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" warnings in this file. Use -Dlint to suppress them. */ #ifdef lint # define IF_LINT(Code) Code #else # define IF_LINT(Code) /* empty */ #endif /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() and remainder() functions. */ #undef exp #define exp expo #undef remainder #define remainder rem #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION # if (HAVE_STRNLEN && !defined _AIX) # define local_strnlen strnlen # else # ifndef local_strnlen_defined # define local_strnlen_defined 1 static size_t local_strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } # endif # endif #endif #if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION # if HAVE_WCSNLEN # define local_wcsnlen wcsnlen # else # ifndef local_wcsnlen_defined # define local_wcsnlen_defined 1 static size_t local_wcsnlen (const wchar_t *s, size_t maxlen) { const wchar_t *ptr; for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) ; return ptr - s; } # endif # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems and MacOS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnand (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zerol (long double x) { return isnanl (x) || x + x == x; } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m<n, then q:=0 and r:=a. If m>=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta} j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j]. Normalise [q[m-1],...,q[0]], yields q. If m>=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize. Shift a and b left by s bits, copying them. r:=a. r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m<n: trivial case. q=0, r := copy of a. */ r_ptr = roomptr; r_len = a_len; memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); q_ptr = roomptr + a_len; q_len = 0; } else if (b_len == 1) { /* n=1: single precision division. beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ /* Determine s = GMP_LIMB_BITS - integer_length (msd). Code copied from gnulib's integer_length.c. */ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) s = __builtin_clz (msd); # else # if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT if (GMP_LIMB_BITS <= DBL_MANT_BIT) { /* Use 'double' operations. Assumes an IEEE 754 'double' implementation. */ # define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) # define DBL_EXP_BIAS (DBL_EXP_MASK / 2 - 1) # define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { double value; unsigned int word[NWORDS]; } m; /* Use a single integer to floating-point conversion. */ m.value = msd; s = GMP_LIMB_BITS - (((m.word[DBL_EXPBIT0_WORD] >> DBL_EXPBIT0_BIT) & DBL_EXP_MASK) - DBL_EXP_BIAS); } else # undef NWORDS # endif { s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } # endif } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta). */ { mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */ ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2]; mp_twolimb_t c3 = /* b[n-2] * q* */ (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star; /* While c2 < c3, increase c2 and decrease c3. Consider c3-c2. While it is > 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess precision. */ if (!(y == 0.0L)) abort (); # endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif /* Tests whether a string of digits consists of exactly PRECISION zeroes and a single '1' digit. */ static int is_borderline (const char *digits, size_t precision) { for (; precision > 0; precision--, digits++) if (*digits != '0') return 0; if (*digits != '1') return 0; digits++; return *digits == '\0'; } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 /* Use a different function name, to make it possible that the 'wchar_t' parametrization and the 'char' parametrization get compiled in the same translation unit. */ # if WIDE_CHAR_VERSION # define MAX_ROOM_NEEDED wmax_room_needed # else # define MAX_ROOM_NEEDED max_room_needed # endif /* Returns the number of TCHAR_T units needed as temporary space for the result of sprintf or SNPRINTF of a single conversion directive. */ static inline size_t MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, arg_type type, int flags, size_t width, int has_precision, size_t precision, int pad_ourselves) { size_t tmp_length; switch (conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { # if WIDE_CHAR_VERSION /* ISO C says about %ls in fwprintf: "If the precision is not specified or is greater than the size of the array, the array shall contain a null wide character." So if there is a precision, we must not use wcslen. */ const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; if (has_precision) tmp_length = local_wcsnlen (arg, precision); else tmp_length = local_wcslen (arg); # else /* ISO C says about %ls in fprintf: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." So if there is a precision, we must not use wcslen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # endif } else # endif { # if WIDE_CHAR_VERSION /* ISO C says about %s in fwprintf: "If the precision is not specified or is greater than the size of the converted array, the converted array shall contain a null wide character." So if there is a precision, we must not use strlen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # else /* ISO C says about %s in fprintf: "If the precision is not specified or greater than the size of the array, the array shall contain a null character." So if there is a precision, we must not use strlen. */ const char *arg = ap->arg[arg_index].a.a_string; if (has_precision) tmp_length = local_strnlen (arg, precision); else tmp_length = strlen (arg); # endif } break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (!pad_ourselves) { # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif } tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ return tmp_length; } #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ if (d.dir != d.direct_alloc_dir) \ free (d.dir); \ if (a.arg != a.direct_alloc_arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = (unsigned char) *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ converted = u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ converted = u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ converted = u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T else if (dp->conversion == 's' # if WIDE_CHAR_VERSION && a.arg[dp->arg_index].type != TYPE_WIDE_STRING # else && a.arg[dp->arg_index].type == TYPE_WIDE_STRING # endif ) { /* The normal handling of the 's' directive below requires allocating a temporary buffer. The determination of its length (tmp_length), in the case when a precision is specified, below requires a conversion between a char[] string and a wchar_t[] wide string. It could be done, but we have no guarantee that the implementation of sprintf will use the exactly same algorithm. Without this guarantee, it is possible to have buffer overrun bugs. In order to avoid such bugs, we implement the entire processing of the 's' directive ourselves. */ int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } # if WIDE_CHAR_VERSION /* %s in vasnwprintf. See the specification of fwprintf. */ { const char *arg = a.arg[dp->arg_index].a.a_string; const char *arg_end; size_t characters; if (has_precision) { /* Use only as many bytes as needed to produce PRECISION wide characters, from the left. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of wide characters. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } if (has_precision || has_width) { /* We know the number of wide characters in advance. */ size_t remaining; # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; remaining--) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); result[length++] = wc; arg += count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); ENSURE_ALLOCATION (xsum (length, 1)); result[length++] = wc; arg += count; } } if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # else /* %ls in vasnprintf. See the specification of fprintf. */ { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; const wchar_t *arg_end; size_t characters; # if !DCHAR_IS_TCHAR /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; # endif size_t w; if (has_precision) { /* Use only as many wide characters as needed to produce at most PRECISION bytes, from the left. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; while (precision > 0) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } if (precision < count) break; arg_end++; characters += count; precision -= count; } } # if DCHAR_IS_TCHAR else if (has_width) # else else # endif { /* Use the entire string, and count the number of bytes. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end++; characters += count; } } # if DCHAR_IS_TCHAR else { /* Use the entire string. */ arg_end = arg + local_wcslen (arg); /* The number of bytes doesn't matter. */ characters = 0; } # endif # if !DCHAR_IS_TCHAR /* Convert the string into a piece of temporary memory. */ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); if (tmpsrc == NULL) goto out_of_memory; { TCHAR_T *tmpptr = tmpsrc; size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (tmpptr, cbuf, count); tmpptr += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } /* Convert from TCHAR_T[] to DCHAR_T[]. */ tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, characters, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; free (tmpsrc); if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } free (tmpsrc); # endif if (has_width) { # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = characters; # endif } else /* w doesn't matter. */ w = 0; if (has_width && width > w && !(dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_TCHAR if (has_precision || has_width) { /* We know the number of bytes in advance. */ size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (result + length, cbuf, count); length += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; arg++; } } # else ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); length += tmpdst_len; # endif if (has_width && width > w && (dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # endif } #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. Some systems in this category (IRIX 5.3) also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. But for %a, %A, the default precision is 0. */ if (!has_precision) if (!(dp->conversion == 'a' || dp->conversion == 'A')) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnand (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0L)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else if (dp->conversion == 'a' || dp->conversion == 'A') { *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion - 'A' + 'P'; *p++ = '+'; *p++ = '0'; } else abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; size_t width; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if NEED_PRINTF_FLAG_LEFTADJUST # define pad_ourselves 1 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2] IF_LINT (= { 0 }); int orig_errno; #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; #if __GLIBC__ >= 2 && !defined __UCLIBC__ if (flags & FLAG_LOCALIZED) *fbp++ = 'I'; #endif if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; /*FALLTHROUGH*/ # endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's return value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and gl_SNPRINTF_TRUNCATION_C99 pass. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ /* On native Windows systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes '4', '5', '6' into buf, not '4', '5', '\0'.) - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. On native Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx> So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Ensure that maxlen below will be >= 2. Needed on BeOS, where an snprintf() with maxlen==1 acts like sprintf(). */ ENSURE_ALLOCATION (xsum (length, (2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR)); /* Prepare checking whether snprintf returns the count via %n. */ *(TCHAR_T *) (result + length) = '\0'; #endif orig_errno = errno; for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif errno = 0; switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { # if !HAVE_SNPRINTF_RETVAL_C99 /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. But a failure at this point can also come from other reasons than a too small buffer, such as an invalid wide string argument to the %ls directive, or possibly an invalid floating-point argument. */ size_t tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (maxlen < tmp_length) { /* Make more room. But try to do through this reallocation only once. */ size_t bigger_need = xsum (length, xsum (tmp_length, TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); /* And always grow proportionally. (There may be several arguments, each needing a little more room than the previous one.) */ size_t bigger_need2 = xsum (xtimes (allocated, 2), 12); if (bigger_need < bigger_need2) bigger_need = bigger_need2; ENSURE_ALLOCATION (bigger_need); continue; } # endif } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { /* SNPRINTF or sprintf failed. Save and use the errno that it has set, if any. */ int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = (saved_errno != 0 ? saved_errno : (dp->conversion == 'c' || dp->conversion == 's' ? EILSEQ : EINVAL)); return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least (count + 1) * sizeof (TCHAR_T) bytes. (The +1 is for the trailing NUL.) But ask for (count + 2) * sizeof (TCHAR_T) bytes, so that in the next round, we likely get maxlen > (unsigned int) count + 1 and so we don't get here again. And allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, ((unsigned int) count + 2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif #if !DCHAR_IS_TCHAR /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = (unsigned char) *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); # if USE_SNPRINTF length += count; ENSURE_ALLOCATION (n); length -= count; # else ENSURE_ALLOCATION (n); # endif } /* Here count + pad <= allocated - length. */ { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } errno = orig_errno; #undef pad_ourselves #undef prec_ourselves } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; #if USE_SNPRINTF overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; #endif out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef MAX_ROOM_NEEDED #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF �������������id-utils-4.6+git20120811/lib/regex_internal.h�������������������������������������������������������0000664�0000000�0000000�00000056542�12166360012�015341� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extended regular expression matching and search library. Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include <assert.h> #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <langinfo.h> #ifndef _LIBC # include "localcharset.h" #endif #include <locale.h> #include <wchar.h> #include <wctype.h> #include <stdint.h> #if defined _LIBC # include <bits/libc-lock.h> #else # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include <locale/localeinfo.h> # include <locale/elem-hash.h> # include <locale/coll-lookup.h> # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include <libintl.h> # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif /* For loser systems without the definition. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # ifdef _LIBC # define inline # endif #endif /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 /* Number of single byte characters. */ #define SBC_MAX (UCHAR_MAX + 1) #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # define __wctype wctype # define __iswctype iswctype # define __btowc btowc # define __wcrtomb wcrtomb # define __mbrtowc mbrtowc # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # define __attribute(arg) __attribute__ (arg) #else # define __attribute(arg) #endif typedef __re_idx_t Idx; /* Special return value for failure to match. */ #define REG_MISSING ((Idx) -1) /* Special return value for internal error. */ #define REG_ERROR ((Idx) -2) /* Test whether N is a valid index, and is not one of the above. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) #else # define REG_VALID_INDEX(n) (0 <= (n)) #endif /* Test whether N is a valid nonzero index. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) #else # define REG_VALID_NONZERO_INDEX(n) (0 < (n)) #endif /* A hash value, suitable for computing hash tables. */ typedef __re_size_t re_hashval_t; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. For portability to hosts with padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; instead, deduce it directly from BITSET_WORD_MAX. Avoid greater-than-32-bit integers and unconditional shifts by more than 31 bits, as they're not portable. */ #if BITSET_WORD_MAX == 0xffffffffUL # define BITSET_WORD_BITS 32 #elif BITSET_WORD_MAX >> 31 >> 4 == 1 # define BITSET_WORD_BITS 36 #elif BITSET_WORD_MAX >> 31 >> 16 == 1 # define BITSET_WORD_BITS 48 #elif BITSET_WORD_MAX >> 31 >> 28 == 1 # define BITSET_WORD_BITS 60 #elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 # define BITSET_WORD_BITS 64 #elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 # define BITSET_WORD_BITS 72 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 # define BITSET_WORD_BITS 128 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 # define BITSET_WORD_BITS 256 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 # define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ # if BITSET_WORD_BITS <= SBC_MAX # error "Invalid SBC_MAX" # endif #else # error "Add case for new bitset_word_t size" #endif /* Number of bitset_word_t values in a bitset_t. */ #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { Idx alloc; Idx nelem; Idx *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ Idx nmbchars; /* # of collating symbols. */ Idx ncoll_syms; /* # of equivalence classes. */ Idx nequiv_classes; /* # of range expressions. */ Idx nranges; /* # of character classes. */ Idx nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; Idx *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ Idx raw_mbs_idx; /* The length of the valid characters in the buffers. */ Idx valid_len; /* The corresponding number of bytes in raw_mbs array. */ Idx valid_raw_len; /* The length of the buffers MBS and WCS. */ Idx bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ Idx cur_idx; /* length of RAW_MBS array. */ Idx raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ Idx len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ Idx raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ Idx stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* true if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # define internal_function #endif static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) internal_function; #ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, Idx idx, int eflags) internal_function __attribute ((pure)); #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #include <alloca.h> #ifndef _LIBC # if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # undef alloca # define alloca(n) malloc (n) # endif #endif #ifndef MAX # define MAX(a,b) ((a) < (b) ? (b) : (a)) #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* 'node_idx' is the index in dfa->nodes, if 'type' == 0. Otherwise 'type' indicate the type of this node. */ Idx node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { re_hashval_t hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept "multi byte". Note that we refer to multibyte characters, and multi character collating elements as "multi byte". */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { Idx num; Idx alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { Idx next_idx; Idx alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { Idx node; Idx str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { Idx str_idx; Idx node; state_array_t *path; Idx alasts; /* Allocation size of LASTS. */ Idx nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { Idx node; Idx str_idx; Idx subexp_from; Idx subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ Idx match_last; Idx last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; Idx state_log_top; /* Back reference cache. */ Idx nbkref_ents; Idx abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; Idx nsub_tops; Idx asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; Idx last_node; Idx last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { Idx idx; Idx node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { Idx num; Idx alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; Idx *nexts; Idx *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions 're_nsub' is in regex_t. */ re_hashval_t state_hash_mask; Idx init_node; Idx nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; Idx *subexp_map; #ifdef DEBUG char* re_str; #endif #ifdef _LIBC __libc_lock_define (, lock) #endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset_t operation. */ static inline void bitset_set (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } static inline void bitset_clear (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } static inline bool bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } static inline void bitset_empty (bitset_t set) { memset (set, '\0', sizeof (bitset_t)); } static inline void bitset_set_all (bitset_t set) { memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } static inline void bitset_copy (bitset_t dest, const bitset_t src) { memcpy (dest, src, sizeof (bitset_t)); } static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) & ~set[BITSET_WORDS - 1]); } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) re_string_char_size_at (const re_string_t *pstr, Idx idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t internal_function __attribute ((pure)) re_string_wchar_at (const re_string_t *pstr, Idx idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # include <locale/weight.h> uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif #endif /* _REGEX_INTERNAL_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/regcomp.c��������������������������������������������������������������0000664�0000000�0000000�00000333102�12166360012�013750� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extended regular expression matching and search library. Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ static const char __re_error_msgid[] = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; static const size_t __re_error_msgid_idx[] = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields are set in BUFP on entry. */ #ifdef _LIBC const char * re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; #else /* size_t might promote */ const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) #endif { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by 're_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute ((always_inline)) re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; Idx node_cnt; bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { Idx node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; unsigned char *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, false, buf[0]); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; Idx i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set 'buffer' to the compiled pattern; 'used' to the length of the compiled pattern; 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; 'newline_anchor' to REG_NEWLINE being set in CFLAGS; 'fastmap' to an allocated space for the fastmap; 'fastmap_accurate' to zero; 're_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *_Restrict_ preg; const char *_Restrict_ pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ #ifdef _LIBC size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *_Restrict_ preg; char *_Restrict_ errbuf; size_t errbuf_size; #else /* size_t might promote */ size_t regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, size_t errbuf_size) #endif { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { size_t cpy_size = msg_size; if (BE (msg_size > errbuf_size, 0)) { cpy_size = errbuf_size - 1; errbuf[cpy_size] = '\0'; } memcpy (errbuf, msg, cpy_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ # if 4 * BITSET_WORD_BITS < ASCII_CHARS # error "bitset_word_t is narrower than 32 bits" # elif 3 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, # endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) }; #endif static void free_dfa_content (re_dfa_t *dfa) { Idx i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since 're_exec' always passes NULL for the 'regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, (syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC char *codeset_name; #endif #ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); #else size_t max_i18n_object_size = 0; #endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), MAX (sizeof (regmatch_t), max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. The extra "/ 2" is for the table_size doubling calculation below, and for similar doubling calculations elsewhere. And it's <= rather than <, because some of the doubling calculations add 1 afterwards. */ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else codeset_name = nl_langinfo (CODESET); if (strcasecmp (codeset_name, "UTF-8") == 0 || strcasecmp (codeset_name, "UTF8") == 0) dfa->is_utf8 = 1; /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { int i, j, ch; dfa->word_ops_used = 1; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { Idx first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { Idx node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; Idx clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { Idx dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { reg_errcode_t merge_err = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); if (merge_err != REG_NOERROR) return merge_err; i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { Idx node; int i; bool mb_chars = false; bool has_period = false; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: switch (dfa->nodes[node].opr.ctx_type) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. It's okay to test opr.ctx_type since constraints (for all DFA nodes) are created by ORing one or more opr.ctx_type values. */ return; } break; case OP_PERIOD: has_period = true; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. */ { int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) { if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) return; rshift = 0; } } break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= ASCII_CHARS) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (Idx, preg->re_nsub); if (dfa->subexp_map != NULL) { Idx i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { Idx other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == REG_MISSING, 0)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; Idx idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { Idx left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (REG_VALID_INDEX (left)); assert (REG_VALID_INDEX (right)); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, Idx root_node, unsigned int init_constraint) { Idx org_node, clone_node; bool ok; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { Idx org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* If the node is root_node itself, it means the epsilon closure has a loop. Then tie it to the destination of the root_node. */ if (org_node == root_node && clone_node != org_node) { ok = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (! ok, 0)) return REG_ESPACE; break; } /* In case the node has another constraint, append it. */ constraint |= dfa->nodes[org_node].constraint; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == REG_MISSING) { /* There is no such duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint) { Idx idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return REG_MISSING; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or REG_MISSING if insufficient storage is available. */ static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) { Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != REG_MISSING, 1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { Idx src, idx; bool ok; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { Idx *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (! ok, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { Idx node_idx; bool incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = false; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = false; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != REG_MISSING); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of 'node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) { reg_errcode_t err; Idx i; re_node_set eclosure; bool ok; bool incomplete = false; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = REG_MISSING; /* If the current node has constraints, duplicate all nodes since they must inherit the constraints. */ if (dfa->nodes[node].constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; Idx edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of 'edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == REG_MISSING) { incomplete = true; continue; } /* If we haven't calculated the epsilon closure of 'edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of 'edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); if (BE (err != REG_NOERROR, 0)) return err; /* If the epsilon closure of 'edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } /* An epsilon closure includes itself. */ ok = re_node_set_insert (&eclosure, node); if (BE (! ok, 0)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression <reg_exp>: CAT / \ / \ <reg_exp> EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression <branch1>|<branch2>: ALT / \ / \ <branch1> <branch2> ALT means alternative, which represents the operator '|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) return NULL; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression <exp1><exp2>: CAT / \ / \ <exp1> <exp2> CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { bin_tree_t *tree, *expr; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { expr = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && expr == NULL, 0)) { return NULL; } if (tree != NULL && expr != NULL) { tree = create_tree (dfa, tree, expr, CONCAT); if (tree == NULL) { *err = REG_ESPACE; return NULL; } } else if (tree == NULL) tree = expr; /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "<ANCHOR(^)><CHAR(*)>", it must not be "<ANCHOR(^)><REPEAT(*)>". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "alnum", (const unsigned char *) "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "space", (const unsigned char *) "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (<reg_exp>): SUBEXP | <reg_exp> */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) *err = REG_EPAREN; if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; Idx i, start, end, start_idx = re_string_cur_idx (regexp); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == REG_MISSING) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* <re>{} is invalid. */ return NULL; } } if (BE (start != REG_ERROR, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : REG_ERROR)); } if (BE (start == REG_ERROR || end == REG_ERROR, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE ((end != REG_MISSING && start > end) || token->type != OP_CLOSE_DUP_NUM, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, NULL, (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* From gnulib's "intprops.h": True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* This loop is actually executed only when end != REG_MISSING, to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have already created the start+1-th copy. */ if (TYPE_SIGNED (Idx) || end != REG_MISSING) for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; cmp_buf[0] = start_wc; cmp_buf[4] = end_wc; if (BE ((syntax & RE_NO_EMPTY_RANGES) && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { cmp_buf[2] = wc; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function build_collating_symbol (bitset_t sbcset, # ifdef RE_ENABLE_I18N re_charset_t *mbcset, Idx *coll_sym_alloc, # endif const unsigned char *name) { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } return elem; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; Idx *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; Idx *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; Idx equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ bool non_match = false; bin_tree_t *work_tree; int token_len; bool first_round = true; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0; bool is_range_exp = false; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = false; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = true; } } if (is_range_exp == true) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, true); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (syntax, sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [:<character_class>:], [.<collating_element>.], and [=<equivalent_class>=]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include <locale/weight.h> /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp); if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } if (non_match) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from 'input', and return the number. Return REG_MISSING if the number field is empty like "{,1}". Return REG_ERROR if an error occurred. */ static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { Idx num = REG_MISSING; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return REG_ERROR; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == REG_ERROR) ? REG_ERROR : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? REG_ERROR : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = REG_MISSING; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { Idx idx = (Idx) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/error.h����������������������������������������������������������������0000664�0000000�0000000�00000004746�12166360012�013463� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Declaration for error-reporting function Copyright (C) 1995-1997, 2003, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #ifndef _ERROR_H #define _ERROR_H 1 /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Print a message with 'fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ extern void (*error_print_progname) (void); /* This variable is incremented each time 'error' is called. */ extern unsigned int error_message_count; /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ extern int error_one_per_line; #ifdef __cplusplus } #endif #endif /* error.h */ ��������������������������id-utils-4.6+git20120811/lib/isnan.c����������������������������������������������������������������0000664�0000000�0000000�00000014364�12166360012�013432� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* Specification. */ #ifdef USE_LONG_DOUBLE /* Specification found in math.h or isnanl-nolibm.h. */ extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; #elif ! defined USE_FLOAT /* Specification found in math.h or isnand-nolibm.h. */ extern int rpl_isnand (double x); #else /* defined USE_FLOAT */ /* Specification found in math.h or isnanf-nolibm.h. */ extern int rpl_isnanf (float x); #endif #include <float.h> #include <string.h> #include "float+.h" #ifdef USE_LONG_DOUBLE # define FUNC rpl_isnanl # define DOUBLE long double # define MAX_EXP LDBL_MAX_EXP # define MIN_EXP LDBL_MIN_EXP # if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD LDBL_EXPBIT0_WORD # define EXPBIT0_BIT LDBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_LDBL # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC rpl_isnand # define DOUBLE double # define MAX_EXP DBL_MAX_EXP # define MIN_EXP DBL_MIN_EXP # if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD DBL_EXPBIT0_WORD # define EXPBIT0_BIT DBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_DBL # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC rpl_isnanf # define DOUBLE float # define MAX_EXP FLT_MAX_EXP # define MIN_EXP FLT_MIN_EXP # if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD FLT_EXPBIT0_WORD # define EXPBIT0_BIT FLT_EXPBIT0_BIT # endif # define SIZE SIZEOF_FLT # define L_(literal) literal##f #endif #define EXP_MASK ((MAX_EXP - MIN_EXP) | 7) #define NWORDS \ ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; int FUNC (DOUBLE x) { #ifdef KNOWN_EXPBIT0_LOCATION # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Special CPU dependent code is needed to treat bit patterns outside the IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs. These bit patterns are: - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0, - exponent = 0x0000, mantissa bit 63 = 1. The NaN bit pattern is: - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */ memory_double m; unsigned int exponent; m.value = x; exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK; # ifdef WORDS_BIGENDIAN /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */ if (exponent == 0) return 1 & (m.word[0] >> 15); else if (exponent == EXP_MASK) return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0; else return 1 & ~(m.word[0] >> 15); # else /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */ if (exponent == 0) return (m.word[1] >> 31); else if (exponent == EXP_MASK) return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0; else return (m.word[1] >> 31) ^ 1; # endif # else /* Be careful to not do any floating-point operation on x, such as x == x, because x may be a signaling NaN. */ # if defined __SUNPRO_C || defined __ICC || defined _MSC_VER \ || defined __DECC || defined __TINYC__ \ || (defined __sgi && !defined __GNUC__) /* The Sun C 5.0, Intel ICC 10.0, Microsoft Visual C/C++ 9.0, Compaq (ex-DEC) 6.4, and TinyCC compilers don't recognize the initializers as constant expressions. The Compaq compiler also fails when constant-folding 0.0 / 0.0 even when constant-folding is not required. The Microsoft Visual C/C++ compiler also fails when constant-folding 1.0 / 0.0 even when constant-folding is not required. The SGI MIPSpro C compiler complains about "floating-point operation result is out of range". */ static DOUBLE zero = L_(0.0); memory_double nan; DOUBLE plus_inf = L_(1.0) / zero; DOUBLE minus_inf = -L_(1.0) / zero; nan.value = zero / zero; # else static memory_double nan = { L_(0.0) / L_(0.0) }; static DOUBLE plus_inf = L_(1.0) / L_(0.0); static DOUBLE minus_inf = -L_(1.0) / L_(0.0); # endif { memory_double m; /* A NaN can be recognized through its exponent. But exclude +Infinity and -Infinity, which have the same exponent. */ m.value = x; if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD]) & (EXP_MASK << EXPBIT0_BIT)) == 0) return (memcmp (&m.value, &plus_inf, SIZE) != 0 && memcmp (&m.value, &minus_inf, SIZE) != 0); else return 0; } # endif #else /* The configuration did not find sufficient information. Give up about the signaling NaNs, handle only the quiet NaNs. */ if (x == x) { # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Detect any special bit patterns that pass ==; see comment above. */ memory_double m1; memory_double m2; memset (&m1.value, 0, SIZE); memset (&m2.value, 0, SIZE); m1.value = x; m2.value = x + (x ? 0.0L : -0.0L); if (memcmp (&m1.value, &m2.value, SIZE) != 0) return 1; # endif return 0; } else return 1; #endif } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strnlen.c��������������������������������������������������������������0000664�0000000�0000000�00000002275�12166360012�014005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Find the length of STRING, but scan at most MAXLEN characters. Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <string.h> /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ size_t strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/btowc.c����������������������������������������������������������������0000664�0000000�0000000�00000002107�12166360012�013430� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert unibyte character to wide character. Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #include <stdio.h> #include <stdlib.h> wint_t btowc (int c) { if (c != EOF) { char buf[1]; wchar_t wc; buf[0] = c; if (mbtowc (&wc, buf, 1) >= 0) return wc; } return WEOF; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/malloc.c���������������������������������������������������������������0000664�0000000�0000000�00000003043�12166360012�013561� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* malloc() function that is glibc compatible. Copyright (C) 1997-1998, 2006-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering and Bruno Haible */ #define _GL_USE_STDLIB_ALLOC 1 #include <config.h> /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU 1 # undef malloc /* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU # define NEED_MALLOC_GNU 1 #endif #include <stdlib.h> #include <errno.h> /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #if NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strcasestr.c�����������������������������������������������������������0000664�0000000�0000000�00000006050�12166360012�014510� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Case-insensitive searching in a string. Copyright (C) 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <string.h> #include <ctype.h> #include <stdbool.h> #include <strings.h> #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Two-Way algorithm. */ #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) #define CANON_ELEMENT(c) TOLOWER (c) #define CMP_FUNC(p1, p2, l) \ strncasecmp ((const char *) (p1), (const char *) (p2), l) #include "str-two-way.h" /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. This function gives unspecified results in multibyte locales. */ char * strcasestr (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; size_t needle_len; /* Length of NEEDLE. */ size_t haystack_len; /* Known minimum length of HAYSTACK. */ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ /* Determine length of NEEDLE, and in the process, make sure HAYSTACK is at least as long (no point processing all of a long NEEDLE if HAYSTACK is too short). */ while (*haystack && *needle) { ok &= (TOLOWER ((unsigned char) *haystack) == TOLOWER ((unsigned char) *needle)); haystack++; needle++; } if (*needle) return NULL; if (ok) return (char *) haystack_start; needle_len = needle - needle_start; haystack = haystack_start + 1; haystack_len = needle_len - 1; /* Perform the search. Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ if (needle_len < LONG_NEEDLE_THRESHOLD) return two_way_short_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); return two_way_long_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); } #undef LONG_NEEDLE_THRESHOLD ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xgetcwd.h��������������������������������������������������������������0000664�0000000�0000000�00000001412�12166360012�013762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* prototype for xgetcwd Copyright (C) 1995, 2001, 2003, 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 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 <http://www.gnu.org/licenses/>. */ extern char *xgetcwd (void); ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/exitfail.h�������������������������������������������������������������0000664�0000000�0000000�00000001402�12166360012�014121� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Failure exit status Copyright (C) 2002, 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 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 <http://www.gnu.org/licenses/>. */ extern int volatile exit_failure; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/verify.h���������������������������������������������������������������0000664�0000000�0000000�00000022650�12166360012�013630� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Compile-time assert-like macros. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_VERIFY_H # define _GL_VERIFY_H /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. This is supported by GCC 4.6.0 and later, in C mode, and its use here generates easier-to-read diagnostics when verify (R) fails. Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. This will likely be supported by future GCC versions, in C++ mode. Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ # if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus # define _GL_HAVE__STATIC_ASSERT 1 # endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ # if (99 < __GNUC__) && defined __cplusplus # define _GL_HAVE_STATIC_ASSERT 1 # endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. If _Static_assert works, verify (R) uses it directly. Similarly, _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct that is an operand of sizeof. The code below uses several ideas for C++ compilers, and for C compilers that do not support _Static_assert: * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct _gl_verify_type will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define _GL_CONCAT0(x, y) x##y #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) extern struct {...} * _GL_CONCAT (dummy, __LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. (The GCC __COUNTER__ macro solves this problem, but is not portable.) A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct _gl_verify_type {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct _gl_verify_type {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * GCC warns about duplicate declarations of the dummy function if -Wredundant_decls is used. GCC 4.3 and later have a builtin __COUNTER__ macro that can let us generate unique identifiers for each dummy function, to suppress this warning. * This implementation exploits the fact that older versions of GCC, which do not support _Static_assert, also do not warn about the last declaration mentioned above. * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ # define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) # define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ # if defined __COUNTER__ && __COUNTER__ != __COUNTER__ # define _GL_COUNTER __COUNTER__ # else # define _GL_COUNTER __LINE__ # endif /* Generate a symbol with the given prefix, making it unique if possible. */ # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression that returns 1. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. */ # define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) # ifdef __cplusplus # if !GNULIB_defined_struct__gl_verify_type template <int w> struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: w; }; # define GNULIB_defined_struct__gl_verify_type 1 # endif # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ _gl_verify_type<(R) ? 1 : -1> # elif defined _GL_HAVE__STATIC_ASSERT # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ struct { \ _Static_assert (R, DIAGNOSTIC); \ int _gl_dummy; \ } # else # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ # ifdef _GL_HAVE__STATIC_ASSERT # define _GL_VERIFY _Static_assert # else # define _GL_VERIFY(R, DIAGNOSTIC) \ extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] # endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ # ifdef _GL_STATIC_ASSERT_H # if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert # define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif # if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert # define static_assert _Static_assert /* C11 requires this #define. */ # endif # endif /* @assert.h omit start@ */ /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. */ /* Verify requirement R at compile-time, as an integer constant expression. Return 1. This is equivalent to verify_expr (R, 1). verify_true is obsolescent; please use verify_expr instead. */ # define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") /* Verify requirement R at compile-time. Return the value of the expression E. */ # define verify_expr(R, E) \ (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # define verify(R) _GL_VERIFY (R, "verify (" #R ")") /* @assert.h omit end@ */ #endif ����������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fseterr.h��������������������������������������������������������������0000664�0000000�0000000�00000002167�12166360012�013777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Set the error indicator of a stream. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _FSETERR_H #define _FSETERR_H #include <stdio.h> #ifdef __cplusplus extern "C" { #endif /* Set the error indicator of the stream FP. The "error indicator" is set when an I/O operation on the stream fails, and is cleared (together with the "end-of-file" indicator) by clearerr (FP). */ extern void fseterr (FILE *fp); #ifdef __cplusplus } #endif #endif /* _FSETERR_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/at-func.c��������������������������������������������������������������0000664�0000000�0000000�00000010132�12166360012�013644� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Define at-style functions like fstatat, unlinkat, fchownat, etc. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ #include "openat.h" #include "openat-priv.h" #include "save-cwd.h" #ifdef AT_FUNC_USE_F1_COND # define CALL_FUNC(F) \ (flag == AT_FUNC_USE_F1_COND \ ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \ : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS)) # define VALIDATE_FLAG(F) \ if (flag & ~AT_FUNC_USE_F1_COND) \ { \ errno = EINVAL; \ return FUNC_FAIL; \ } #else # define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS)) # define VALIDATE_FLAG(F) /* empty */ #endif #ifdef AT_FUNC_RESULT # define FUNC_RESULT AT_FUNC_RESULT #else # define FUNC_RESULT int #endif #ifdef AT_FUNC_FAIL # define FUNC_FAIL AT_FUNC_FAIL #else # define FUNC_FAIL -1 #endif /* Call AT_FUNC_F1 to operate on FILE, which is in the directory open on descriptor FD. If AT_FUNC_USE_F1_COND is defined to a value, AT_FUNC_POST_FILE_PARAM_DECLS must inlude a parameter named flag; call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than AT_FUNC_USE_F1_COND. Return int and fail with -1 unless AT_FUNC_RESULT or AT_FUNC_FAIL are defined. If possible, do it without changing the working directory. Otherwise, resort to using save_cwd/fchdir, then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd fails, then give a diagnostic and exit nonzero. */ FUNC_RESULT AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS) { /* Be careful to choose names unlikely to conflict with AT_FUNC_POST_FILE_PARAM_DECLS. */ struct saved_cwd saved_cwd; int saved_errno; FUNC_RESULT err; VALIDATE_FLAG (flag); if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) return CALL_FUNC (file); { char proc_buf[OPENAT_BUFFER_SIZE]; char *proc_file = openat_proc_name (proc_buf, fd, file); if (proc_file) { FUNC_RESULT proc_result = CALL_FUNC (proc_file); int proc_errno = errno; if (proc_file != proc_buf) free (proc_file); /* If the syscall succeeds, or if it fails with an unexpected errno value, then return right away. Otherwise, fall through and resort to using save_cwd/restore_cwd. */ if (FUNC_FAIL != proc_result) return proc_result; if (! EXPECTED_ERRNO (proc_errno)) { errno = proc_errno; return proc_result; } } } if (save_cwd (&saved_cwd) != 0) openat_save_fail (errno); if (0 <= fd && fd == saved_cwd.desc) { /* If saving the working directory collides with the user's requested fd, then the user's fd must have been closed to begin with. */ free_cwd (&saved_cwd); errno = EBADF; return FUNC_FAIL; } if (fchdir (fd) != 0) { saved_errno = errno; free_cwd (&saved_cwd); errno = saved_errno; return FUNC_FAIL; } err = CALL_FUNC (file); saved_errno = (err == FUNC_FAIL ? errno : 0); if (restore_cwd (&saved_cwd) != 0) openat_restore_fail (errno); free_cwd (&saved_cwd); if (saved_errno) errno = saved_errno; return err; } #undef CALL_FUNC #undef FUNC_RESULT #undef FUNC_FAIL ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dirname.c��������������������������������������������������������������0000664�0000000�0000000�00000002263�12166360012�013734� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000-2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <stdlib.h> #include <string.h> #include "xalloc.h" /* Just like mdir_name (dirname-lgpl.c), except, rather than returning NULL upon malloc failure, here, we report the "memory exhausted" condition and exit. */ char * dir_name (char const *file) { char *result = mdir_name (file); if (!result) xalloc_die (); return result; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/memchr.valgrind��������������������������������������������������������0000664�0000000�0000000�00000000652�11434330764�015164� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Suppress a valgrind message about use of uninitialized memory in memchr(). # POSIX states that when the character is found, memchr must not read extra # bytes in an overestimated length (for example, where memchr is used to # implement strnlen). However, we use a safe word read to provide a speedup. { memchr-value4 Memcheck:Value4 fun:rpl_memchr } { memchr-value8 Memcheck:Value8 fun:rpl_memchr } ��������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/regex.h����������������������������������������������������������������0000664�0000000�0000000�00000062113�12166360012�013434� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Definitions for data structures and routines for the regular expression library. Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_H #define _REGEX_H 1 #include <sys/types.h> /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* Define __USE_GNU_REGEX to declare GNU extensions that violate the POSIX name space rules. */ #undef __USE_GNU_REGEX #if (defined _GNU_SOURCE \ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ && !defined _XOPEN_SOURCE)) # define __USE_GNU_REGEX 1 #endif #ifdef _REGEX_LARGE_OFFSETS /* Use types and values that are wide enough to represent signed and unsigned byte offsets in memory. This currently works only when the regex code is used outside of the GNU C library; it is not yet supported within glibc itself, and glibc users should not define _REGEX_LARGE_OFFSETS. */ /* The type of the offset of a byte within a string. For historical reasons POSIX 1003.1-2004 requires that regoff_t be at least as wide as off_t. However, many common POSIX platforms set regoff_t to the more-sensible ssize_t and the Open Group has signalled its intention to change the requirement to be that regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN 60 (2005-08-25). We don't know of any hosts where ssize_t or ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ typedef ssize_t regoff_t; /* The type of nonnegative object indexes. Traditionally, GNU regex uses 'int' for these. Code that uses __re_idx_t should work regardless of whether the type is signed. */ typedef size_t __re_idx_t; /* The type of object sizes. */ typedef size_t __re_size_t; /* The type of object sizes, in places where the traditional code uses unsigned long int. */ typedef size_t __re_long_size_t; #else /* Use types that are binary-compatible with the traditional GNU regex implementation, which mishandles strings longer than INT_MAX. */ typedef int regoff_t; typedef int __re_idx_t; typedef unsigned int __re_size_t; typedef unsigned long int __re_long_size_t; #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU_REGEX /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ # define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ # define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ # define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ # define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ # define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ # define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ # define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ # define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ # define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then '{...}' defines an interval, and \{ and \} are literals. If not set, then '\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ # define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \<digit> matches <digit>. If not set, then \<digit> is a back-reference. */ # define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ # define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ # define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ # define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ # define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ # define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ # define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in a regex or immediately after an alternation, open-group or \} operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) #endif /* defined __USE_GNU_REGEX */ /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; #ifdef __USE_GNU_REGEX /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ # define RE_SYNTAX_EMACS 0 # define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) # define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) # define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS) # define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) # define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) # define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ # define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC # define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ # define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) # define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ # define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) # define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ # define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ #endif /* defined __USE_GNU_REGEX */ #ifdef __USE_GNU_REGEX /* Maximum number of duplicates an interval can allow. POSIX-conforming systems might define this in <limits.h>, but we want our value, so remove any previous define. */ # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored the counter as a 2-byte signed integer. This is no longer true, so RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. However, there would be a huge performance problem if someone actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains its historical value. */ # define RE_DUP_MAX (0x7fff) #endif /* defined __USE_GNU_REGEX */ /* POSIX 'cflags' bits (i.e., information for 'regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (1 << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (1 << 2) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (1 << 3) /* POSIX 'eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the '__re_error_msgid' table in regcomp.c. */ typedef enum { _REG_ENOSYS = -1, /* This will never happen for this implementation. */ _REG_NOERROR = 0, /* Success. */ _REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ _REG_BADPAT, /* Invalid pattern. */ _REG_ECOLLATE, /* Invalid collating element. */ _REG_ECTYPE, /* Invalid character class name. */ _REG_EESCAPE, /* Trailing backslash. */ _REG_ESUBREG, /* Invalid back reference. */ _REG_EBRACK, /* Unmatched left bracket. */ _REG_EPAREN, /* Parenthesis imbalance. */ _REG_EBRACE, /* Unmatched \{. */ _REG_BADBR, /* Invalid contents of \{\}. */ _REG_ERANGE, /* Invalid range end. */ _REG_ESPACE, /* Ran out of memory. */ _REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ _REG_EEND, /* Premature end. */ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; #ifdef _XOPEN_SOURCE # define REG_ENOSYS _REG_ENOSYS #endif #define REG_NOERROR _REG_NOERROR #define REG_NOMATCH _REG_NOMATCH #define REG_BADPAT _REG_BADPAT #define REG_ECOLLATE _REG_ECOLLATE #define REG_ECTYPE _REG_ECTYPE #define REG_EESCAPE _REG_EESCAPE #define REG_ESUBREG _REG_ESUBREG #define REG_EBRACK _REG_EBRACK #define REG_EPAREN _REG_EPAREN #define REG_EBRACE _REG_EBRACE #define REG_BADBR _REG_BADBR #define REG_ERANGE _REG_ERANGE #define REG_ESPACE _REG_ESPACE #define REG_BADRPT _REG_BADRPT #define REG_EEND _REG_EEND #define REG_ESIZE _REG_ESIZE #define REG_ERPAREN _REG_ERPAREN /* struct re_pattern_buffer normally uses member names like 'buffer' that POSIX does not allow. In POSIX mode these members have names with leading 're_' (e.g., 're_buffer'). */ #ifdef __USE_GNU_REGEX # define _REG_RE_NAME(id) id # define _REG_RM_NAME(id) id #else # define _REG_RE_NAME(id) re_##id # define _REG_RM_NAME(id) rm_##id #endif /* The user can specify the type of the re_translate member by defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned char *. This pollutes the POSIX name space, so in POSIX mode just use unsigned char *. */ #ifdef __USE_GNU_REGEX # ifndef RE_TRANSLATE_TYPE # define RE_TRANSLATE_TYPE unsigned char * # endif # define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE #else # define REG_TRANSLATE_TYPE unsigned char * #endif /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields 'buffer', 'allocated', 'fastmap', 'translate', and 'no_sub' can be set. After the pattern has been compiled, the 're_nsub' field is available. All other fields are private to the regex routines. */ struct re_pattern_buffer { /* Space that holds the compiled pattern. It is declared as 'unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *_REG_RE_NAME (buffer); /* Number of bytes to which 'buffer' points. */ __re_long_size_t _REG_RE_NAME (allocated); /* Number of bytes actually used in 'buffer'. */ __re_long_size_t _REG_RE_NAME (used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t _REG_RE_NAME (syntax); /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *_REG_RE_NAME (fastmap); /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ REG_TRANSLATE_TYPE _REG_RE_NAME (translate); /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in 're_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see 're_compile_fastmap' (the "duplicate" case). */ unsigned int _REG_RE_NAME (can_be_null) : 1; /* If REGS_UNALLOCATED, allocate space in the 'regs' structure for 'max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU_REGEX # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif unsigned int _REG_RE_NAME (regs_allocated) : 2; /* Set to zero when 're_compile_pattern' compiles a pattern; set to one by 're_compile_fastmap' if it updates the fastmap. */ unsigned int _REG_RE_NAME (fastmap_accurate) : 1; /* If set, 're_match_2' does not return information about subexpressions. */ unsigned int _REG_RE_NAME (no_sub) : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned int _REG_RE_NAME (not_bol) : 1; /* Similarly for an end-of-line anchor. */ unsigned int _REG_RE_NAME (not_eol) : 1; /* If true, an anchor at a newline matches. */ unsigned int _REG_RE_NAME (newline_anchor) : 1; /* [[[end pattern_buffer]]] */ }; typedef struct re_pattern_buffer regex_t; /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { __re_size_t _REG_RM_NAME (num_regs); regoff_t *_REG_RM_NAME (start); regoff_t *_REG_RM_NAME (end); }; /* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer, 're_match_2' returns information about at least this many registers the first time a 'regs' structure is passed. */ #if !defined RE_NREGS && defined __USE_GNU_REGEX # define RE_NREGS 30 #endif /* POSIX specification for registers. Aside from the different names than 're_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the 're_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global 're_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern regoff_t re_search (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, regoff_t __range, struct re_registers *__regs); /* Like 're_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, regoff_t __range, struct re_registers *__regs, __re_idx_t __stop); /* Like 're_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern regoff_t re_match (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, struct re_registers *__regs); /* Relates to 're_match' as 're_search_2' relates to 're_search'. */ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, struct re_registers *__regs, __re_idx_t __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least 'NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, __re_size_t __num_regs, regoff_t *__starts, regoff_t *__ends); #if defined _REGEX_RE_COMP || defined _LIBC # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ # if 199901L <= __STDC_VERSION__ # define _Restrict_ restrict # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) # define _Restrict_ __restrict # else # define _Restrict_ # endif #endif /* gcc 3.1 and up support the [restrict] syntax. Don't trust sys/cdefs.h's definition of __restrict_arr, though, as it mishandles gcc -ansi -pedantic. */ #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ && !defined __STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *_Restrict_ __preg, const char *_Restrict_ __pattern, int __cflags); extern int regexec (const regex_t *_Restrict_ __preg, const char *_Restrict_ __string, size_t __nmatch, regmatch_t __pmatch[_Restrict_arr_], int __eflags); extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, char *_Restrict_ __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fdopendir.c������������������������������������������������������������0000664�0000000�0000000�00000013135�12166360012�014267� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* provide a replacement fdopendir function Copyright (C) 2004-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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #include <config.h> #include <dirent.h> #include <stdlib.h> #include <unistd.h> #if !HAVE_FDOPENDIR # include "openat.h" # include "openat-priv.h" # include "save-cwd.h" # if GNULIB_DIRENT_SAFER # include "dirent--.h" # endif # ifndef REPLACE_FCHDIR # define REPLACE_FCHDIR 0 # endif static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *); static DIR *fd_clone_opendir (int, struct saved_cwd const *); /* Replacement for POSIX fdopendir. First, try to simulate it via opendir ("/proc/self/fd/..."). Failing that, simulate it by using fchdir metadata, or by doing save_cwd/fchdir/opendir(".")/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), then give a diagnostic and exit nonzero. If successful, the resulting stream is based on FD in implementations where streams are based on file descriptors and in applications where no other thread or signal handler allocates or frees file descriptors. In other cases, consult dirfd on the result to find out whether FD is still being used. Otherwise, this function works just like POSIX fdopendir. W A R N I N G: Unlike other fd-related functions, this one places constraints on FD. If this function returns successfully, FD is under control of the dirent.h system, and the caller should not close or modify the state of FD other than by the dirent.h functions. */ DIR * fdopendir (int fd) { DIR *dir = fdopendir_with_dup (fd, -1, NULL); if (! REPLACE_FCHDIR && ! dir) { int saved_errno = errno; if (EXPECTED_ERRNO (saved_errno)) { struct saved_cwd cwd; if (save_cwd (&cwd) != 0) openat_save_fail (errno); dir = fdopendir_with_dup (fd, -1, &cwd); saved_errno = errno; free_cwd (&cwd); errno = saved_errno; } } return dir; } /* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known to be a dup of FD which is less than FD - 1 and which will be closed by the caller and not otherwise used by the caller. This function makes sure that FD is closed and all file descriptors less than FD are open, and then calls fd_clone_opendir on a dup of FD. That way, barring race conditions, fd_clone_opendir returns a stream whose file descriptor is FD. If REPLACE_CHDIR or CWD is null, use opendir ("/proc/self/fd/...", falling back on fchdir metadata. Otherwise, CWD is a saved version of the working directory; use fchdir/opendir(".")/restore_cwd(CWD). */ static DIR * fdopendir_with_dup (int fd, int older_dupfd, struct saved_cwd const *cwd) { int dupfd = dup (fd); if (dupfd < 0 && errno == EMFILE) dupfd = older_dupfd; if (dupfd < 0) return NULL; else { DIR *dir; int saved_errno; if (dupfd < fd - 1 && dupfd != older_dupfd) { dir = fdopendir_with_dup (fd, dupfd, cwd); saved_errno = errno; } else { close (fd); dir = fd_clone_opendir (dupfd, cwd); saved_errno = errno; if (! dir) { int fd1 = dup (dupfd); if (fd1 != fd) openat_save_fail (fd1 < 0 ? errno : EBADF); } } if (dupfd != older_dupfd) close (dupfd); errno = saved_errno; return dir; } } /* Like fdopendir, except the result controls a clone of FD. It is the caller's responsibility both to close FD and (if the result is not null) to closedir the result. */ static DIR * fd_clone_opendir (int fd, struct saved_cwd const *cwd) { if (REPLACE_FCHDIR || ! cwd) { DIR *dir = NULL; int saved_errno = EOPNOTSUPP; char buf[OPENAT_BUFFER_SIZE]; char *proc_file = openat_proc_name (buf, fd, "."); if (proc_file) { dir = opendir (proc_file); saved_errno = errno; if (proc_file != buf) free (proc_file); } # if REPLACE_FCHDIR if (! dir && EXPECTED_ERRNO (saved_errno)) { char const *name = _gl_directory_name (fd); return (name ? opendir (name) : NULL); } # endif errno = saved_errno; return dir; } else { if (fchdir (fd) != 0) return NULL; else { DIR *dir = opendir ("."); int saved_errno = errno; if (restore_cwd (cwd) != 0) openat_restore_fail (errno); errno = saved_errno; return dir; } } } #else /* HAVE_FDOPENDIR */ # include <errno.h> # include <sys/stat.h> # undef fdopendir /* Like fdopendir, but work around GNU/Hurd bug by validating FD. */ DIR * rpl_fdopendir (int fd) { struct stat st; if (fstat (fd, &st)) return NULL; if (!S_ISDIR (st.st_mode)) { errno = ENOTDIR; return NULL; } return fdopendir (fd); } #endif /* HAVE_FDOPENDIR */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-args.h����������������������������������������������������������0000664�0000000�0000000�00000007644�12166360012�014566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007, 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include <stddef.h> /* Get wchar_t. */ #if HAVE_WCHAR_T # include <stddef.h> #endif /* Get wint_t. */ #if HAVE_WINT_T # include <wchar.h> #endif /* Get va_list. */ #include <stdarg.h> /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; /* Number of directly allocated arguments (no malloc() needed). */ #define N_DIRECT_ALLOC_ARGUMENTS 7 typedef struct { size_t count; argument *arg; argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ ��������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/regexec.c��������������������������������������������������������������0000664�0000000�0000000�00000377736�12166360012�013763� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extended regular expression matching and search library. Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, Idx n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, Idx str_idx, Idx from, Idx to) internal_function; static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) internal_function; static regoff_t re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) internal_function; static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) internal_function; static Idx check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, Idx bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) internal_function; static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) internal_function; static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static bool check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to 'regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies "execution flags" which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *_Restrict_ preg; const char *_Restrict_ string; size_t nmatch; regmatch_t pmatch[_Restrict_arr_]; int eflags; { reg_errcode_t err; Idx start, length; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) preg->buffer; #endif if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } __libc_lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length, length, nmatch, pmatch, eflags); __libc_lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include <shlib-compat.h> versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ regoff_t re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, true); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif regoff_t re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; regoff_t range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, false); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif regoff_t re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, true); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif regoff_t re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; regoff_t range; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, false); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static regoff_t internal_function re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) { const char *str; regoff_t rval; Idx len = length1 + length2; char *s = NULL; if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); #else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); #endif str = s; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); re_free (s); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is true the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static regoff_t internal_function re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) { reg_errcode_t result; regmatch_t *pmatch; Idx nregs; regoff_t rval; int eflags = 0; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; #endif Idx last_start = start + range; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (length < last_start || (0 <= range && last_start < start), 0)) last_start = length; else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) last_start = 0; __libc_lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs <= bufp->re_nsub, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, last_start, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: __libc_lock_unlock (dfa->lock); return rval; } static unsigned int internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { int rval = REGS_REALLOCATE; Idx i; Idx need_regs = nregs + 1; /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; if (BE (new_start == NULL, 0)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_end == NULL, 0)) { re_free (new_start); return REGS_UNALLOCATED; } regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; __re_size_t num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = NULL; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same meaning as with regexec. LAST_START is START + RANGE, where START and RANGE have the same meaning as with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; int match_kind; Idx match_first; Idx match_last = REG_MISSING; Idx extra_nmatch; bool sb; int ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate && start != last_start && !preg->can_be_null) ? preg->fastmap : NULL); RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (0 <= last_start && last_start <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && last_start != 0) return REG_NOMATCH; start = last_start = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, (preg->syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (last_start < start) ? -1 : 1; left_lim = (last_start < start) ? last_start : start; right_lim = (last_start < start) ? start : last_start; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (start <= last_start ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ __re_size_t offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, start <= last_start ? &match_first : NULL); if (match_last != REG_MISSING) { if (BE (match_last == REG_ERROR, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = REG_MISSING; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != REG_MISSING); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { Idx reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; /* FIXME: This function should fail if mctx.match_last exceeds the maximum possible regoff_t value. We need a new error code REG_OVERFLOW. */ if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; Idx halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (! REG_VALID_INDEX (match_last)) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] == NULL) { ret = REG_NOMATCH; goto free_return; } } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end. Return REG_MISSING if there is no match, and return REG_ERROR in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static Idx internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx match = 0; Idx match_last = REG_MISSING; Idx cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; bool at_init_state = p_match_first != NULL; Idx next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = false; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { re_dfastate_t *old_state = cur_state; Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; if (BE (next_char_idx >= mctx->input.bufs_len, 0) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return REG_ERROR; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = false; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static bool internal_function check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return false; if (!constraint) return true; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return false; return true; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static Idx internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) { Idx i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; return REG_MISSING in case of errors. */ static Idx internal_function proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; Idx i; bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; /* Pick up a valid destination, or return REG_MISSING if none is found. */ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) { Idx candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == REG_MISSING) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return REG_ERROR; /* We know we are going to exit. */ break; } } return dest_node; } else { Idx naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return REG_MISSING; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return REG_MISSING; } } if (naccepted == 0) { Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { Idx dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return REG_MISSING; re_node_set_empty (eps_via_nodes); return dest_node; } } return REG_MISSING; } static reg_errcode_t internal_function __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static Idx internal_function pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { Idx num = --fs->num; assert (REG_VALID_INDEX (num)); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; bool prev_idx_match_malloced = false; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = true; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { Idx reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (! REG_VALID_INDEX (cur_node), 0)) { if (BE (cur_node == REG_ERROR, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { Idx fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to the LAST_NODE, we throw away the node 'a'. 2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts string 's' and transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node 'a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node 'a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node 'a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node 'a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; Idx str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; Idx i; /* Then build the next sifted state. We build the next sifted state on 'cur_dest', and update 'sifted_states[str_idx]' with 'cur_dest'. Note: 'cur_dest' is the sifted state from 'state_log[str_idx + 1]'. 'cur_src' points the node_set of the old 'state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { Idx prev_node = cur_src->elems[i]; int naccepted = 0; bool ok; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { Idx to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ok = re_node_set_insert (cur_dest, prev_node); if (BE (! ok, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) { Idx top = mctx->state_log_top; if (next_state_log_idx >= mctx->input.bufs_len || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) { Idx st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; Idx i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; } } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { Idx ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { Idx edst1 = dfa->edests[cur_node].elems[0]; Idx edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : REG_MISSING); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (REG_VALID_NONZERO_INDEX (edst2) && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static bool internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx lim_idx, src_pos, dst_pos; Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: <src> <dst> ( <subexp> ) ( <subexp> ) <src> <dst> ( <subexp1> <src> <subexp2> <dst> <subexp3> ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return true; } return false; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; Idx node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { Idx node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != REG_MISSING) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { Idx dst; int cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx from_node, Idx str_idx, Idx bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) { reg_errcode_t err; Idx node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { Idx ops_node = REG_MISSING; Idx cls_node = REG_MISSING; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (REG_VALID_INDEX (ops_node)) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (REG_VALID_INDEX (cls_node)) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx node_idx, node; re_sift_context_t local_sctx; Idx first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == REG_MISSING) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { Idx enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { Idx subexp_len; Idx to_idx; Idx dst_node; bool ok; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ok = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (! ok, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept "multi byte". */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the "multi byte", or the destination was already thrown away, then the node could't accept the current input "multi byte". */ naccepted = 0; /* Otherwise, it is sure that the node could accept 'naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ static re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; Idx cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { Idx max = mctx->state_log_top; Idx cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { Idx node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { Idx cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; Idx cur_node_idx = pstate->nodes.elems[i]; int naccepted; Idx dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts 'naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != REG_MISSING); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; Idx cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { Idx dest_str_idx, prev_nelem, bkc_idx; Idx node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether 'node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* 'node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is 'new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != REG_MISSING); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { Idx subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add 'new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t internal_function __attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != REG_MISSING) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; Idx sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { regoff_t sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { Idx cls_node; regoff_t sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == REG_MISSING) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) { reg_errcode_t err; Idx to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static Idx internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) { Idx cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { Idx cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return REG_MISSING; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; Idx subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; if (BE (new_alloc < old_alloc, 0) || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) return REG_ESPACE; new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; #ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; #endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; Idx cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; Idx next_node = dfa->nexts[cur_node]; Idx next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } ok = re_node_set_insert (&union_set, next_node); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { reg_errcode_t err; Idx idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { Idx cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == REG_MISSING) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { Idx cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { bool ok; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; } break; } ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { reg_errcode_t err; err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == REG_MISSING) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { Idx to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { bool ok; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ok = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ! ok, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return true if successful. */ static bool internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; Idx i, j; int ch; bool need_word_trtable = false; bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; Idx ndests; /* Number of the destination states from 'state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from 'state'. 'dests_node[i]' represents the nodes which i-th destination state contains, and 'dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return false; dests_node_malloced = true; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transiton table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to 'state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) { if (dests_node_malloced) free (dests_alloc); if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (state->trtable == NULL, 0)) return false; return true; } return false; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) / (3 * sizeof (re_dfastate_t *))) < ndests), 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return false; } dest_states_malloced = true; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { Idx next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != REG_MISSING) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = true; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return true; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static Idx internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; bool ok; Idx i, j, k; Idx ndests; /* Number of the destinations from 'state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to 'state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { if (ASCII_CHARS % BITSET_WORD_BITS == 0) memset (accepts, -1, ASCII_CHARS / CHAR_BIT); else bitset_merge (accepts, utf8_sb_map); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the 'accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide 'accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and 'accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of 'accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of 'accepts', create a new group state, which has the 'remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (! ok, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return REG_MISSING; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; Idx i; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); Idx j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; int32_t idx; /* This #include defines a local function! */ # include <locale/weight.h> /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { Idx cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ #if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && defined __STRICT_ANSI__) wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; cmp_buf[2] = wc; #endif for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt; bool found = false; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = true; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (extra[idx] + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static bool internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return false; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return false; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return false; break; default: return false; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return false; } return true; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) return REG_ESPACE; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) { mctx->eflags = eflags; mctx->match_last = REG_MISSING; if (n > 0) { /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (struct re_backref_cache_entry), sizeof (re_sub_match_top_t *)); if (BE (SIZE_MAX / max_object_size < n, 0)) return REG_ESPACE; mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { Idx st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { Idx sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, Idx to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? -1 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Return the first entry with the same str_idx, or REG_MISSING if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static Idx internal_function search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) { Idx left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return REG_MISSING; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { Idx new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { Idx new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } ����������������������������������id-utils-4.6+git20120811/lib/getopt1.c��������������������������������������������������������������0000664�0000000�0000000�00000010552�12166360012�013700� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #ifdef _LIBC # include <getopt.h> #else # include <config.h> # include "getopt.h" #endif #include "getopt_int.h" #include <stdio.h> /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include <stdlib.h> #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include <stdio.h> int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case 'd': printf ("option d with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/config.charset���������������������������������������������������������0000664�0000000�0000000�00000055234�12166360012�014777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 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, 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # (darwin = MacOS X, woe32 = native Windows) # # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-3 Y glibc solaris cygwin # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-6 Y glibc aix hpux solaris cygwin # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin # ISO-8859-8 Y glibc aix hpux osf solaris cygwin # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin # ISO-8859-13 glibc netbsd openbsd darwin cygwin # ISO-8859-14 glibc cygwin # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin # KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd openbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix cygwin woe32 dos # CP943 aix # CP949 osf darwin woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1131 darwin # CP1250 woe32 # CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin # BIG5-HKSCS glibc solaris darwin # GBK glibc aix osf solaris darwin cygwin woe32 dos # GB18030 glibc solaris netbsd darwin # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris cygwin # VISCII Y glibc # TCVN5712-1 glibc # ARMSCII-8 glibc darwin # GEORGIAN-PS glibc cygwin # PT154 glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; openbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is # useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. # Then there are also the locales with encodings other than US-ASCII # and UTF-8. These locales can be occasionally useful to users (e.g. # when grepping through ISO-8859-1 encoded text files), when all their # file names are in US-ASCII. echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "KOI8-R KOI8-R" echo "KOI8-U KOI8-U" echo "CP866 CP866" echo "CP949 CP949" echo "CP1131 CP1131" echo "CP1251 CP1251" echo "eucCN GB2312" echo "GB2312 GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "Big5 BIG5" echo "Big5HKSCS BIG5-HKSCS" echo "GBK GBK" echo "GB18030 GB18030" echo "SJIS SHIFT_JIS" echo "ARMSCII-8 ARMSCII-8" echo "PT154 PT154" #echo "ISCII-DEV ?" echo "* UTF-8" ;; beos* | haiku*) # BeOS and Haiku have a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>" echo "# and Bruno Haible <bruno@clisp.org>." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/float.c����������������������������������������������������������������0000664�0000000�0000000�00000002504�12166360012�013420� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Auxiliary definitions for <float.h>. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <float.h> #if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ const union gl_long_double_union gl_LDBL_MAX = { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; #elif defined __i386__ const union gl_long_double_union gl_LDBL_MAX = { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; #else /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/Makefile.am������������������������������������������������������������0000664�0000000�0000000�00000001340�12166360012�014200� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in. # Copyright (C) 2004-2007, 2009-2012 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. AM_CFLAGS = AM_CPPFLAGS = BUILT_SOURCES = CLEANFILES = EXTRA_DIST = MAINTAINERCLEANFILES = MOSTLYCLEANDIRS = MOSTLYCLEANFILES = SUFFIXES = noinst_LIBRARIES = include gnulib.mk AM_CFLAGS += $(WARN_CFLAGS) libgnu_a_LIBADD += $(LIBOBJS) libgnu_a_DEPENDENCIES += $(LIBOBJS) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fnmatch.c��������������������������������������������������������������0000664�0000000�0000000�00000026341�12166360012�013740� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991-1993, 1996-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include <config.h> #endif /* Enable GNU extensions in fnmatch.h. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #if ! defined __builtin_expect && __GNUC__ < 3 # define __builtin_expect(expr, expected) (expr) #endif #include <fnmatch.h> #include <alloca.h> #include <assert.h> #include <ctype.h> #include <errno.h> #include <stddef.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #define WIDE_CHAR_SUPPORT \ (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) /* For platform which support the ISO C amendement 1 functionality we support user defined character classes. */ #if defined _LIBC || WIDE_CHAR_SUPPORT # include <wctype.h> # include <wchar.h> #endif /* We need some of the locale data (the collation sequence information) but there is no interface to get this information in general. Therefore we support a correct implementation only in glibc. */ #ifdef _LIBC # include "../locale/localeinfo.h" # include "../locale/elem-hash.h" # include "../locale/coll-lookup.h" # include <shlib-compat.h> # define CONCAT(a,b) __CONCAT(a,b) # define mbsrtowcs __mbsrtowcs # define fnmatch __fnmatch extern int fnmatch (const char *pattern, const char *string, int flags); #endif #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ #define NO_LEADING_PERIOD(flags) \ ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself, and have not detected a bug in the library. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand 'configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU # if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(c) ((c) == ' ' || (c) == '\t') # endif # define STREQ(s1, s2) (strcmp (s1, s2) == 0) # if defined _LIBC || WIDE_CHAR_SUPPORT /* The GNU C library provides support for user-defined character classes and the functions from ISO C amendement 1. */ # ifdef CHARCLASS_NAME_MAX # define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX # else /* This shouldn't happen but some implementation might still have this problem. Use a reasonable default value. */ # define CHAR_CLASS_MAX_LENGTH 256 # endif # ifdef _LIBC # define IS_CHAR_CLASS(string) __wctype (string) # else # define IS_CHAR_CLASS(string) wctype (string) # endif # ifdef _LIBC # define ISWCTYPE(WC, WT) __iswctype (WC, WT) # else # define ISWCTYPE(WC, WT) iswctype (WC, WT) # endif # if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC /* In this case we are implementing the multibyte character handling. */ # define HANDLE_MULTIBYTE 1 # endif # else # define CHAR_CLASS_MAX_LENGTH 6 /* Namely, 'xdigit'. */ # define IS_CHAR_CLASS(string) \ (STREQ (string, "alpha") || STREQ (string, "upper") \ || STREQ (string, "lower") || STREQ (string, "digit") \ || STREQ (string, "alnum") || STREQ (string, "xdigit") \ || STREQ (string, "space") || STREQ (string, "print") \ || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) # endif /* Avoid depending on library functions or files whose names are inconsistent. */ /* Global variable. */ static int posixly_correct; # ifndef internal_function /* Inside GNU libc we mark some function in a special way. In other environments simply ignore the marking. */ # define internal_function # endif /* Note that this evaluates C many times. */ # define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) # define CHAR char # define UCHAR unsigned char # define INT int # define FCT internal_fnmatch # define EXT ext_match # define END end_pattern # define L_(CS) CS # ifdef _LIBC # define BTOWC(C) __btowc (C) # else # define BTOWC(C) btowc (C) # endif # define STRLEN(S) strlen (S) # define STRCAT(D, S) strcat (D, S) # ifdef _LIBC # define MEMPCPY(D, S, N) __mempcpy (D, S, N) # else # if HAVE_MEMPCPY # define MEMPCPY(D, S, N) mempcpy (D, S, N) # else # define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) # endif # endif # define MEMCHR(S, C, N) memchr (S, C, N) # include "fnmatch_loop.c" # if HANDLE_MULTIBYTE # define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) # define CHAR wchar_t # define UCHAR wint_t # define INT wint_t # define FCT internal_fnwmatch # define EXT ext_wmatch # define END end_wpattern # define L_(CS) L##CS # define BTOWC(C) (C) # ifdef _LIBC # define STRLEN(S) __wcslen (S) # define STRCAT(D, S) __wcscat (D, S) # define MEMPCPY(D, S, N) __wmempcpy (D, S, N) # else # define STRLEN(S) wcslen (S) # define STRCAT(D, S) wcscat (D, S) # if HAVE_WMEMPCPY # define MEMPCPY(D, S, N) wmempcpy (D, S, N) # else # define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N)) # endif # endif # define MEMCHR(S, C, N) wmemchr (S, C, N) # define WIDE_CHAR_VERSION 1 # undef IS_CHAR_CLASS /* We have to convert the wide character string in a multibyte string. But we know that the character class names consist of alphanumeric characters from the portable character set, and since the wide character encoding for a member of the portable character set is the same code point as its single-byte encoding, we can use a simplified method to convert the string to a multibyte character string. */ static wctype_t is_char_class (const wchar_t *wcs) { char s[CHAR_CLASS_MAX_LENGTH + 1]; char *cp = s; do { /* Test for a printable character from the portable character set. */ # ifdef _LIBC if (*wcs < 0x20 || *wcs > 0x7e || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60) return (wctype_t) 0; # else switch (*wcs) { case L' ': case L'!': case L'"': case L'#': case L'%': case L'&': case L'\'': case L'(': case L')': case L'*': case L'+': case L',': case L'-': case L'.': case L'/': case L'0': case L'1': case L'2': case L'3': case L'4': case L'5': case L'6': case L'7': case L'8': case L'9': case L':': case L';': case L'<': case L'=': case L'>': case L'?': case L'A': case L'B': case L'C': case L'D': case L'E': case L'F': case L'G': case L'H': case L'I': case L'J': case L'K': case L'L': case L'M': case L'N': case L'O': case L'P': case L'Q': case L'R': case L'S': case L'T': case L'U': case L'V': case L'W': case L'X': case L'Y': case L'Z': case L'[': case L'\\': case L']': case L'^': case L'_': case L'a': case L'b': case L'c': case L'd': case L'e': case L'f': case L'g': case L'h': case L'i': case L'j': case L'k': case L'l': case L'm': case L'n': case L'o': case L'p': case L'q': case L'r': case L's': case L't': case L'u': case L'v': case L'w': case L'x': case L'y': case L'z': case L'{': case L'|': case L'}': case L'~': break; default: return (wctype_t) 0; } # endif /* Avoid overrunning the buffer. */ if (cp == s + CHAR_CLASS_MAX_LENGTH) return (wctype_t) 0; *cp++ = (char) *wcs++; } while (*wcs != L'\0'); *cp = '\0'; # ifdef _LIBC return __wctype (s); # else return wctype (s); # endif } # define IS_CHAR_CLASS(string) is_char_class (string) # include "fnmatch_loop.c" # endif int fnmatch (const char *pattern, const char *string, int flags) { # if HANDLE_MULTIBYTE # define ALLOCA_LIMIT 2000 if (__builtin_expect (MB_CUR_MAX, 1) != 1) { mbstate_t ps; size_t patsize; size_t strsize; size_t totsize; wchar_t *wpattern; wchar_t *wstring; int res; /* Calculate the size needed to convert the strings to wide characters. */ memset (&ps, '\0', sizeof (ps)); patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1; if (__builtin_expect (patsize != 0, 1)) { assert (mbsinit (&ps)); strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1; if (__builtin_expect (strsize != 0, 1)) { assert (mbsinit (&ps)); totsize = patsize + strsize; if (__builtin_expect (! (patsize <= totsize && totsize <= SIZE_MAX / sizeof (wchar_t)), 0)) { errno = ENOMEM; return -1; } /* Allocate room for the wide characters. */ if (__builtin_expect (totsize < ALLOCA_LIMIT, 1)) wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t)); else { wpattern = malloc (totsize * sizeof (wchar_t)); if (__builtin_expect (! wpattern, 0)) { errno = ENOMEM; return -1; } } wstring = wpattern + patsize; /* Convert the strings into wide characters. */ mbsrtowcs (wpattern, &pattern, patsize, &ps); assert (mbsinit (&ps)); mbsrtowcs (wstring, &string, strsize, &ps); res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1, flags & FNM_PERIOD, flags); if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0)) free (wpattern); return res; } } } # endif /* HANDLE_MULTIBYTE */ return internal_fnmatch (pattern, string, string + strlen (string), flags & FNM_PERIOD, flags); } # ifdef _LIBC # undef fnmatch versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3); # if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3) strong_alias (__fnmatch, __fnmatch_old) compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0); # endif libc_hidden_ver (__fnmatch, fnmatch) # endif #endif /* _LIBC or not __GNU_LIBRARY__. */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/float.in.h�������������������������������������������������������������0000664�0000000�0000000�00000016734�12166360012�014044� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A correct <float.h>. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ #ifndef _@GUARD_PREFIX@_FLOAT_H #define _@GUARD_PREFIX@_FLOAT_H /* 'long double' properties. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.0842021724855044340E-19L /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935063E-4932L /* Maximum representable finite number. */ # undef LDBL_MAX # define LDBL_MAX 1.1897314953572317650E+4932L /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of precision in the compiler but 64 bits of precision at runtime. See <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>. */ #if defined __i386__ && defined __FreeBSD__ /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 */ /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ /* Maximum representable finite number. */ # undef LDBL_MAX /* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. But the largest literal that GCC allows us to write is 0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }. So, define it like this through a reference to an external variable const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }; extern const long double LDBL_MAX; Unfortunately, this is not a constant expression. */ union gl_long_double_union { struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd; long double ld; }; extern const union gl_long_double_union gl_LDBL_MAX; # define LDBL_MAX (gl_LDBL_MAX.ld) /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif /* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are wrong. On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP DBL_MIN_10_EXP # undef LDBL_MIN # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ #endif #if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MAX /* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. It is not easy to define: #define LDBL_MAX 1.79769313486231580793728971405302307166e308L is too small, whereas #define LDBL_MAX 1.79769313486231580793728971405302307167e308L is too large. Apparently a bug in GCC decimal-to-binary conversion. Also, I can't get values larger than #define LDBL63 ((long double) (1ULL << 63)) #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL) which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }. So, define it like this through a reference to an external variable const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }; extern const long double LDBL_MAX; or through a pointer cast #define LDBL_MAX \ (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }) Unfortunately, this is not a constant expression, and the latter expression does not work well when GCC is optimizing.. */ union gl_long_double_union { struct { double hi; double lo; } dd; long double ld; }; extern const union gl_long_double_union gl_LDBL_MAX; # define LDBL_MAX (gl_LDBL_MAX.ld) #endif /* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong. On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON are wrong. */ #if defined __sgi && (LDBL_MANT_DIG >= 106) # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 106 # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP DBL_MIN_10_EXP # undef LDBL_MIN # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ # undef LDBL_EPSILON # define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ # endif #endif #if @REPLACE_ITOLD@ /* Pull in a function that fixes the 'int' to 'long double' conversion of glibc 2.7. */ extern # ifdef __cplusplus "C" # endif void _Qp_itoq (long double *, int); static void (*_gl_float_fix_itold) (long double *, int) = _Qp_itoq; #endif #endif /* _@GUARD_PREFIX@_FLOAT_H */ #endif /* _@GUARD_PREFIX@_FLOAT_H */ ������������������������������������id-utils-4.6+git20120811/lib/openat-priv.h����������������������������������������������������������0000664�0000000�0000000�00000005063�12166360012�014567� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Internals for openat-like functions. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #ifndef _GL_HEADER_OPENAT_PRIV #define _GL_HEADER_OPENAT_PRIV #include <errno.h> #include <limits.h> #include <stdlib.h> /* Maximum number of bytes that it is safe to allocate as a single array on the stack, and that is known as a compile-time constant. The assumption is that we'll touch the array very quickly, or a temporary very near the array, provoking an out-of-memory trap. On some operating systems, there is only one guard page for the stack, and a page size can be as small as 4096 bytes. Subtract 64 in the hope that this will let the compiler touch a nearby temporary and provoke a trap. */ #define SAFER_ALLOCA_MAX (4096 - 64) #define SAFER_ALLOCA(m) ((m) < SAFER_ALLOCA_MAX ? (m) : SAFER_ALLOCA_MAX) #if defined PATH_MAX # define OPENAT_BUFFER_SIZE SAFER_ALLOCA (PATH_MAX) #elif defined _XOPEN_PATH_MAX # define OPENAT_BUFFER_SIZE SAFER_ALLOCA (_XOPEN_PATH_MAX) #else # define OPENAT_BUFFER_SIZE SAFER_ALLOCA (1024) #endif char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); /* Trying to access a BUILD_PROC_NAME file will fail on systems without /proc support, and even on systems *with* ProcFS support. Return nonzero if the failure may be legitimate, e.g., because /proc is not readable, or the particular .../fd/N directory is not present. */ #define EXPECTED_ERRNO(Errno) \ ((Errno) == ENOTDIR || (Errno) == ENOENT \ || (Errno) == EPERM || (Errno) == EACCES \ || (Errno) == ENOSYS /* Solaris 8 */ \ || (Errno) == EOPNOTSUPP /* FreeBSD */) /* Wrapper function shared among linkat and renameat. */ int at_func2 (int fd1, char const *file1, int fd2, char const *file2, int (*func) (char const *file1, char const *file2)); #endif /* _GL_HEADER_OPENAT_PRIV */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xalloc-die.c�����������������������������������������������������������0000664�0000000�0000000�00000002434�12166360012�014336� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Report a memory allocation failure and exit. Copyright (C) 1997-2000, 2002-2004, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "xalloc.h" #include <stdlib.h> #include "error.h" #include "exitfail.h" #include "gettext.h" #define _(msgid) gettext (msgid) void xalloc_die (void) { error (exit_failure, 0, "%s", _("memory exhausted")); /* _Noreturn cannot be given to error, since it may return if its first argument is 0. To help compilers understand the xalloc_die does not return, call abort. Also, the abort is a safety feature if exit_failure is 0 (which shouldn't happen). */ abort (); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/getopt.c���������������������������������������������������������������0000664�0000000�0000000�00000117504�12166360012�013624� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Getopt for GNU. NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #ifndef _LIBC # include <config.h> #endif #include "getopt.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #ifdef _LIBC # include <libintl.h> #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC && defined USE_IN_LIBIO # include <wchar.h> #endif /* This version of 'getopt' appears to the caller like standard Unix 'getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As 'getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Using 'getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt_int.h" /* 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, each non-option ARGV-element is returned here. */ 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'. 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 non-option elements that the caller should itself scan. Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. 'first_nonopt' and 'last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the '__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc _GL_UNUSED, char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If 'getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If 'getopt' finds another option character, it returns that character, updating 'optind' and 'nextchar' so that the next call to 'getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, 'getopt' returns -1. Then 'optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set 'opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in 'optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in 'optarg', otherwise 'optarg' is set to zero. If OPTSTRING starts with '-' or '+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with '--' instead of '-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a '=', or else the in next ARGV-element. When 'getopt' finds a long-named option, it returns 0 if that option's 'flag' field is nonzero, the value of the option's 'val' field if the 'flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of 'struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element '--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; unsigned int namelen; const struct option *p; const struct option *pfound = NULL; struct option_list { const struct option *p; struct option_list *next; } *ambig_list = NULL; int exact = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; namelen = nameend - d->__nextchar; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, namelen)) { if (namelen == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ struct option_list *newp = malloc (sizeof (*newp)); newp->p = p; newp->next = ambig_list; ambig_list = newp; } } if (ambig_list != NULL && !exact) { if (print_errors) { struct option_list first; first.p = pfound; first.next = ambig_list; ambig_list = &first; #if defined _LIBC && defined USE_IN_LIBIO char *buf = NULL; size_t buflen = 0; FILE *fp = open_memstream (&buf, &buflen); if (fp != NULL) { fprintf (fp, _("%s: option '%s' is ambiguous; possibilities:"), argv[0], argv[d->optind]); do { fprintf (fp, " '--%s'", ambig_list->p->name); ambig_list = ambig_list->next; } while (ambig_list != NULL); fputc_unlocked ('\n', fp); if (__builtin_expect (fclose (fp) != EOF, 1)) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } } #else fprintf (stderr, _("%s: option '%s' is ambiguous; possibilities:"), argv[0], argv[d->optind]); do { fprintf (stderr, " '--%s'", ambig_list->p->name); ambig_list = ambig_list->next; } while (ambig_list != NULL); fputc ('\n', stderr); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } while (ambig_list != NULL) { struct option_list *pn = ambig_list->next; free (ambig_list); ambig_list = pn; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '--%s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '--%s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; const char *temp = strchr (optstring, c); /* Increment 'optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; if (longopts == NULL) goto no_longs; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented 'd->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } else d->optarg = NULL; d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } no_longs: d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented 'optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, (const struct option *) 0, (int *) 0, 0, POSIXLY_CORRECT); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of 'getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/cloexec.h��������������������������������������������������������������0000664�0000000�0000000�00000002734�12166360012�013747� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* closexec.c - set or clear the close-on-exec descriptor flag Copyright (C) 2004, 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 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 <http://www.gnu.org/licenses/>. */ #include <stdbool.h> /* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true, or clear the flag if VALUE is false. Return 0 on success, or -1 on error with 'errno' set. Note that on MingW, this function does NOT protect DESC from being inherited into spawned children. Instead, either use dup_cloexec followed by closing the original DESC, or use interfaces such as open or pipe2 that accept flags like O_CLOEXEC to create DESC non-inheritable in the first place. */ int set_cloexec_flag (int desc, bool value); /* Duplicates a file handle FD, while marking the copy to be closed prior to exec or spawn. Returns -1 and sets errno if FD could not be duplicated. */ int dup_cloexec (int fd); ������������������������������������id-utils-4.6+git20120811/lib/localcharset.c���������������������������������������������������������0000664�0000000�0000000�00000043114�12166360012�014761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006, 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>. */ #include <config.h> /* Specification. */ #include "localcharset.h" #include <fcntl.h> #include <stddef.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET # define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 # define OS2 # endif #endif #if !defined WINDOWS_NATIVE # include <unistd.h> # if HAVE_LANGINFO_CODESET # include <langinfo.h> # else # if 0 /* see comment below */ # include <locale.h> # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include <windows.h> # endif #elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif #if defined OS2 # define INCL_DOS # include <os2.h> #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif /* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL) /* Out of memory. Treat the file as empty. */ cp = ""; else { int fd; /* Open the file. Reject symbolic links on platforms that support O_NOFOLLOW. This is a security feature. Without it, an attacker could retrieve parts of the contents (namely, the tail of the first line that starts with "* ") of an arbitrary file by placing a symbolic link to that file under the name "charset.alias" in some writable directory and defining the environment variable CHARSETALIASDIR to point to that directory. */ fd = open (file_name, O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); if (fd < 0) /* File not found. Treat it as empty. */ cp = ""; else { FILE *fp; fp = fdopen (fd, "r"); if (fp == NULL) { /* Out of memory. Treat the file as empty. */ close (fd); cp = ""; } else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } } free (file_name); } #else # if defined DARWIN7 /* To avoid the trouble of installing a file that is shared by many GNU packages -- many packaging systems have problems with this --, simply inline the aliases here. */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-4" "\0" "ISO-8859-4" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" "ISO8859-13" "\0" "ISO-8859-13" "\0" "ISO8859-15" "\0" "ISO-8859-15" "\0" "KOI8-R" "\0" "KOI8-R" "\0" "KOI8-U" "\0" "KOI8-U" "\0" "CP866" "\0" "CP866" "\0" "CP949" "\0" "CP949" "\0" "CP1131" "\0" "CP1131" "\0" "CP1251" "\0" "CP1251" "\0" "eucCN" "\0" "GB2312" "\0" "GB2312" "\0" "GB2312" "\0" "eucJP" "\0" "EUC-JP" "\0" "eucKR" "\0" "EUC-KR" "\0" "Big5" "\0" "BIG5" "\0" "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" "GBK" "\0" "GBK" "\0" "GB18030" "\0" "GB18030" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WINDOWS_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WINDOWS_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". Return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* The Windows API has a function returning the locale's codepage as a number: GetACP(). This encoding is used by Cygwin, unless the user has set the environment variable CYGWIN=codepage:oem (which very few people do). Output directed to console windows needs to be converted (to GetOEMCP() if the console is using a raster font, or to GetConsoleOutputCP() if it is using a TrueType font). Cygwin does this conversion transparently (see winsup/cygwin/fhandler_console.cc), converting to GetConsoleOutputCP(). This leads to correct results, except when SetConsoleOutputCP has been called and a raster font is in use. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; /* The Windows API has a function returning the locale's codepage as a number: GetACP(). When the output goes to a console window, it needs to be provided in GetOEMCP() encoding if the console is using a raster font, or in GetConsoleOutputCP() encoding if it is using a TrueType font. But in GUI programs and for output sent to files and pipes, GetACP() encoding is the best bet. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/signbitl.c�������������������������������������������������������������0000664�0000000�0000000�00000004142�12166360012�014126� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <math.h> #include <string.h> #include "isnanl-nolibm.h" #include "float+.h" #ifdef gl_signbitl_OPTIMIZED_MACRO # undef gl_signbitl #endif int gl_signbitl (long double arg) { #if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { long double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNL_IN_LIBC return copysignl (1.0L, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanl (arg)) return 0; if (arg < 0.0L) return 1; else if (arg == 0.0L) { /* Distinguish 0.0L and -0.0L. */ static long double plus_zero = 0.0L; long double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_LDBL) != 0); } else return 0; #endif } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/langinfo.in.h����������������������������������������������������������0000664�0000000�0000000�00000012206�12166360012�014522� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Substitute for and wrapper around <langinfo.h>. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * POSIX <langinfo.h> for platforms that lack it or have an incomplete one. * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html> */ #ifndef _@GUARD_PREFIX@_LANGINFO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_LANGINFO_H@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ #endif #ifndef _@GUARD_PREFIX@_LANGINFO_H #define _@GUARD_PREFIX@_LANGINFO_H #if !@HAVE_LANGINFO_H@ /* A platform that lacks <langinfo.h>. */ /* Assume that it also lacks <nl_types.h> and the nl_item type. */ # if !GNULIB_defined_nl_item typedef int nl_item; # define GNULIB_defined_nl_item 1 # endif /* nl_langinfo items of the LC_CTYPE category */ # define CODESET 10000 /* nl_langinfo items of the LC_NUMERIC category */ # define RADIXCHAR 10001 # define THOUSEP 10002 /* nl_langinfo items of the LC_TIME category */ # define D_T_FMT 10003 # define D_FMT 10004 # define T_FMT 10005 # define T_FMT_AMPM 10006 # define AM_STR 10007 # define PM_STR 10008 # define DAY_1 10009 # define DAY_2 (DAY_1 + 1) # define DAY_3 (DAY_1 + 2) # define DAY_4 (DAY_1 + 3) # define DAY_5 (DAY_1 + 4) # define DAY_6 (DAY_1 + 5) # define DAY_7 (DAY_1 + 6) # define ABDAY_1 10016 # define ABDAY_2 (ABDAY_1 + 1) # define ABDAY_3 (ABDAY_1 + 2) # define ABDAY_4 (ABDAY_1 + 3) # define ABDAY_5 (ABDAY_1 + 4) # define ABDAY_6 (ABDAY_1 + 5) # define ABDAY_7 (ABDAY_1 + 6) # define MON_1 10023 # define MON_2 (MON_1 + 1) # define MON_3 (MON_1 + 2) # define MON_4 (MON_1 + 3) # define MON_5 (MON_1 + 4) # define MON_6 (MON_1 + 5) # define MON_7 (MON_1 + 6) # define MON_8 (MON_1 + 7) # define MON_9 (MON_1 + 8) # define MON_10 (MON_1 + 9) # define MON_11 (MON_1 + 10) # define MON_12 (MON_1 + 11) # define ABMON_1 10035 # define ABMON_2 (ABMON_1 + 1) # define ABMON_3 (ABMON_1 + 2) # define ABMON_4 (ABMON_1 + 3) # define ABMON_5 (ABMON_1 + 4) # define ABMON_6 (ABMON_1 + 5) # define ABMON_7 (ABMON_1 + 6) # define ABMON_8 (ABMON_1 + 7) # define ABMON_9 (ABMON_1 + 8) # define ABMON_10 (ABMON_1 + 9) # define ABMON_11 (ABMON_1 + 10) # define ABMON_12 (ABMON_1 + 11) # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 /* nl_langinfo items of the LC_MONETARY category */ # define CRNCYSTR 10052 /* nl_langinfo items of the LC_MESSAGES category */ # define YESEXPR 10053 # define NOEXPR 10054 #else /* A platform that has <langinfo.h>. */ # if !@HAVE_LANGINFO_CODESET@ # define CODESET 10000 # define GNULIB_defined_CODESET 1 # endif # if !@HAVE_LANGINFO_T_FMT_AMPM@ # define T_FMT_AMPM 10006 # define GNULIB_defined_T_FMT_AMPM 1 # endif # if !@HAVE_LANGINFO_ERA@ # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 # define GNULIB_defined_ERA 1 # endif # if !@HAVE_LANGINFO_YESEXPR@ # define YESEXPR 10053 # define NOEXPR 10054 # define GNULIB_defined_YESEXPR 1 # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ /* Return a piece of locale dependent information. Note: The difference between nl_langinfo (CODESET) and locale_charset () is that the latter normalizes the encoding names to GNU conventions. */ #if @GNULIB_NL_LANGINFO@ # if @REPLACE_NL_LANGINFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef nl_langinfo # define nl_langinfo rpl_nl_langinfo # endif _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); # else # if !@HAVE_NL_LANGINFO@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIASWARN (nl_langinfo); #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " "use gnulib module nl_langinfo for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_LANGINFO_H */ #endif /* _@GUARD_PREFIX@_LANGINFO_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/save-cwd.c�������������������������������������������������������������0000664�0000000�0000000�00000006007�12166360012�014026� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* save-cwd.c -- Save and restore current working directory. Copyright (C) 1995, 1997-1998, 2003-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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "save-cwd.h" #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include "chdir-long.h" #include "unistd--.h" #include "cloexec.h" #if GNULIB_FCNTL_SAFER # include "fcntl--.h" #else # define GNULIB_FCNTL_SAFER 0 #endif /* Record the location of the current working directory in CWD so that the program may change to other directories and later use restore_cwd to return to the recorded location. This function may allocate space using malloc (via getcwd) or leave a file descriptor open; use free_cwd to perform the necessary free or close. Upon failure, no memory is allocated, any locally opened file descriptors are closed; return non-zero -- in that case, free_cwd need not be called, but doing so is ok. Otherwise, return zero. The _raison d'etre_ for this interface is that the working directory is sometimes inaccessible, and getcwd is not robust or as efficient. So, we prefer to use the open/fchdir approach, but fall back on getcwd if necessary. This module works for most cases with just the getcwd-lgpl module, but to be truly robust, use the getcwd module. Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin, SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it doesn't work for partitions on which auditing is enabled. If you're still using an obsolete system with these problems, please send email to the maintainer of this code. */ int save_cwd (struct saved_cwd *cwd) { cwd->name = NULL; cwd->desc = open (".", O_SEARCH); if (!GNULIB_FCNTL_SAFER) cwd->desc = fd_safer (cwd->desc); if (cwd->desc < 0) { cwd->name = getcwd (NULL, 0); return cwd->name ? 0 : -1; } set_cloexec_flag (cwd->desc, true); return 0; } /* Change to recorded location, CWD, in directory hierarchy. Upon failure, return -1 (errno is set by chdir or fchdir). Upon success, return zero. */ int restore_cwd (const struct saved_cwd *cwd) { if (0 <= cwd->desc) return fchdir (cwd->desc); else return chdir_long (cwd->name); } void free_cwd (struct saved_cwd *cwd) { if (cwd->desc >= 0) close (cwd->desc); free (cwd->name); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/close-stream.c���������������������������������������������������������0000664�0000000�0000000�00000005746�12166360012�014724� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Close a stream, with nicer error checking than fclose's. Copyright (C) 1998-2002, 2004, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "close-stream.h" #include <errno.h> #include <stdbool.h> #include "fpending.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif /* Close STREAM. Return 0 if successful, EOF (setting errno) otherwise. A failure might set errno to 0 if the error number cannot be determined. A failure with errno set to EPIPE may or may not indicate an error situation worth signaling to the user. See the documentation of the close_stdout_set_ignore_EPIPE function for details. If a program writes *anything* to STREAM, that program should close STREAM and make sure that it succeeds before exiting. Otherwise, suppose that you go to the extreme of checking the return status of every function that does an explicit write to STREAM. The last printf can succeed in writing to the internal stream buffer, and yet the fclose(STREAM) could still fail (due e.g., to a disk full error) when it tries to write out that buffered data. Thus, you would be left with an incomplete output file and the offending program would exit successfully. Even calling fflush is not always sufficient, since some file systems (NFS and CODA) buffer written/flushed data until an actual close call. Besides, it's wasteful to check the return value from every call that writes to STREAM -- just let the internal stream state record the failure. That's what the ferror test is checking below. */ int close_stream (FILE *stream) { const bool some_pending = (__fpending (stream) != 0); const bool prev_fail = (ferror (stream) != 0); const bool fclose_fail = (fclose (stream) != 0); /* Return an error indication if there was a previous failure or if fclose failed, with one exception: ignore an fclose failure if there was no previous error, no data remains to be flushed, and fclose failed with EBADF. That can happen when a program like cp is invoked like this 'cp a b >&-' (i.e., with standard output closed) and doesn't generate any output (hence no previous error and nothing to be flushed). */ if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) { if (! fclose_fail) errno = 0; return EOF; } return 0; } ��������������������������id-utils-4.6+git20120811/lib/lseek.c����������������������������������������������������������������0000664�0000000�0000000�00000003421�12166360012�013415� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* An lseek() function that detects pipes. Copyright (C) 2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <unistd.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" #else # include <sys/stat.h> #endif #include <errno.h> #undef lseek off_t rpl_lseek (int fd, off_t offset, int whence) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } if (GetFileType (h) != FILE_TYPE_DISK) { errno = ESPIPE; return -1; } #else /* BeOS lseek mistakenly succeeds on pipes... */ struct stat statbuf; if (fstat (fd, &statbuf) < 0) return -1; if (!S_ISREG (statbuf.st_mode)) { errno = ESPIPE; return -1; } #endif return lseek (fd, offset, whence); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-frexpl.c��������������������������������������������������������0000664�0000000�0000000�00000002100�12166360012�015103� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Specification. */ # include "printf-frexpl.h" # include "printf-frexp.h" long double printf_frexpl (long double x, int *expptr) { return printf_frexp (x, expptr); } #else # define USE_LONG_DOUBLE # include "printf-frexp.c" #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strerror.c�������������������������������������������������������������0000664�0000000�0000000�00000004043�12166360012�014175� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* strerror.c --- POSIX compatible system error routine Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <string.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "intprops.h" #include "strerror-override.h" #include "verify.h" /* Use the system functions, not the gnulib overrides in this file. */ #undef sprintf char * strerror (int n) #undef strerror { static char buf[STACKBUF_LEN]; size_t len; /* Cast away const, due to the historical signature of strerror; callers should not be modifying the string. */ const char *msg = strerror_override (n); if (msg) return (char *) msg; msg = strerror (n); /* Our strerror_r implementation might use the system's strerror buffer, so all other clients of strerror have to see the error copied into a buffer that we manage. This is not thread-safe, even if the system strerror is, but portable programs shouldn't be using strerror if they care about thread-safety. */ if (!msg || !*msg) { static char const fmt[] = "Unknown error %d"; verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n)); sprintf (buf, fmt, n); errno = EINVAL; return buf; } /* Fix STACKBUF_LEN if this ever aborts. */ len = strlen (msg); if (sizeof buf <= len) abort (); return memcpy (buf, msg, len + 1); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/getcwd.c���������������������������������������������������������������0000664�0000000�0000000�00000030502�12166360012�013567� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991-1999, 2004-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #if !_LIBC # include <config.h> # include <unistd.h> #endif #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <stdbool.h> #include <stddef.h> #include <fcntl.h> /* For AT_FDCWD on Solaris 9. */ /* If this host provides the openat function or if we're using the gnulib replacement function, then enable code below to make getcwd more efficient and robust. */ #if defined HAVE_OPENAT || defined GNULIB_OPENAT # define HAVE_OPENAT_SUPPORT 1 #else # define HAVE_OPENAT_SUPPORT 0 #endif #ifndef __set_errno # define __set_errno(val) (errno = (val)) #endif #include <dirent.h> #ifndef _D_EXACT_NAMLEN # define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) #endif #ifndef _D_ALLOC_NAMLEN # define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1) #endif #include <unistd.h> #include <stdlib.h> #include <string.h> #if _LIBC # ifndef mempcpy # define mempcpy __mempcpy # endif #endif #ifndef MAX # define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif #ifndef MIN # define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #include "pathmax.h" /* In this file, PATH_MAX only serves as a threshold for choosing among two algorithms. */ #ifndef PATH_MAX # define PATH_MAX 8192 #endif #if D_INO_IN_DIRENT # define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) #else # define MATCHING_INO(dp, ino) true #endif #if !_LIBC # define __getcwd rpl_getcwd # define __lstat lstat # define __closedir closedir # define __opendir opendir # define __readdir readdir #endif /* The results of opendir() in this file are not used with dirfd and fchdir, and we do not leak fds to any single-threaded code that could use stdio, therefore save some unnecessary recursion in fchdir.c. FIXME - if the kernel ever adds support for multi-thread safety for avoiding standard fds, then we should use opendir_safer and openat_safer. */ #undef opendir #undef closedir /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Returns NULL if the directory couldn't be determined or SIZE was too small. If successful, returns BUF. In GNU, if BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ char * __getcwd (char *buf, size_t size) { /* Lengths of big file name components and entire file names, and a deep level of file name nesting. These numbers are not upper bounds; they are merely large values suitable for initial allocations, designed to be large enough for most real-world uses. */ enum { BIG_FILE_NAME_COMPONENT_LENGTH = 255, BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1), DEEP_NESTING = 100 }; #if HAVE_OPENAT_SUPPORT int fd = AT_FDCWD; bool fd_needs_closing = false; #else char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; char *dotlist = dots; size_t dotsize = sizeof dots; size_t dotlen = 0; #endif DIR *dirstream = NULL; dev_t rootdev, thisdev; ino_t rootino, thisino; char *dir; register char *dirp; struct stat st; size_t allocated = size; size_t used; #if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and this is much slower than the system getcwd (at least on GNU/Linux). So trust the system getcwd's results unless they look suspicious. Use the system getcwd even if we have openat support, since the system getcwd works even when a parent is unreadable, while the openat-based approach does not. But on AIX 5.1..7.1, the system getcwd is not even minimally working: If the current directory name is slightly longer than PATH_MAX, it omits the first directory component and returns this wrong result with errno = 0. */ # undef getcwd dir = getcwd (buf, size); if (dir || (size && errno == ERANGE)) return dir; /* Solaris getcwd (NULL, 0) fails with errno == EINVAL, but it has internal magic that lets it work even if an ancestor directory is inaccessible, which is better in many cases. So in this case try again with a buffer that's almost always big enough. */ if (errno == EINVAL && buf == NULL && size == 0) { char big_buffer[BIG_FILE_NAME_LENGTH + 1]; dir = getcwd (big_buffer, sizeof big_buffer); if (dir) return strdup (dir); } # if HAVE_PARTLY_WORKING_GETCWD /* The system getcwd works, except it sometimes fails when it shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ if (errno != ERANGE && errno != ENAMETOOLONG && errno != ENOENT) return NULL; # endif #endif if (size == 0) { if (buf != NULL) { __set_errno (EINVAL); return NULL; } allocated = BIG_FILE_NAME_LENGTH + 1; } if (buf == NULL) { dir = malloc (allocated); if (dir == NULL) return NULL; } else dir = buf; dirp = dir + allocated; *--dirp = '\0'; if (__lstat (".", &st) < 0) goto lose; thisdev = st.st_dev; thisino = st.st_ino; if (__lstat ("/", &st) < 0) goto lose; rootdev = st.st_dev; rootino = st.st_ino; while (!(thisdev == rootdev && thisino == rootino)) { struct dirent *d; dev_t dotdev; ino_t dotino; bool mount_point; int parent_status; size_t dirroom; size_t namlen; bool use_d_ino = true; /* Look at the parent directory. */ #if HAVE_OPENAT_SUPPORT fd = openat (fd, "..", O_RDONLY); if (fd < 0) goto lose; fd_needs_closing = true; parent_status = fstat (fd, &st); #else dotlist[dotlen++] = '.'; dotlist[dotlen++] = '.'; dotlist[dotlen] = '\0'; parent_status = __lstat (dotlist, &st); #endif if (parent_status != 0) goto lose; if (dirstream && __closedir (dirstream) != 0) { dirstream = NULL; goto lose; } /* Figure out if this directory is a mount point. */ dotdev = st.st_dev; dotino = st.st_ino; mount_point = dotdev != thisdev; /* Search for the last directory. */ #if HAVE_OPENAT_SUPPORT dirstream = fdopendir (fd); if (dirstream == NULL) goto lose; fd_needs_closing = false; #else dirstream = __opendir (dotlist); if (dirstream == NULL) goto lose; dotlist[dotlen++] = '/'; #endif for (;;) { /* Clear errno to distinguish EOF from error if readdir returns NULL. */ __set_errno (0); d = __readdir (dirstream); /* When we've iterated through all directory entries without finding one with a matching d_ino, rewind the stream and consider each name again, but this time, using lstat. This is necessary in a chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where .., ../.., ../../.., etc. all had the same device number, yet the d_ino values for entries in / did not match those obtained via lstat. */ if (d == NULL && errno == 0 && use_d_ino) { use_d_ino = false; rewinddir (dirstream); d = __readdir (dirstream); } if (d == NULL) { if (errno == 0) /* EOF on dirstream, which can mean e.g., that the current directory has been removed. */ __set_errno (ENOENT); goto lose; } if (d->d_name[0] == '.' && (d->d_name[1] == '\0' || (d->d_name[1] == '.' && d->d_name[2] == '\0'))) continue; if (use_d_ino) { bool match = (MATCHING_INO (d, thisino) || mount_point); if (! match) continue; } { int entry_status; #if HAVE_OPENAT_SUPPORT entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); #else /* Compute size needed for this file name, or for the file name ".." in the same directory, whichever is larger. Room for ".." might be needed the next time through the outer loop. */ size_t name_alloc = _D_ALLOC_NAMLEN (d); size_t filesize = dotlen + MAX (sizeof "..", name_alloc); if (filesize < dotlen) goto memory_exhausted; if (dotsize < filesize) { /* My, what a deep directory tree you have, Grandma. */ size_t newsize = MAX (filesize, dotsize * 2); size_t i; if (newsize < dotsize) goto memory_exhausted; if (dotlist != dots) free (dotlist); dotlist = malloc (newsize); if (dotlist == NULL) goto lose; dotsize = newsize; i = 0; do { dotlist[i++] = '.'; dotlist[i++] = '.'; dotlist[i++] = '/'; } while (i < dotlen); } memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); entry_status = __lstat (dotlist, &st); #endif /* We don't fail here if we cannot stat() a directory entry. This can happen when (network) file systems fail. If this entry is in fact the one we are looking for we will find out soon as we reach the end of the directory without having found anything. */ if (entry_status == 0 && S_ISDIR (st.st_mode) && st.st_dev == thisdev && st.st_ino == thisino) break; } } dirroom = dirp - dir; namlen = _D_EXACT_NAMLEN (d); if (dirroom <= namlen) { if (size != 0) { __set_errno (ERANGE); goto lose; } else { char *tmp; size_t oldsize = allocated; allocated += MAX (allocated, namlen); if (allocated < oldsize || ! (tmp = realloc (dir, allocated))) goto memory_exhausted; /* Move current contents up to the end of the buffer. This is guaranteed to be non-overlapping. */ dirp = memcpy (tmp + allocated - (oldsize - dirroom), tmp + dirroom, oldsize - dirroom); dir = tmp; } } dirp -= namlen; memcpy (dirp, d->d_name, namlen); *--dirp = '/'; thisdev = dotdev; thisino = dotino; } if (dirstream && __closedir (dirstream) != 0) { dirstream = NULL; goto lose; } if (dirp == &dir[allocated - 1]) *--dirp = '/'; #if ! HAVE_OPENAT_SUPPORT if (dotlist != dots) free (dotlist); #endif used = dir + allocated - dirp; memmove (dir, dirp, used); if (size == 0) /* Ensure that the buffer is only as large as necessary. */ buf = realloc (dir, used); if (buf == NULL) /* Either buf was NULL all along, or 'realloc' failed but we still have the original string. */ buf = dir; return buf; memory_exhausted: __set_errno (ENOMEM); lose: { int save = errno; if (dirstream) __closedir (dirstream); #if HAVE_OPENAT_SUPPORT if (fd_needs_closing) close (fd); #else if (dotlist != dots) free (dotlist); #endif if (buf == NULL) free (dir); __set_errno (save); } return NULL; } #ifdef weak_alias weak_alias (__getcwd, getcwd) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/errno.in.h�������������������������������������������������������������0000664�0000000�0000000�00000014177�12166360012�014063� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A POSIX-like <errno.h>. Copyright (C) 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _@GUARD_PREFIX@_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _@GUARD_PREFIX@_ERRNO_H #define _@GUARD_PREFIX@_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* These are the same values as defined by MSVC 10, for interoperability. */ # ifndef ENOMSG # define ENOMSG 122 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 111 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 121 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 134 # define GNULIB_defined_EPROTO 1 # endif # ifndef EBADMSG # define EBADMSG 104 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 132 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 129 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ENETRESET # define ENETRESET 117 # define GNULIB_defined_ENETRESET 1 # endif # ifndef ECONNABORTED # define ECONNABORTED 106 # define GNULIB_defined_ECONNABORTED 1 # endif # ifndef ECANCELED # define ECANCELED 105 # define GNULIB_defined_ECANCELED 1 # endif # ifndef EINPROGRESS # define EINPROGRESS 112 # define EALREADY 103 # define ENOTSOCK 128 # define EDESTADDRREQ 109 # define EMSGSIZE 115 # define EPROTOTYPE 136 # define ENOPROTOOPT 123 # define EPROTONOSUPPORT 135 # define EOPNOTSUPP 130 # define EAFNOSUPPORT 102 # define EADDRINUSE 100 # define EADDRNOTAVAIL 101 # define ENETDOWN 116 # define ENETUNREACH 118 # define ECONNRESET 108 # define ENOBUFS 119 # define EISCONN 113 # define ENOTCONN 126 # define ETIMEDOUT 138 # define ECONNREFUSED 107 # define ELOOP 114 # define EHOSTUNREACH 110 # define EWOULDBLOCK 140 # define ETXTBSY 139 # define ENODATA 120 /* not required by POSIX */ # define ENOSR 124 /* not required by POSIX */ # define ENOSTR 125 /* not required by POSIX */ # define ENOTRECOVERABLE 127 /* not required by POSIX */ # define EOWNERDEAD 133 /* not required by POSIX */ # define ETIME 137 /* not required by POSIX */ # define EOTHER 131 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* These are intentionally the same values as the WSA* error numbers, defined in <winsock2.h>. */ # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define EHOSTDOWN 10064 /* not required by POSIX */ # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_EWINSOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Likewise, on NonStop Kernel, EDQUOT is not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ENETRESET # define ENETRESET 2011 # define GNULIB_defined_ENETRESET 1 # endif # ifndef ECONNABORTED # define ECONNABORTED 2012 # define GNULIB_defined_ECONNABORTED 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef EDQUOT # define EDQUOT 2010 # define GNULIB_defined_EDQUOT 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _@GUARD_PREFIX@_ERRNO_H */ #endif /* _@GUARD_PREFIX@_ERRNO_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strndup.c��������������������������������������������������������������0000664�0000000�0000000�00000002135�12166360012�014012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A replacement function, for systems that lack strndup. Copyright (C) 1996-1998, 2001-2003, 2005-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <string.h> #include <stdlib.h> char * strndup (char const *s, size_t n) { size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) return NULL; new[len] = '\0'; return memcpy (new, s, len); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/cloexec.c��������������������������������������������������������������0000664�0000000�0000000�00000004427�12166360012�013743� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* closexec.c - set or clear the close-on-exec descriptor flag Copyright (C) 1991, 2004-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 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 <http://www.gnu.org/licenses/>. The code is taken from glibc/manual/llio.texi */ #include <config.h> #include "cloexec.h" #include <errno.h> #include <fcntl.h> #include <unistd.h> /* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true, or clear the flag if VALUE is false. Return 0 on success, or -1 on error with 'errno' set. Note that on MingW, this function does NOT protect DESC from being inherited into spawned children. Instead, either use dup_cloexec followed by closing the original DESC, or use interfaces such as open or pipe2 that accept flags like O_CLOEXEC to create DESC non-inheritable in the first place. */ int set_cloexec_flag (int desc, bool value) { #ifdef F_SETFD int flags = fcntl (desc, F_GETFD, 0); if (0 <= flags) { int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC); if (flags == newflags || fcntl (desc, F_SETFD, newflags) != -1) return 0; } return -1; #else /* !F_SETFD */ /* Use dup2 to reject invalid file descriptors; the cloexec flag will be unaffected. */ if (desc < 0) { errno = EBADF; return -1; } if (dup2 (desc, desc) < 0) /* errno is EBADF here. */ return -1; /* There is nothing we can do on this kind of platform. Punt. */ return 0; #endif /* !F_SETFD */ } /* Duplicates a file handle FD, while marking the copy to be closed prior to exec or spawn. Returns -1 and sets errno if FD could not be duplicated. */ int dup_cloexec (int fd) { return fcntl (fd, F_DUPFD_CLOEXEC, 0); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbchar.c���������������������������������������������������������������0000664�0000000�0000000�00000002267�12166360012�013555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <limits.h> #include "mbchar.h" #if IS_BASIC_ASCII /* Bit table of characters in the ISO C "basic character set". */ const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = { 0x00001a00, /* '\t' '\v' '\f' */ 0xffffffef, /* ' '...'#' '%'...'?' */ 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ /* The remaining bits are 0. */ }; #endif /* IS_BASIC_ASCII */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dup-safer.c������������������������������������������������������������0000664�0000000�0000000�00000002026�12166360012�014200� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Invoke dup, but avoid some glitches. Copyright (C) 2001, 2004-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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #include <config.h> #include "unistd-safer.h" #include <fcntl.h> #include <unistd.h> /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. */ int dup_safer (int fd) { return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/openat.c���������������������������������������������������������������0000664�0000000�0000000�00000020734�12166360012�013606� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* provide a replacement openat function Copyright (C) 2004-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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ /* If the user's config.h happens to include <fcntl.h>, let it include only the system's <fcntl.h> here, so that orig_openat doesn't recurse to rpl_openat. */ #define __need_system_fcntl_h #include <config.h> /* Get the original definition of open. It might be defined as a macro. */ #include <fcntl.h> #include <sys/types.h> #undef __need_system_fcntl_h #if HAVE_OPENAT static inline int orig_openat (int fd, char const *filename, int flags, mode_t mode) { return openat (fd, filename, flags, mode); } #endif /* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <fcntl.h> above. */ #include "fcntl.h" #include "openat.h" #include <stdarg.h> #include <stdbool.h> #include <stddef.h> #include <string.h> #include <sys/stat.h> #include <errno.h> #if HAVE_OPENAT /* Like openat, but work around Solaris 9 bugs with trailing slash. */ int rpl_openat (int dfd, char const *filename, int flags, ...) { mode_t mode; int fd; mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } # if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX <http://www.opengroup.org/susv3/functions/open.html> says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, - if O_WRONLY or O_RDWR is specified, open() must fail because the file does not contain a '.' directory. */ if (flags & (O_CREAT | O_WRONLY | O_RDWR)) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { errno = EISDIR; return -1; } } # endif fd = orig_openat (dfd, filename, flags, mode); # if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) { /* We know len is positive, since open did not fail with ENOENT. */ size_t len = strlen (filename); if (filename[len - 1] == '/') { struct stat statbuf; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return -1; } } } # endif return fd; } #else /* !HAVE_OPENAT */ # include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ # include "openat-priv.h" # include "save-cwd.h" /* Replacement for Solaris' openat function. <http://www.google.com/search?q=openat+site:docs.sun.com> First, try to simulate it via open ("/proc/self/fd/FD/FILE"). Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), then give a diagnostic and exit nonzero. Otherwise, upon failure, set errno and return -1, as openat does. Upon successful completion, return a file descriptor. */ int openat (int fd, char const *file, int flags, ...) { mode_t mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } return openat_permissive (fd, file, flags, mode, NULL); } /* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is nonnull, set *CWD_ERRNO to an errno value if unable to save or restore the initial working directory. This is needed only the first time remove.c's remove_dir opens a command-line directory argument. If a previous attempt to restore the current working directory failed, then we must not even try to access a '.'-relative name. It is the caller's responsibility not to call this function in that case. */ int openat_permissive (int fd, char const *file, int flags, mode_t mode, int *cwd_errno) { struct saved_cwd saved_cwd; int saved_errno; int err; bool save_ok; if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) return open (file, flags, mode); { char buf[OPENAT_BUFFER_SIZE]; char *proc_file = openat_proc_name (buf, fd, file); if (proc_file) { int open_result = open (proc_file, flags, mode); int open_errno = errno; if (proc_file != buf) free (proc_file); /* If the syscall succeeds, or if it fails with an unexpected errno value, then return right away. Otherwise, fall through and resort to using save_cwd/restore_cwd. */ if (0 <= open_result || ! EXPECTED_ERRNO (open_errno)) { errno = open_errno; return open_result; } } } save_ok = (save_cwd (&saved_cwd) == 0); if (! save_ok) { if (! cwd_errno) openat_save_fail (errno); *cwd_errno = errno; } if (0 <= fd && fd == saved_cwd.desc) { /* If saving the working directory collides with the user's requested fd, then the user's fd must have been closed to begin with. */ free_cwd (&saved_cwd); errno = EBADF; return -1; } err = fchdir (fd); saved_errno = errno; if (! err) { err = open (file, flags, mode); saved_errno = errno; if (save_ok && restore_cwd (&saved_cwd) != 0) { if (! cwd_errno) { /* Don't write a message to just-created fd 2. */ saved_errno = errno; if (err == STDERR_FILENO) close (err); openat_restore_fail (saved_errno); } *cwd_errno = errno; } } free_cwd (&saved_cwd); errno = saved_errno; return err; } /* Return true if our openat implementation must resort to using save_cwd and restore_cwd. */ bool openat_needs_fchdir (void) { bool needs_fchdir = true; int fd = open ("/", O_SEARCH); if (0 <= fd) { char buf[OPENAT_BUFFER_SIZE]; char *proc_file = openat_proc_name (buf, fd, "."); if (proc_file) { needs_fchdir = false; if (proc_file != buf) free (proc_file); } close (fd); } return needs_fchdir; } #endif /* !HAVE_OPENAT */ ������������������������������������id-utils-4.6+git20120811/lib/fflush.c���������������������������������������������������������������0000664�0000000�0000000�00000016201�12166360012�013601� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fflush.c -- allow flushing input streams Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake. */ #include <config.h> /* Specification. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include "freading.h" #include "stdio-impl.h" #undef fflush #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ static inline void clear_ungetc_buffer_preserving_position (FILE *fp) { if (fp->_flags & _IO_IN_BACKUP) /* _IO_free_backup_area is a bit complicated. Simply call fseek. */ fseeko (fp, 0, SEEK_CUR); } #else /* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */ static inline void clear_ungetc_buffer (FILE *fp) { # if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ if (HASUB (fp)) { fp_->_p += fp_->_r; fp_->_r = 0; } # elif defined __EMX__ /* emx+gcc */ if (fp->_ungetc_count > 0) { fp->_ungetc_count = 0; fp->_rcount = - fp->_rcount; } # elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ /* Nothing to do. */ # else /* other implementations */ fseeko (fp, 0, SEEK_CUR); # endif } #endif #if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ static inline int disable_seek_optimization (FILE *fp) { int saved_flags = fp_->_flags & (__SOPT | __SNPT); fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT; return saved_flags; } static inline void restore_seek_optimization (FILE *fp, int saved_flags) { fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags; } #endif static inline void update_fpos_cache (FILE *fp, off_t pos) { #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __CYGWIN__ /* fp_->_offset is typed as an integer. */ fp_->_offset = pos; # else /* fp_->_offset is an fpos_t. */ /* Use a union, since on NetBSD, the compilation flags determine whether fpos_t is typedef'd to off_t or a struct containing a single off_t member. */ union { fpos_t f; off_t o; } u; u.o = pos; fp_->_offset = u.f; # endif fp_->_flags |= __SOFF; #endif } /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. */ int rpl_fflush (FILE *stream) { /* When stream is NULL, POSIX and C99 only require flushing of "output streams and update streams in which the most recent operation was not input", and all implementations do this. When stream is "an output stream or an update stream in which the most recent operation was not input", POSIX and C99 requires that fflush writes out any buffered data, and all implementations do this. When stream is, however, an input stream or an update stream in which the most recent operation was input, C99 specifies nothing, and POSIX only specifies behavior if the stream is seekable. mingw, in particular, drops the input buffer, leaving the file descriptor positioned at the end of the input buffer. I.e. ftell (stream) is lost. We don't want to call the implementation's fflush in this case. We test ! freading (stream) here, rather than fwriting (stream), because what we need to know is whether the stream holds a "read buffer", and on mingw this is indicated by _IOREAD, regardless of _IOWRT. */ if (stream == NULL || ! freading (stream)) return fflush (stream); #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ clear_ungetc_buffer_preserving_position (stream); return fflush (stream); #else { /* Notes about the file-position indicator: 1) The file position indicator is incremented by fgetc() and decremented by ungetc(): <http://www.opengroup.org/susv3/functions/fgetc.html> "... the fgetc() function shall ... advance the associated file position indicator for the stream ..." <http://www.opengroup.org/susv3/functions/ungetc.html> "The file-position indicator is decremented by each successful call to ungetc()..." 2) <http://www.opengroup.org/susv3/functions/ungetc.html> says: "The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back." Here we are discarding all pushed-back bytes. But more specifically, 3) <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> says: "[After fflush(),] the file offset of the underlying open file description shall be set to the file position of the stream, and any characters pushed back onto the stream by ungetc() ... shall be discarded." */ /* POSIX does not specify fflush behavior for non-seekable input streams. Some implementations purge unread data, some return EBADF, some do nothing. */ off_t pos = ftello (stream); if (pos == -1) { errno = EBADF; return EOF; } /* Clear the ungetc buffer. */ clear_ungetc_buffer (stream); /* To get here, we must be flushing a seekable input stream, so the semantics of fpurge are now appropriate to clear the buffer. To avoid losing data, the lseek is also necessary. */ { int result = fpurge (stream); if (result != 0) return result; } # if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ { /* Disable seek optimization for the next fseeko call. This tells the following fseeko call to seek to the desired position directly, rather than to seek to a block-aligned boundary. */ int saved_flags = disable_seek_optimization (stream); int result = fseeko (stream, pos, SEEK_SET); restore_seek_optimization (stream, saved_flags); return result; } # else pos = lseek (fileno (stream), pos, SEEK_SET); if (pos == -1) return EOF; /* After a successful lseek, update the file descriptor's position cache in the stream. */ update_fpos_cache (stream, pos); return 0; # endif } #endif } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xgetcwd.c��������������������������������������������������������������0000664�0000000�0000000�00000002273�12166360012�013763� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xgetcwd.c -- return current directory with unlimited length Copyright (C) 2001, 2003-2004, 2006-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "xgetcwd.h" #include <errno.h> #include <unistd.h> #include "xalloc.h" /* Return the current directory, newly allocated. Upon an out-of-memory error, call xalloc_die. Upon any other type of error, return NULL. */ char * xgetcwd (void) { char *cwd = getcwd (NULL, 0); if (! cwd && errno == ENOMEM) xalloc_die (); return cwd; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fnmatch_loop.c���������������������������������������������������������0000664�0000000�0000000�00000131751�12166360012�014773� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991-1993, 1996-2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Match STRING against the file name pattern PATTERN, returning zero if it matches, nonzero if not. */ static int EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) internal_function; static const CHAR *END (const CHAR *patternp) internal_function; static int internal_function FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) { register const CHAR *p = pattern, *n = string; register UCHAR c; #ifdef _LIBC # if WIDE_CHAR_VERSION const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); # else const UCHAR *collseq = (const UCHAR *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB); # endif #endif while ((c = *p++) != L_('\0')) { bool new_no_leading_period = false; c = FOLD (c); switch (c) { case L_('?'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } if (n == string_end) return FNM_NOMATCH; else if (*n == L_('/') && (flags & FNM_FILE_NAME)) return FNM_NOMATCH; else if (*n == L_('.') && no_leading_period) return FNM_NOMATCH; break; case L_('\\'): if (!(flags & FNM_NOESCAPE)) { c = *p++; if (c == L_('\0')) /* Trailing \ loses. */ return FNM_NOMATCH; c = FOLD (c); } if (n == string_end || FOLD ((UCHAR) *n) != c) return FNM_NOMATCH; break; case L_('*'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } if (n != string_end && *n == L_('.') && no_leading_period) return FNM_NOMATCH; for (c = *p++; c == L_('?') || c == L_('*'); c = *p++) { if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0) { const CHAR *endp = END (p); if (endp != p) { /* This is a pattern. Skip over it. */ p = endp; continue; } } if (c == L_('?')) { /* A ? needs to match one character. */ if (n == string_end) /* There isn't another character; no match. */ return FNM_NOMATCH; else if (*n == L_('/') && __builtin_expect (flags & FNM_FILE_NAME, 0)) /* A slash does not match a wildcard under FNM_FILE_NAME. */ return FNM_NOMATCH; else /* One character of the string is consumed in matching this ? wildcard, so *??? won't match if there are less than three characters. */ ++n; } } if (c == L_('\0')) /* The wildcard(s) is/are the last element of the pattern. If the name is a file name and contains another slash this means it cannot match, unless the FNM_LEADING_DIR flag is set. */ { int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH; if (flags & FNM_FILE_NAME) { if (flags & FNM_LEADING_DIR) result = 0; else { if (MEMCHR (n, L_('/'), string_end - n) == NULL) result = 0; } } return result; } else { const CHAR *endp; endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'), string_end - n); if (endp == NULL) endp = string_end; if (c == L_('[') || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0 && (c == L_('@') || c == L_('+') || c == L_('!')) && *p == L_('('))) { int flags2 = ((flags & FNM_FILE_NAME) ? flags : (flags & ~FNM_PERIOD)); bool no_leading_period2 = no_leading_period; for (--p; n < endp; ++n, no_leading_period2 = false) if (FCT (p, n, string_end, no_leading_period2, flags2) == 0) return 0; } else if (c == L_('/') && (flags & FNM_FILE_NAME)) { while (n < string_end && *n != L_('/')) ++n; if (n < string_end && *n == L_('/') && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags) == 0)) return 0; } else { int flags2 = ((flags & FNM_FILE_NAME) ? flags : (flags & ~FNM_PERIOD)); int no_leading_period2 = no_leading_period; if (c == L_('\\') && !(flags & FNM_NOESCAPE)) c = *p; c = FOLD (c); for (--p; n < endp; ++n, no_leading_period2 = false) if (FOLD ((UCHAR) *n) == c && (FCT (p, n, string_end, no_leading_period2, flags2) == 0)) return 0; } } /* If we come here no match is possible with the wildcard. */ return FNM_NOMATCH; case L_('['): { /* Nonzero if the sense of the character class is inverted. */ const CHAR *p_init = p; const CHAR *n_init = n; register bool not; CHAR cold; UCHAR fn; if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; if (n == string_end) return FNM_NOMATCH; if (*n == L_('.') && no_leading_period) return FNM_NOMATCH; if (*n == L_('/') && (flags & FNM_FILE_NAME)) /* '/' cannot be matched. */ return FNM_NOMATCH; not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); if (not) ++p; fn = FOLD ((UCHAR) *n); c = *p++; for (;;) { if (!(flags & FNM_NOESCAPE) && c == L_('\\')) { if (*p == L_('\0')) return FNM_NOMATCH; c = FOLD ((UCHAR) *p); ++p; goto normal_bracket; } else if (c == L_('[') && *p == L_(':')) { /* Leave room for the null. */ CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; size_t c1 = 0; #if defined _LIBC || WIDE_CHAR_SUPPORT wctype_t wt; #endif const CHAR *startp = p; for (;;) { if (c1 == CHAR_CLASS_MAX_LENGTH) /* The name is too long and therefore the pattern is ill-formed. */ return FNM_NOMATCH; c = *++p; if (c == L_(':') && p[1] == L_(']')) { p += 2; break; } if (c < L_('a') || c >= L_('z')) { /* This cannot possibly be a character class name. Match it as a normal range. */ p = startp; c = L_('['); goto normal_bracket; } str[c1++] = c; } str[c1] = L_('\0'); #if defined _LIBC || WIDE_CHAR_SUPPORT wt = IS_CHAR_CLASS (str); if (wt == 0) /* Invalid character class name. */ return FNM_NOMATCH; # if defined _LIBC && ! WIDE_CHAR_VERSION /* The following code is glibc specific but does there a good job in speeding up the code since we can avoid the btowc() call. */ if (_ISCTYPE ((UCHAR) *n, wt)) goto matched; # else if (ISWCTYPE (BTOWC ((UCHAR) *n), wt)) goto matched; # endif #else if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n)) || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n)) || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n)) || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n)) || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n)) || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n)) || (STREQ (str, L_("lower")) && islower ((UCHAR) *n)) || (STREQ (str, L_("print")) && isprint ((UCHAR) *n)) || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n)) || (STREQ (str, L_("space")) && isspace ((UCHAR) *n)) || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n)) || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n))) goto matched; #endif c = *p++; } #ifdef _LIBC else if (c == L_('[') && *p == L_('=')) { UCHAR str[1]; uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; c = *++p; if (c == L_('\0')) { p = startp; c = L_('['); goto normal_bracket; } str[0] = c; c = *++p; if (c != L_('=') || p[1] != L_(']')) { p = startp; c = L_('['); goto normal_bracket; } p += 2; if (nrules == 0) { if ((UCHAR) *n == str[0]) goto matched; } else { const int32_t *table; # if WIDE_CHAR_VERSION const int32_t *weights; const int32_t *extra; # else const unsigned char *weights; const unsigned char *extra; # endif const int32_t *indirect; int32_t idx; const UCHAR *cp = (const UCHAR *) str; /* This #include defines a local function! */ # if WIDE_CHAR_VERSION # include <locale/weightwc.h> # else # include <locale/weight.h> # endif # if WIDE_CHAR_VERSION table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); weights = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC); extra = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC); # else table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); # endif idx = findidx (&cp); if (idx != 0) { /* We found a table entry. Now see whether the character we are currently at has the same equivalance class value. */ int len = weights[idx & 0xffffff]; int32_t idx2; const UCHAR *np = (const UCHAR *) n; idx2 = findidx (&np); if (idx2 != 0 && (idx >> 24) == (idx2 >> 24) && len == weights[idx2 & 0xffffff]) { int cnt = 0; idx &= 0xffffff; idx2 &= 0xffffff; while (cnt < len && (weights[idx + 1 + cnt] == weights[idx2 + 1 + cnt])) ++cnt; if (cnt == len) goto matched; } } } c = *p++; } #endif else if (c == L_('\0')) { /* [ unterminated, treat as normal character. */ p = p_init; n = n_init; c = L_('['); goto normal_match; } else { bool is_range = false; #ifdef _LIBC bool is_seqval = false; if (c == L_('[') && *p == L_('.')) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; size_t c1 = 0; while (1) { c = *++p; if (c == L_('.') && p[1] == L_(']')) { p += 2; break; } if (c == '\0') return FNM_NOMATCH; ++c1; } /* We have to handling the symbols differently in ranges since then the collation sequence is important. */ is_range = *p == L_('-') && p[1] != L_('\0'); if (nrules == 0) { /* There are no names defined in the collation data. Therefore we only accept the trivial names consisting of the character itself. */ if (c1 != 1) return FNM_NOMATCH; if (!is_range && *n == startp[1]) goto matched; cold = startp[1]; c = *p++; } else { int32_t table_size; const int32_t *symb_table; # ifdef WIDE_CHAR_VERSION char str[c1]; size_t strcnt; # else # define str (startp + 1) # endif const unsigned char *extra; int32_t idx; int32_t elem; int32_t second; int32_t hash; # ifdef WIDE_CHAR_VERSION /* We have to convert the name to a single-byte string. This is possible since the names consist of ASCII characters and the internal representation is UCS4. */ for (strcnt = 0; strcnt < c1; ++strcnt) str[strcnt] = startp[1 + strcnt]; # endif table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); /* Locate the character in the hashing table. */ hash = elem_hash (str, c1); idx = 0; elem = hash % table_size; if (symb_table[2 * elem] != 0) { second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash && (c1 == extra[symb_table[2 * elem + 1]]) && memcmp (str, &extra[symb_table[2 * elem + 1] + 1], c1) == 0) { /* Yep, this is the entry. */ idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) { /* Compare the byte sequence but only if this is not part of a range. */ # ifdef WIDE_CHAR_VERSION int32_t *wextra; idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; wextra = (int32_t *) &extra[idx + 4]; # endif if (! is_range) { # ifdef WIDE_CHAR_VERSION for (c1 = 0; (int32_t) c1 < wextra[idx]; ++c1) if (n[c1] != wextra[1 + c1]) break; if ((int32_t) c1 == wextra[idx]) goto matched; # else for (c1 = 0; c1 < extra[idx]; ++c1) if (n[c1] != extra[1 + c1]) break; if (c1 == extra[idx]) goto matched; # endif } /* Get the collation sequence value. */ is_seqval = true; # ifdef WIDE_CHAR_VERSION cold = wextra[1 + wextra[idx]]; # else /* Adjust for the alignment. */ idx += 1 + extra[idx]; idx = (idx + 3) & ~4; cold = *((int32_t *) &extra[idx]); # endif c = *p++; } else if (c1 == 1) { /* No valid character. Match it as a single byte. */ if (!is_range && *n == str[0]) goto matched; cold = str[0]; c = *p++; } else return FNM_NOMATCH; } } else # undef str #endif { c = FOLD (c); normal_bracket: /* We have to handling the symbols differently in ranges since then the collation sequence is important. */ is_range = (*p == L_('-') && p[1] != L_('\0') && p[1] != L_(']')); if (!is_range && c == fn) goto matched; #if _LIBC /* This is needed if we goto normal_bracket; from outside of is_seqval's scope. */ is_seqval = false; #endif cold = c; c = *p++; } if (c == L_('-') && *p != L_(']')) { #if _LIBC /* We have to find the collation sequence value for C. Collation sequence is nothing we can regularly access. The sequence value is defined by the order in which the definitions of the collation values for the various characters appear in the source file. A strange concept, nowhere documented. */ uint32_t fcollseq; uint32_t lcollseq; UCHAR cend = *p++; # ifdef WIDE_CHAR_VERSION /* Search in the 'names' array for the characters. */ fcollseq = __collseq_table_lookup (collseq, fn); if (fcollseq == ~((uint32_t) 0)) /* XXX We don't know anything about the character we are supposed to match. This means we are failing. */ goto range_not_matched; if (is_seqval) lcollseq = cold; else lcollseq = __collseq_table_lookup (collseq, cold); # else fcollseq = collseq[fn]; lcollseq = is_seqval ? cold : collseq[(UCHAR) cold]; # endif is_seqval = false; if (cend == L_('[') && *p == L_('.')) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; size_t c1 = 0; while (1) { c = *++p; if (c == L_('.') && p[1] == L_(']')) { p += 2; break; } if (c == '\0') return FNM_NOMATCH; ++c1; } if (nrules == 0) { /* There are no names defined in the collation data. Therefore we only accept the trivial names consisting of the character itself. */ if (c1 != 1) return FNM_NOMATCH; cend = startp[1]; } else { int32_t table_size; const int32_t *symb_table; # ifdef WIDE_CHAR_VERSION char str[c1]; size_t strcnt; # else # define str (startp + 1) # endif const unsigned char *extra; int32_t idx; int32_t elem; int32_t second; int32_t hash; # ifdef WIDE_CHAR_VERSION /* We have to convert the name to a single-byte string. This is possible since the names consist of ASCII characters and the internal representation is UCS4. */ for (strcnt = 0; strcnt < c1; ++strcnt) str[strcnt] = startp[1 + strcnt]; # endif table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); /* Locate the character in the hashing table. */ hash = elem_hash (str, c1); idx = 0; elem = hash % table_size; if (symb_table[2 * elem] != 0) { second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash && (c1 == extra[symb_table[2 * elem + 1]]) && memcmp (str, &extra[symb_table[2 * elem + 1] + 1], c1) == 0) { /* Yep, this is the entry. */ idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) { /* Compare the byte sequence but only if this is not part of a range. */ # ifdef WIDE_CHAR_VERSION int32_t *wextra; idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~4; wextra = (int32_t *) &extra[idx + 4]; # endif /* Get the collation sequence value. */ is_seqval = true; # ifdef WIDE_CHAR_VERSION cend = wextra[1 + wextra[idx]]; # else /* Adjust for the alignment. */ idx += 1 + extra[idx]; idx = (idx + 3) & ~4; cend = *((int32_t *) &extra[idx]); # endif } else if (symb_table[2 * elem] != 0 && c1 == 1) { cend = str[0]; c = *p++; } else return FNM_NOMATCH; } # undef str } else { if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) cend = *p++; if (cend == L_('\0')) return FNM_NOMATCH; cend = FOLD (cend); } /* XXX It is not entirely clear to me how to handle characters which are not mentioned in the collation specification. */ if ( # ifdef WIDE_CHAR_VERSION lcollseq == 0xffffffff || # endif lcollseq <= fcollseq) { /* We have to look at the upper bound. */ uint32_t hcollseq; if (is_seqval) hcollseq = cend; else { # ifdef WIDE_CHAR_VERSION hcollseq = __collseq_table_lookup (collseq, cend); if (hcollseq == ~((uint32_t) 0)) { /* Hum, no information about the upper bound. The matching succeeds if the lower bound is matched exactly. */ if (lcollseq != fcollseq) goto range_not_matched; goto matched; } # else hcollseq = collseq[cend]; # endif } if (lcollseq <= hcollseq && fcollseq <= hcollseq) goto matched; } # ifdef WIDE_CHAR_VERSION range_not_matched: # endif #else /* We use a boring value comparison of the character values. This is better than comparing using 'strcoll' since the latter would have surprising and sometimes fatal consequences. */ UCHAR cend = *p++; if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) cend = *p++; if (cend == L_('\0')) return FNM_NOMATCH; /* It is a range. */ if (cold <= fn && fn <= cend) goto matched; #endif c = *p++; } } if (c == L_(']')) break; } if (!not) return FNM_NOMATCH; break; matched: /* Skip the rest of the [...] that already matched. */ do { ignore_next: c = *p++; if (c == L_('\0')) /* [... (unterminated) loses. */ return FNM_NOMATCH; if (!(flags & FNM_NOESCAPE) && c == L_('\\')) { if (*p == L_('\0')) return FNM_NOMATCH; /* XXX 1003.2d11 is unclear if this is right. */ ++p; } else if (c == L_('[') && *p == L_(':')) { int c1 = 0; const CHAR *startp = p; while (1) { c = *++p; if (++c1 == CHAR_CLASS_MAX_LENGTH) return FNM_NOMATCH; if (*p == L_(':') && p[1] == L_(']')) break; if (c < L_('a') || c >= L_('z')) { p = startp; goto ignore_next; } } p += 2; c = *p++; } else if (c == L_('[') && *p == L_('=')) { c = *++p; if (c == L_('\0')) return FNM_NOMATCH; c = *++p; if (c != L_('=') || p[1] != L_(']')) return FNM_NOMATCH; p += 2; c = *p++; } else if (c == L_('[') && *p == L_('.')) { ++p; while (1) { c = *++p; if (c == '\0') return FNM_NOMATCH; if (*p == L_('.') && p[1] == L_(']')) break; } p += 2; c = *p++; } } while (c != L_(']')); if (not) return FNM_NOMATCH; } break; case L_('+'): case L_('@'): case L_('!'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } goto normal_match; case L_('/'): if (NO_LEADING_PERIOD (flags)) { if (n == string_end || c != (UCHAR) *n) return FNM_NOMATCH; new_no_leading_period = true; break; } /* FALLTHROUGH */ default: normal_match: if (n == string_end || c != FOLD ((UCHAR) *n)) return FNM_NOMATCH; } no_leading_period = new_no_leading_period; ++n; } if (n == string_end) return 0; if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/')) /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ return 0; return FNM_NOMATCH; } static const CHAR * internal_function END (const CHAR *pattern) { const CHAR *p = pattern; while (1) if (*++p == L_('\0')) /* This is an invalid pattern. */ return pattern; else if (*p == L_('[')) { /* Handle brackets special. */ if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; /* Skip the not sign. We have to recognize it because of a possibly following ']'. */ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) ++p; /* A leading ']' is recognized as such. */ if (*p == L_(']')) ++p; /* Skip over all characters of the list. */ while (*p != L_(']')) if (*p++ == L_('\0')) /* This is no valid pattern. */ return pattern; } else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') || *p == L_('!')) && p[1] == L_('(')) p = END (p + 1); else if (*p == L_(')')) break; return p + 1; } static int internal_function EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) { const CHAR *startp; size_t level; struct patternlist { struct patternlist *next; CHAR str[1]; } *list = NULL; struct patternlist **lastp = &list; size_t pattern_len = STRLEN (pattern); const CHAR *p; const CHAR *rs; enum { ALLOCA_LIMIT = 8000 }; /* Parse the pattern. Store the individual parts in the list. */ level = 0; for (startp = p = pattern + 1; ; ++p) if (*p == L_('\0')) /* This is an invalid pattern. */ return -1; else if (*p == L_('[')) { /* Handle brackets special. */ if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; /* Skip the not sign. We have to recognize it because of a possibly following ']'. */ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) ++p; /* A leading ']' is recognized as such. */ if (*p == L_(']')) ++p; /* Skip over all characters of the list. */ while (*p != L_(']')) if (*p++ == L_('\0')) /* This is no valid pattern. */ return -1; } else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') || *p == L_('!')) && p[1] == L_('(')) /* Remember the nesting level. */ ++level; else if (*p == L_(')')) { if (level-- == 0) { /* This means we found the end of the pattern. */ #define NEW_PATTERN \ struct patternlist *newp; \ size_t plen; \ size_t plensize; \ size_t newpsize; \ \ plen = (opt == L_('?') || opt == L_('@') \ ? pattern_len \ : p - startp + 1UL); \ plensize = plen * sizeof (CHAR); \ newpsize = offsetof (struct patternlist, str) + plensize; \ if ((size_t) -1 / sizeof (CHAR) < plen \ || newpsize < offsetof (struct patternlist, str) \ || ALLOCA_LIMIT <= newpsize) \ return -1; \ newp = (struct patternlist *) alloca (newpsize); \ *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ newp->next = NULL; \ *lastp = newp; \ lastp = &newp->next NEW_PATTERN; break; } } else if (*p == L_('|')) { if (level == 0) { NEW_PATTERN; startp = p + 1; } } assert (list != NULL); assert (p[-1] == L_(')')); #undef NEW_PATTERN switch (opt) { case L_('*'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; /* FALLTHROUGH */ case L_('+'): do { for (rs = string; rs <= string_end; ++rs) /* First match the prefix with the current pattern with the current pattern. */ if (FCT (list->str, string, rs, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 /* This was successful. Now match the rest with the rest of the pattern. */ && (FCT (p, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 /* This didn't work. Try the whole pattern. */ || (rs != string && FCT (pattern - 1, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0))) /* It worked. Signal success. */ return 0; } while ((list = list->next) != NULL); /* None of the patterns lead to a match. */ return FNM_NOMATCH; case L_('?'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; /* FALLTHROUGH */ case L_('@'): do /* I cannot believe it but 'strcat' is actually acceptable here. Match the entire string with the prefix from the pattern list and the rest of the pattern following the pattern list. */ if (FCT (STRCAT (list->str, p), string, string_end, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) /* It worked. Signal success. */ return 0; while ((list = list->next) != NULL); /* None of the patterns lead to a match. */ return FNM_NOMATCH; case L_('!'): for (rs = string; rs <= string_end; ++rs) { struct patternlist *runp; for (runp = list; runp != NULL; runp = runp->next) if (FCT (runp->str, string, rs, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) break; /* If none of the patterns matched see whether the rest does. */ if (runp == NULL && (FCT (p, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)) /* This is successful. */ return 0; } /* None of the patterns together with the rest of the pattern lead to a match. */ return FNM_NOMATCH; default: assert (! "Invalid extended matching operator"); break; } return -1; } #undef FOLD #undef CHAR #undef UCHAR #undef INT #undef FCT #undef EXT #undef END #undef MEMPCPY #undef MEMCHR #undef STRLEN #undef STRCAT #undef L_ #undef BTOWC �����������������������id-utils-4.6+git20120811/lib/xalloc.h���������������������������������������������������������������0000664�0000000�0000000�00000017452�12166360012�013612� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990-2000, 2003-2004, 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 <http://www.gnu.org/licenses/>. */ #ifndef XALLOC_H_ # define XALLOC_H_ # include <stddef.h> # include "xalloc-oversized.h" # ifdef __cplusplus extern "C" { # endif # if __GNUC__ >= 3 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else # define _GL_ATTRIBUTE_MALLOC # endif # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) # else # define _GL_ATTRIBUTE_ALLOC_SIZE(args) # endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern _Noreturn void xalloc_die (void); void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xzalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xcalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xrealloc (void *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2)); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2)); char *xstrdup (char const *str) _GL_ATTRIBUTE_MALLOC; /* In the following macros, T must be an elementary or structure/union or typedef'ed type, or a pointer to such a type. To apply one of the following macros to a function pointer or array type, you need to typedef it first and use the typedef name. */ /* Allocate an object of type T dynamically, with error checking. */ /* extern t *XMALLOC (typename t); */ # define XMALLOC(t) ((t *) xmalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking. */ /* extern t *XNMALLOC (size_t n, typename t); */ # define XNMALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) /* Allocate an object of type T dynamically, with error checking, and zero it. */ /* extern t *XZALLOC (typename t); */ # define XZALLOC(t) ((t *) xzalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking, and zero it. */ /* extern t *XCALLOC (size_t n, typename t); */ # define XCALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) # if HAVE_INLINE # define static_inline static inline # else void *xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); void *x2nrealloc (void *p, size_t *pn, size_t s); char *xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); # endif # ifdef static_inline /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. */ static_inline void *xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); static_inline void * xnmalloc (size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xmalloc (n * s); } /* Change the size of an allocated block of memory P to an array of N objects each of S bytes, with error checking. S must be nonzero. */ static_inline void *xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); static_inline void * xnrealloc (void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xrealloc (p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. *PN must be nonzero unless P is null, and S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are increased by a factor of approximately 1.5 so that repeated reallocations have O(N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that rate. Here is an example of use: int *p = NULL; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = x2nrealloc (p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = x2nrealloc (p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } */ static_inline void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; if (! p) { if (! n) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. This is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; n = DEFAULT_MXFAST / s; n += !n; } } else { /* Set N = ceil (1.5 * N) so that progress is made if N == 1. Check for overflow, so that N * S stays in size_t range. The check is slightly conservative, but an exact check isn't worth the trouble. */ if ((size_t) -1 / 3 * 2 / s <= n) xalloc_die (); n += (n + 1) / 2; } *pn = n; return xrealloc (p, n * s); } /* Return a pointer to a new buffer of N bytes. This is like xmalloc, except it returns char *. */ static_inline char *xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); static_inline char * xcharalloc (size_t n) { return XNMALLOC (n, char); } # endif # ifdef __cplusplus } /* C++ does not allow conversions from void * to other pointer types without a cast. Use templates to work around the problem when possible. */ template <typename T> inline T * xrealloc (T *p, size_t s) { return (T *) xrealloc ((void *) p, s); } template <typename T> inline T * xnrealloc (T *p, size_t n, size_t s) { return (T *) xnrealloc ((void *) p, n, s); } template <typename T> inline T * x2realloc (T *p, size_t *pn) { return (T *) x2realloc ((void *) p, pn); } template <typename T> inline T * x2nrealloc (T *p, size_t *pn, size_t s) { return (T *) x2nrealloc ((void *) p, pn, s); } template <typename T> inline T * xmemdup (T const *p, size_t s) { return (T *) xmemdup ((void const *) p, s); } # endif #endif /* !XALLOC_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fseek.c����������������������������������������������������������������0000664�0000000�0000000�00000002035�12166360012�013407� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* An fseek() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdio.h> /* Get off_t. */ #include <unistd.h> int fseek (FILE *fp, long offset, int whence) { /* Use the replacement fseeko function with all its workarounds. */ return fseeko (fp, (off_t)offset, whence); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stat.c�����������������������������������������������������������������0000664�0000000�0000000�00000007727�12166360012�013302� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Work around platform bugs in stat. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* written by Eric Blake */ /* If the user's config.h happens to include <sys/stat.h>, let it include only the system's <sys/stat.h> here, so that orig_stat doesn't recurse to rpl_stat. */ #define __need_system_sys_stat_h #include <config.h> /* Get the original definition of stat. It might be defined as a macro. */ #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h static inline int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } /* Specification. */ /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <sys/stat.h> above. */ #include "sys/stat.h" #include <errno.h> #include <limits.h> #include <stdbool.h> #include <string.h> #include "dosname.h" #include "verify.h" #if REPLACE_FUNC_STAT_DIR # include "pathmax.h" /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also have a constant PATH_MAX. */ # ifndef PATH_MAX # error "Please port this replacement to your platform" # endif #endif /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But at least this implementation provides the ability to emulate fchdir correctly. */ int rpl_stat (char const *name, struct stat *st) { int result = orig_stat (name, st); #if REPLACE_FUNC_STAT_FILE /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. */ if (result == 0 && !S_ISDIR (st->st_mode)) { size_t len = strlen (name); if (ISSLASH (name[len - 1])) { errno = ENOTDIR; return -1; } } #endif /* REPLACE_FUNC_STAT_FILE */ #if REPLACE_FUNC_STAT_DIR if (result == -1 && errno == ENOENT) { /* Due to mingw's oddities, there are some directories (like c:\) where stat() only succeeds with a trailing slash, and other directories (like c:\windows) where stat() only succeeds without a trailing slash. But we want the two to be synonymous, since chdir() manages either style. Likewise, Mingw also reports ENOENT for names longer than PATH_MAX, when we want ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. Fortunately, mingw PATH_MAX is small enough for stack allocation. */ char fixed_name[PATH_MAX + 1] = {0}; size_t len = strlen (name); bool check_dir = false; verify (PATH_MAX <= 4096); if (PATH_MAX <= len) errno = ENAMETOOLONG; else if (len) { strcpy (fixed_name, name); if (ISSLASH (fixed_name[len - 1])) { check_dir = true; while (len && ISSLASH (fixed_name[len - 1])) fixed_name[--len] = '\0'; if (!len) fixed_name[0] = '/'; } else fixed_name[len++] = '/'; result = orig_stat (fixed_name, st); if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) { result = -1; errno = ENOTDIR; } } } #endif /* REPLACE_FUNC_STAT_DIR */ return result; } �����������������������������������������id-utils-4.6+git20120811/lib/dirname.h��������������������������������������������������������������0000664�0000000�0000000�00000002651�12166360012�013742� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Take file names apart into directory and base names. Copyright (C) 1998, 2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 # include <stdbool.h> # include <stddef.h> # include "dosname.h" # ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' # endif # ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif # if GNULIB_DIRNAME char *base_name (char const *file); char *dir_name (char const *file); # endif char *mdir_name (char const *file); size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); #endif /* not DIRNAME_H_ */ ���������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fd-hook.c��������������������������������������������������������������0000664�0000000�0000000�00000007012�12166360012�013641� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Hook for making making file descriptor functions close(), ioctl() extensible. Copyright (C) 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "fd-hook.h" #include <stdlib.h> /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* The first and last link in the doubly linked list. Initially the list is empty. */ static struct fd_hook anchor = { &anchor, &anchor, NULL, NULL }; int execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary, int fd) { if (remaining_list == &anchor) /* End of list reached. */ return primary (fd); else return remaining_list->private_close_fn (remaining_list->private_next, primary, fd); } int execute_all_close_hooks (gl_close_fn primary, int fd) { return execute_close_hooks (anchor.private_next, primary, fd); } int execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg) { if (remaining_list == &anchor) /* End of list reached. */ return primary (fd, request, arg); else return remaining_list->private_ioctl_fn (remaining_list->private_next, primary, fd, request, arg); } int execute_all_ioctl_hooks (gl_ioctl_fn primary, int fd, int request, void *arg) { return execute_ioctl_hooks (anchor.private_next, primary, fd, request, arg); } void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link) { if (close_hook == NULL) close_hook = execute_close_hooks; if (ioctl_hook == NULL) ioctl_hook = execute_ioctl_hooks; if (link->private_next == NULL && link->private_prev == NULL) { /* Add the link to the doubly linked list. */ link->private_next = anchor.private_next; link->private_prev = &anchor; link->private_close_fn = close_hook; link->private_ioctl_fn = ioctl_hook; anchor.private_next->private_prev = link; anchor.private_next = link; } else { /* The link is already in use. */ if (link->private_close_fn != close_hook || link->private_ioctl_fn != ioctl_hook) abort (); } } void unregister_fd_hook (struct fd_hook *link) { struct fd_hook *next = link->private_next; struct fd_hook *prev = link->private_prev; if (next != NULL && prev != NULL) { /* The link is in use. Remove it from the doubly linked list. */ prev->private_next = next; next->private_prev = prev; /* Clear the link, to mark it unused. */ link->private_next = NULL; link->private_prev = NULL; link->private_close_fn = NULL; link->private_ioctl_fn = NULL; } } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/obstack.h��������������������������������������������������������������0000664�0000000�0000000�00000061250�12166360012�013751� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* obstack.h - object stack macros Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ /* Summary: All the apparent functions defined here are macros. The idea is that you would use these pre-tested macros to solve a very specific set of problems, and they would run fast. Caution: no side-effects in arguments please!! They may be evaluated MANY times!! These macros operate a stack of objects. Each object starts life small, and may grow to maturity. (Consider building a word syllable by syllable.) An object can move while it is growing. Once it has been "finished" it never changes address again. So the "top of the stack" is typically an immature growing object, while the rest of the stack is of mature, fixed size and fixed address objects. These routines grab large chunks of memory, using a function you supply, called 'obstack_chunk_alloc'. On occasion, they free chunks, by calling 'obstack_chunk_free'. You must define them and declare them before using any obstack macros. Each independent stack is represented by a 'struct obstack'. Each of the obstack macros expects a pointer to such a structure as the first argument. One motivation for this package is the problem of growing char strings in symbol tables. Unless you are "fascist pig with a read-only mind" --Gosper's immortal quote from HAKMEM item 154, out of context--you would not like to put any arbitrary upper limit on the length of your symbols. In practice this often means you will build many short symbols and a few long symbols. At the time you are reading a symbol you don't know how long it is. One traditional method is to read a symbol into a buffer, realloc()ating the buffer every time you try to read a symbol that is longer than the buffer. This is beaut, but you still will want to copy the symbol from the buffer to a more permanent symbol-table entry say about half the time. With obstacks, you can work differently. Use one obstack for all symbol names. As you read a symbol, grow the name in the obstack gradually. When the name is complete, finalize it. Then, if the symbol exists already, free the newly read name. The way we do this is to take a large chunk, allocating memory from low addresses. When you want to build a symbol in the chunk you just add chars above the current "high water mark" in the chunk. When you have finished adding chars, because you got to the end of the symbol, you know how long the chars are, and you can create a new object. Mostly the chars will not burst over the highest address of the chunk, because you would typically expect a chunk to be (say) 100 times as long as an average object. In case that isn't clear, when we have enough chars to make up the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) so we just point to it where it lies. No moving of chars is needed and this is the second win: potentially long strings need never be explicitly shuffled. Once an object is formed, it does not change its address during its lifetime. When the chars burst over a chunk boundary, we allocate a larger chunk, and then copy the partly formed object from the end of the old chunk to the beginning of the new larger chunk. We then carry on accreting characters to the end of the object as we normally would. A special macro is provided to add a single char at a time to a growing object. This allows the use of register variables, which break the ordinary 'growth' macro. Summary: We allocate large chunks. We carve out one object at a time from the current chunk. Once carved, an object never moves. We are free to append data of any size to the currently growing object. Exactly one object is growing in an obstack at any one time. You can run one obstack per control block. You may have as many control blocks as you dare. Because of the way we do it, you can "unwind" an obstack back to a previous state. (You may remove objects much as you would with a stack.) */ /* Don't do the contents of this file more than once. */ #ifndef _OBSTACK_H #define _OBSTACK_H 1 /* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is defined, as with GNU C, use that; that way we don't pollute the namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h> and use ptrdiff_t. */ #ifdef __PTRDIFF_TYPE__ # define PTR_INT_TYPE __PTRDIFF_TYPE__ #else # include <stddef.h> # define PTR_INT_TYPE ptrdiff_t #endif /* If B is the base of an object addressed by P, return the result of aligning P to the next multiple of A + 1. B and P must be of type char *. A + 1 must be a power of 2. */ #define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A))) /* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case where pointers can be converted to integers, aligned as integers, and converted back again. If PTR_INT_TYPE is narrower than a pointer (e.g., the AS/400), play it safe and compute the alignment relative to B. Otherwise, use the faster strategy of computing the alignment relative to 0. */ #define __PTR_ALIGN(B, P, A) \ __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \ P, A) #include <string.h> #ifdef __cplusplus extern "C" { #endif struct _obstack_chunk /* Lives at front of each chunk. */ { char *limit; /* 1 past end of this chunk */ struct _obstack_chunk *prev; /* address of prior chunk or NULL */ char contents[4]; /* objects begin here */ }; struct obstack /* control current object in current chunk */ { long chunk_size; /* preferred size to allocate chunks in */ struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ char *object_base; /* address of object we are building */ char *next_free; /* where to add next char to current object */ char *chunk_limit; /* address of char after current chunk */ union { PTR_INT_TYPE tempint; void *tempptr; } temp; /* Temporary for some macros. */ int alignment_mask; /* Mask of alignment for each object. */ /* These prototypes vary based on 'use_extra_arg', and we use casts to the prototypeless function type in all assignments, but having prototypes here quiets -Wstrict-prototypes. */ struct _obstack_chunk *(*chunkfun) (void *, long); void (*freefun) (void *, struct _obstack_chunk *); void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ unsigned maybe_empty_object:1;/* There is a possibility that the current chunk contains a zero-length object. This prevents freeing the chunk if we allocate a bigger chunk to replace it. */ unsigned alloc_failed:1; /* No longer used, as we now call the failed handler on error, but retained for binary compatibility. */ }; /* Declare the external functions we use; they are in obstack.c. */ extern void _obstack_newchunk (struct obstack *, int); extern int _obstack_begin (struct obstack *, int, int, void *(*) (long), void (*) (void *)); extern int _obstack_begin_1 (struct obstack *, int, int, void *(*) (void *, long), void (*) (void *, void *), void *); extern int _obstack_memory_used (struct obstack *); /* The default name of the function for freeing a chunk is 'obstack_free', but gnulib users can override this by defining '__obstack_free'. */ #ifndef __obstack_free # define __obstack_free obstack_free #endif extern void __obstack_free (struct obstack *obstack, void *block); /* Error handler called when 'obstack_chunk_alloc' failed to allocate more memory. This can be set to a user defined function which should either abort gracefully or use longjump - but shouldn't return. The default action is to print a message and abort. */ extern void (*obstack_alloc_failed_handler) (void); /* Exit value used when 'print_and_abort' is used. */ extern int obstack_exit_failure; /* Pointer to beginning of object being allocated or to be allocated next. Note that this might not be the final address of the object because a new chunk might be needed to hold the final size. */ #define obstack_base(h) ((void *) (h)->object_base) /* Size for allocating ordinary chunks. */ #define obstack_chunk_size(h) ((h)->chunk_size) /* Pointer to next byte not yet allocated in current chunk. */ #define obstack_next_free(h) ((h)->next_free) /* Mask specifying low bits that should be clear in address of an object. */ #define obstack_alignment_mask(h) ((h)->alignment_mask) /* To prevent prototype warnings provide complete argument list. */ #define obstack_init(h) \ _obstack_begin ((h), 0, 0, \ (void *(*) (long)) obstack_chunk_alloc, \ (void (*) (void *)) obstack_chunk_free) #define obstack_begin(h, size) \ _obstack_begin ((h), (size), 0, \ (void *(*) (long)) obstack_chunk_alloc, \ (void (*) (void *)) obstack_chunk_free) #define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ _obstack_begin ((h), (size), (alignment), \ (void *(*) (long)) (chunkfun), \ (void (*) (void *)) (freefun)) #define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ _obstack_begin_1 ((h), (size), (alignment), \ (void *(*) (void *, long)) (chunkfun), \ (void (*) (void *, void *)) (freefun), (arg)) #define obstack_chunkfun(h, newchunkfun) \ ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) #define obstack_freefun(h, newfreefun) \ ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) #define obstack_blank_fast(h,n) ((h)->next_free += (n)) #define obstack_memory_used(h) _obstack_memory_used (h) #if defined __GNUC__ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and does not implement __extension__. But that compiler doesn't define __GNUC_MINOR__. */ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) # define __extension__ # endif /* For GNU C, if not -traditional, we can define these macros to compute all args only once without using a global variable. Also, we can avoid using the 'temp' slot, to make faster code. */ # define obstack_object_size(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->next_free - __o->object_base); }) # define obstack_room(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->chunk_limit - __o->next_free); }) # define obstack_make_room(OBSTACK,length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ if (__o->chunk_limit - __o->next_free < __len) \ _obstack_newchunk (__o, __len); \ (void) 0; }) # define obstack_empty_p(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (__o->chunk->prev == 0 \ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \ __o->chunk->contents, \ __o->alignment_mask)); }) # define obstack_grow(OBSTACK,where,length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ if (__o->next_free + __len > __o->chunk_limit) \ _obstack_newchunk (__o, __len); \ memcpy (__o->next_free, where, __len); \ __o->next_free += __len; \ (void) 0; }) # define obstack_grow0(OBSTACK,where,length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ if (__o->next_free + __len + 1 > __o->chunk_limit) \ _obstack_newchunk (__o, __len + 1); \ memcpy (__o->next_free, where, __len); \ __o->next_free += __len; \ *(__o->next_free)++ = 0; \ (void) 0; }) # define obstack_1grow(OBSTACK,datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + 1 > __o->chunk_limit) \ _obstack_newchunk (__o, 1); \ obstack_1grow_fast (__o, datum); \ (void) 0; }) /* These assume that the obstack alignment is good enough for pointers or ints, and that the data added so far to the current object shares that much alignment. */ # define obstack_ptr_grow(OBSTACK,datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (void *)); \ obstack_ptr_grow_fast (__o, datum); }) \ # define obstack_int_grow(OBSTACK,datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (int) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (int)); \ obstack_int_grow_fast (__o, datum); }) # define obstack_ptr_grow_fast(OBSTACK,aptr) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ *(const void **) __o1->next_free = (aptr); \ __o1->next_free += sizeof (const void *); \ (void) 0; }) # define obstack_int_grow_fast(OBSTACK,aint) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ *(int *) __o1->next_free = (aint); \ __o1->next_free += sizeof (int); \ (void) 0; }) # define obstack_blank(OBSTACK,length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ if (__o->chunk_limit - __o->next_free < __len) \ _obstack_newchunk (__o, __len); \ obstack_blank_fast (__o, __len); \ (void) 0; }) # define obstack_alloc(OBSTACK,length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_blank (__h, (length)); \ obstack_finish (__h); }) # define obstack_copy(OBSTACK,where,length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow (__h, (where), (length)); \ obstack_finish (__h); }) # define obstack_copy0(OBSTACK,where,length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow0 (__h, (where), (length)); \ obstack_finish (__h); }) /* The local variable is named __o1 to avoid a name conflict when obstack_blank is called. */ # define obstack_finish(OBSTACK) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__value = (void *) __o1->object_base; \ if (__o1->next_free == __value) \ __o1->maybe_empty_object = 1; \ __o1->next_free \ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \ __o1->alignment_mask); \ if (__o1->next_free - (char *)__o1->chunk \ > __o1->chunk_limit - (char *)__o1->chunk) \ __o1->next_free = __o1->chunk_limit; \ __o1->object_base = __o1->next_free; \ __value; }) # define obstack_free(OBSTACK, OBJ) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ void *__obj = (OBJ); \ if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ __o->next_free = __o->object_base = (char *)__obj; \ else (__obstack_free) (__o, __obj); }) #else /* not __GNUC__ */ # define obstack_object_size(h) \ (unsigned) ((h)->next_free - (h)->object_base) # define obstack_room(h) \ (unsigned) ((h)->chunk_limit - (h)->next_free) # define obstack_empty_p(h) \ ((h)->chunk->prev == 0 \ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \ (h)->chunk->contents, \ (h)->alignment_mask)) /* Note that the call to _obstack_newchunk is enclosed in (..., 0) so that we can avoid having void expressions in the arms of the conditional expression. Casting the third operand to void was tried before, but some compilers won't accept it. */ # define obstack_make_room(h,length) \ ( (h)->temp.tempint = (length), \ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0)) # define obstack_grow(h,where,length) \ ( (h)->temp.tempint = (length), \ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ memcpy ((h)->next_free, where, (h)->temp.tempint), \ (h)->next_free += (h)->temp.tempint) # define obstack_grow0(h,where,length) \ ( (h)->temp.tempint = (length), \ (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \ memcpy ((h)->next_free, where, (h)->temp.tempint), \ (h)->next_free += (h)->temp.tempint, \ *((h)->next_free)++ = 0) # define obstack_1grow(h,datum) \ ( (((h)->next_free + 1 > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), 1), 0) : 0), \ obstack_1grow_fast (h, datum)) # define obstack_ptr_grow(h,datum) \ ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ obstack_ptr_grow_fast (h, datum)) # define obstack_int_grow(h,datum) \ ( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ obstack_int_grow_fast (h, datum)) # define obstack_ptr_grow_fast(h,aptr) \ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) # define obstack_int_grow_fast(h,aint) \ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint)) # define obstack_blank(h,length) \ ( (h)->temp.tempint = (length), \ (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ obstack_blank_fast (h, (h)->temp.tempint)) # define obstack_alloc(h,length) \ (obstack_blank ((h), (length)), obstack_finish ((h))) # define obstack_copy(h,where,length) \ (obstack_grow ((h), (where), (length)), obstack_finish ((h))) # define obstack_copy0(h,where,length) \ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) # define obstack_finish(h) \ ( ((h)->next_free == (h)->object_base \ ? (((h)->maybe_empty_object = 1), 0) \ : 0), \ (h)->temp.tempptr = (h)->object_base, \ (h)->next_free \ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \ (h)->alignment_mask), \ (((h)->next_free - (char *) (h)->chunk \ > (h)->chunk_limit - (char *) (h)->chunk) \ ? ((h)->next_free = (h)->chunk_limit) : 0), \ (h)->object_base = (h)->next_free, \ (h)->temp.tempptr) # define obstack_free(h,obj) \ ( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \ ((((h)->temp.tempint > 0 \ && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \ ? (int) ((h)->next_free = (h)->object_base \ = (h)->temp.tempint + (char *) (h)->chunk) \ : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0))) #endif /* not __GNUC__ */ #ifdef __cplusplus } /* C++ */ #endif #endif /* obstack.h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/close-stream.h���������������������������������������������������������0000664�0000000�0000000�00000000064�11434330764�014725� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> int close_stream (FILE *stream); ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strcasecmp.c�����������������������������������������������������������0000664�0000000�0000000�00000003540�12166360012�014460� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Case-insensitive string comparison function. Copyright (C) 1998-1999, 2005-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <string.h> #include <ctype.h> #include <limits.h> #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work with multibyte strings! */ int strcasecmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/math.in.h��������������������������������������������������������������0000664�0000000�0000000�00000117642�12166360012�013670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <math.h>. Copyright (C) 2002-2003, 2007-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 <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_MATH_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ #ifndef _@GUARD_PREFIX@_MATH_H #define _@GUARD_PREFIX@_MATH_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus /* Helper macros to define type-generic function FUNC as overloaded functions, rather than as macros like in C. POSIX declares these with an argument of real-floating (that is, one of float, double, or long double). */ # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ static inline int \ _gl_cxx_ ## func ## f (float f) \ { \ return func (f); \ } \ static inline int \ _gl_cxx_ ## func ## d (double d) \ { \ return func (d); \ } \ static inline int \ _gl_cxx_ ## func ## l (long double l) \ { \ return func (l); \ } # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \ inline int \ func (float f) \ { \ return _gl_cxx_ ## func ## f (f); \ } \ inline int \ func (double d) \ { \ return _gl_cxx_ ## func ## d (d); \ } \ inline int \ func (long double l) \ { \ return _gl_cxx_ ## func ## l (l); \ } #endif /* Helper macros to define a portability warning for the classification macro FUNC called with VALUE. POSIX declares the classification macros with an argument of real-floating (that is, one of float, double, or long double). */ #define _GL_WARN_REAL_FLOATING_DECL(func) \ static inline int \ rpl_ ## func ## f (float f) \ { \ return func (f); \ } \ static inline int \ rpl_ ## func ## d (double d) \ { \ return func (d); \ } \ static inline int \ rpl_ ## func ## l (long double l) \ { \ return func (l); \ } \ _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ "use gnulib module " #func " for portability") #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ : rpl_ ## func ## l (value)) #if @REPLACE_ITOLD@ /* Pull in a function that fixes the 'int' to 'long double' conversion of glibc 2.7. */ _GL_EXTERN_C void _Qp_itoq (long double *, int); static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; #endif /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define it on platforms like Solaris 10, where NAN is present but defined as a function pointer rather than a floating point constant. */ #if !defined NAN || @REPLACE_NAN@ # if !GNULIB_defined_NAN # undef NAN /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke on the expression 0.0 / 0.0. */ # if defined __DECC || defined _MSC_VER static float _NaN () { static float zero = 0.0f; return zero / zero; } # define NAN (_NaN()) # else # define NAN (0.0f / 0.0f) # endif # define GNULIB_defined_NAN 1 # endif #endif /* Solaris 10 defines HUGE_VAL, but as a function pointer rather than a floating point constant. */ #if @REPLACE_HUGE_VAL@ # undef HUGE_VAL # define HUGE_VAL (1.0 / 0.0) #endif #if @GNULIB_ACOSF@ # if !@HAVE_ACOSF@ # undef acosf _GL_FUNCDECL_SYS (acosf, float, (float x)); # endif _GL_CXXALIAS_SYS (acosf, float, (float x)); _GL_CXXALIASWARN (acosf); #elif defined GNULIB_POSIXCHECK # undef acosf # if HAVE_RAW_DECL_ACOSF _GL_WARN_ON_USE (acosf, "acosf is unportable - " "use gnulib module acosf for portability"); # endif #endif #if @GNULIB_ACOSL@ # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ _GL_FUNCDECL_SYS (acosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (acosl, long double, (long double x)); _GL_CXXALIASWARN (acosl); #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL _GL_WARN_ON_USE (acosl, "acosl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ASINF@ # if !@HAVE_ASINF@ # undef asinf _GL_FUNCDECL_SYS (asinf, float, (float x)); # endif _GL_CXXALIAS_SYS (asinf, float, (float x)); _GL_CXXALIASWARN (asinf); #elif defined GNULIB_POSIXCHECK # undef asinf # if HAVE_RAW_DECL_ASINF _GL_WARN_ON_USE (asinf, "asinf is unportable - " "use gnulib module asinf for portability"); # endif #endif #if @GNULIB_ASINL@ # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ _GL_FUNCDECL_SYS (asinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (asinl, long double, (long double x)); _GL_CXXALIASWARN (asinl); #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL _GL_WARN_ON_USE (asinl, "asinl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ATANF@ # if !@HAVE_ATANF@ # undef atanf _GL_FUNCDECL_SYS (atanf, float, (float x)); # endif _GL_CXXALIAS_SYS (atanf, float, (float x)); _GL_CXXALIASWARN (atanf); #elif defined GNULIB_POSIXCHECK # undef atanf # if HAVE_RAW_DECL_ATANF _GL_WARN_ON_USE (atanf, "atanf is unportable - " "use gnulib module atanf for portability"); # endif #endif #if @GNULIB_ATANL@ # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ _GL_FUNCDECL_SYS (atanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (atanl, long double, (long double x)); _GL_CXXALIASWARN (atanl); #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL _GL_WARN_ON_USE (atanl, "atanl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ATAN2F@ # if !@HAVE_ATAN2F@ # undef atan2f _GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); # endif _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); _GL_CXXALIASWARN (atan2f); #elif defined GNULIB_POSIXCHECK # undef atan2f # if HAVE_RAW_DECL_ATAN2F _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " "use gnulib module atan2f for portability"); # endif #endif #if @GNULIB_CEILF@ # if @REPLACE_CEILF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ceilf # define ceilf rpl_ceilf # endif _GL_FUNCDECL_RPL (ceilf, float, (float x)); _GL_CXXALIAS_RPL (ceilf, float, (float x)); # else # if !@HAVE_DECL_CEILF@ _GL_FUNCDECL_SYS (ceilf, float, (float x)); # endif _GL_CXXALIAS_SYS (ceilf, float, (float x)); # endif _GL_CXXALIASWARN (ceilf); #elif defined GNULIB_POSIXCHECK # undef ceilf # if HAVE_RAW_DECL_CEILF _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " "use gnulib module ceilf for portability"); # endif #endif #if @GNULIB_CEIL@ # if @REPLACE_CEIL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ceil rpl_ceil # endif _GL_FUNCDECL_RPL (ceil, double, (double x)); _GL_CXXALIAS_RPL (ceil, double, (double x)); # else _GL_CXXALIAS_SYS (ceil, double, (double x)); # endif _GL_CXXALIASWARN (ceil); #endif #if @GNULIB_CEILL@ # if @REPLACE_CEILL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ceill # define ceill rpl_ceill # endif _GL_FUNCDECL_RPL (ceill, long double, (long double x)); _GL_CXXALIAS_RPL (ceill, long double, (long double x)); # else # if !@HAVE_DECL_CEILL@ _GL_FUNCDECL_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIAS_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIASWARN (ceill); #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL _GL_WARN_ON_USE (ceill, "ceill is unportable - " "use gnulib module ceill for portability"); # endif #endif #if @GNULIB_COPYSIGNF@ # if !@HAVE_COPYSIGNF@ _GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); _GL_CXXALIASWARN (copysignf); #elif defined GNULIB_POSIXCHECK # undef copysignf # if HAVE_RAW_DECL_COPYSIGNF _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " "use gnulib module copysignf for portability"); # endif #endif #if @GNULIB_COPYSIGN@ # if !@HAVE_COPYSIGN@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); _GL_CXXALIASWARN (copysign); #elif defined GNULIB_POSIXCHECK # undef copysign # if HAVE_RAW_DECL_COPYSIGN _GL_WARN_ON_USE (copysign, "copysign is unportable - " "use gnulib module copysign for portability"); # endif #endif #if @GNULIB_COPYSIGNL@ # if !@HAVE_COPYSIGNL@ _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); _GL_CXXALIASWARN (copysignl); #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL _GL_WARN_ON_USE (copysign, "copysignl is unportable - " "use gnulib module copysignl for portability"); # endif #endif #if @GNULIB_COSF@ # if !@HAVE_COSF@ # undef cosf _GL_FUNCDECL_SYS (cosf, float, (float x)); # endif _GL_CXXALIAS_SYS (cosf, float, (float x)); _GL_CXXALIASWARN (cosf); #elif defined GNULIB_POSIXCHECK # undef cosf # if HAVE_RAW_DECL_COSF _GL_WARN_ON_USE (cosf, "cosf is unportable - " "use gnulib module cosf for portability"); # endif #endif #if @GNULIB_COSL@ # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ _GL_FUNCDECL_SYS (cosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cosl, long double, (long double x)); _GL_CXXALIASWARN (cosl); #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL _GL_WARN_ON_USE (cosl, "cosl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_COSHF@ # if !@HAVE_COSHF@ # undef coshf _GL_FUNCDECL_SYS (coshf, float, (float x)); # endif _GL_CXXALIAS_SYS (coshf, float, (float x)); _GL_CXXALIASWARN (coshf); #elif defined GNULIB_POSIXCHECK # undef coshf # if HAVE_RAW_DECL_COSHF _GL_WARN_ON_USE (coshf, "coshf is unportable - " "use gnulib module coshf for portability"); # endif #endif #if @GNULIB_EXPF@ # if !@HAVE_EXPF@ # undef expf _GL_FUNCDECL_SYS (expf, float, (float x)); # endif _GL_CXXALIAS_SYS (expf, float, (float x)); _GL_CXXALIASWARN (expf); #elif defined GNULIB_POSIXCHECK # undef expf # if HAVE_RAW_DECL_EXPF _GL_WARN_ON_USE (expf, "expf is unportable - " "use gnulib module expf for portability"); # endif #endif #if @GNULIB_EXPL@ # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ _GL_FUNCDECL_SYS (expl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expl, long double, (long double x)); _GL_CXXALIASWARN (expl); #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL _GL_WARN_ON_USE (expl, "expl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_FABSF@ # if !@HAVE_FABSF@ # undef fabsf _GL_FUNCDECL_SYS (fabsf, float, (float x)); # endif _GL_CXXALIAS_SYS (fabsf, float, (float x)); _GL_CXXALIASWARN (fabsf); #elif defined GNULIB_POSIXCHECK # undef fabsf # if HAVE_RAW_DECL_FABSF _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " "use gnulib module fabsf for portability"); # endif #endif #if @GNULIB_FLOORF@ # if @REPLACE_FLOORF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef floorf # define floorf rpl_floorf # endif _GL_FUNCDECL_RPL (floorf, float, (float x)); _GL_CXXALIAS_RPL (floorf, float, (float x)); # else # if !@HAVE_DECL_FLOORF@ _GL_FUNCDECL_SYS (floorf, float, (float x)); # endif _GL_CXXALIAS_SYS (floorf, float, (float x)); # endif _GL_CXXALIASWARN (floorf); #elif defined GNULIB_POSIXCHECK # undef floorf # if HAVE_RAW_DECL_FLOORF _GL_WARN_ON_USE (floorf, "floorf is unportable - " "use gnulib module floorf for portability"); # endif #endif #if @GNULIB_FLOOR@ # if @REPLACE_FLOOR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define floor rpl_floor # endif _GL_FUNCDECL_RPL (floor, double, (double x)); _GL_CXXALIAS_RPL (floor, double, (double x)); # else _GL_CXXALIAS_SYS (floor, double, (double x)); # endif _GL_CXXALIASWARN (floor); #endif #if @GNULIB_FLOORL@ # if @REPLACE_FLOORL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef floorl # define floorl rpl_floorl # endif _GL_FUNCDECL_RPL (floorl, long double, (long double x)); _GL_CXXALIAS_RPL (floorl, long double, (long double x)); # else # if !@HAVE_DECL_FLOORL@ _GL_FUNCDECL_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIASWARN (floorl); #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL _GL_WARN_ON_USE (floorl, "floorl is unportable - " "use gnulib module floorl for portability"); # endif #endif #if @GNULIB_FMAF@ # if @REPLACE_FMAF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmaf # define fmaf rpl_fmaf # endif _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); # else # if !@HAVE_FMAF@ _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); # endif _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); # endif _GL_CXXALIASWARN (fmaf); #elif defined GNULIB_POSIXCHECK # undef fmaf # if HAVE_RAW_DECL_FMAF _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " "use gnulib module fmaf for portability"); # endif #endif #if @GNULIB_FMA@ # if @REPLACE_FMA@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fma # define fma rpl_fma # endif _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); # else # if !@HAVE_FMA@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); # endif _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); # endif _GL_CXXALIASWARN (fma); #elif defined GNULIB_POSIXCHECK # undef fma # if HAVE_RAW_DECL_FMA _GL_WARN_ON_USE (fma, "fma is unportable - " "use gnulib module fma for portability"); # endif #endif #if @GNULIB_FMAL@ # if @REPLACE_FMAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmal # define fmal rpl_fmal # endif _GL_FUNCDECL_RPL (fmal, long double, (long double x, long double y, long double z)); _GL_CXXALIAS_RPL (fmal, long double, (long double x, long double y, long double z)); # else # if !@HAVE_FMAL@ _GL_FUNCDECL_SYS (fmal, long double, (long double x, long double y, long double z)); # endif _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif _GL_CXXALIASWARN (fmal); #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL _GL_WARN_ON_USE (fmal, "fmal is unportable - " "use gnulib module fmal for portability"); # endif #endif #if @GNULIB_FMODF@ # if !@HAVE_FMODF@ # undef fmodf _GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); _GL_CXXALIASWARN (fmodf); #elif defined GNULIB_POSIXCHECK # undef fmodf # if HAVE_RAW_DECL_FMODF _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " "use gnulib module fmodf for portability"); # endif #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPF@ # if @REPLACE_FREXPF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpf # define frexpf rpl_frexpf # endif _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); # else # if !@HAVE_FREXPF@ # undef frexpf _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); # endif _GL_CXXALIASWARN (frexpf); #elif defined GNULIB_POSIXCHECK # undef frexpf # if HAVE_RAW_DECL_FREXPF _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " "use gnulib module frexpf for portability"); # endif #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXP@ # if @REPLACE_FREXP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define frexp rpl_frexp # endif _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); # else _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); # endif _GL_CXXALIASWARN (frexp); #elif defined GNULIB_POSIXCHECK # undef frexp /* Assume frexp is always declared. */ _GL_WARN_ON_USE (frexp, "frexp is unportable - " "use gnulib module frexp for portability"); #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpl # define frexpl rpl_frexpl # endif _GL_FUNCDECL_RPL (frexpl, long double, (long double x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); #else # if !@HAVE_DECL_FREXPL@ _GL_FUNCDECL_SYS (frexpl, long double, (long double x, int *expptr) _GL_ARG_NONNULL ((2))); # endif # if @GNULIB_FREXPL@ _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); # endif #endif #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) _GL_CXXALIASWARN (frexpl); #endif #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK # undef frexpl # if HAVE_RAW_DECL_FREXPL _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " "use gnulib module frexpl for portability"); # endif #endif /* Return x * 2^exp. */ #if @GNULIB_LDEXPF@ # if !@HAVE_LDEXPF@ # undef ldexpf _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); # endif _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); _GL_CXXALIASWARN (ldexpf); #elif defined GNULIB_POSIXCHECK # undef ldexpf # if HAVE_RAW_DECL_LDEXPF _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " "use gnulib module ldexpf for portability"); # endif #endif /* Return x * 2^exp. */ #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ldexpl # define ldexpl rpl_ldexpl # endif _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); #else # if !@HAVE_DECL_LDEXPL@ _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); # endif # if @GNULIB_LDEXPL@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); # endif #endif #if @GNULIB_LDEXPL@ _GL_CXXALIASWARN (ldexpl); #endif #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK # undef ldexpl # if HAVE_RAW_DECL_LDEXPL _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " "use gnulib module ldexpl for portability"); # endif #endif #if @GNULIB_LOGB@ # if !@HAVE_DECL_LOGB@ _GL_EXTERN_C double logb (double x); # endif #elif defined GNULIB_POSIXCHECK # undef logb # if HAVE_RAW_DECL_LOGB _GL_WARN_ON_USE (logb, "logb is unportable - " "use gnulib module logb for portability"); # endif #endif #if @GNULIB_LOGF@ # if !@HAVE_LOGF@ # undef logf _GL_FUNCDECL_SYS (logf, float, (float x)); # endif _GL_CXXALIAS_SYS (logf, float, (float x)); _GL_CXXALIASWARN (logf); #elif defined GNULIB_POSIXCHECK # undef logf # if HAVE_RAW_DECL_LOGF _GL_WARN_ON_USE (logf, "logf is unportable - " "use gnulib module logf for portability"); # endif #endif #if @GNULIB_LOGL@ # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ _GL_FUNCDECL_SYS (logl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logl, long double, (long double x)); _GL_CXXALIASWARN (logl); #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL _GL_WARN_ON_USE (logl, "logl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_LOG10F@ # if !@HAVE_LOG10F@ # undef log10f _GL_FUNCDECL_SYS (log10f, float, (float x)); # endif _GL_CXXALIAS_SYS (log10f, float, (float x)); _GL_CXXALIASWARN (log10f); #elif defined GNULIB_POSIXCHECK # undef log10f # if HAVE_RAW_DECL_LOG10F _GL_WARN_ON_USE (log10f, "log10f is unportable - " "use gnulib module log10f for portability"); # endif #endif #if @GNULIB_MODFF@ # if !@HAVE_MODFF@ # undef modff _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); _GL_CXXALIASWARN (modff); #elif defined GNULIB_POSIXCHECK # undef modff # if HAVE_RAW_DECL_MODFF _GL_WARN_ON_USE (modff, "modff is unportable - " "use gnulib module modff for portability"); # endif #endif #if @GNULIB_POWF@ # if !@HAVE_POWF@ # undef powf _GL_FUNCDECL_SYS (powf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (powf, float, (float x, float y)); _GL_CXXALIASWARN (powf); #elif defined GNULIB_POSIXCHECK # undef powf # if HAVE_RAW_DECL_POWF _GL_WARN_ON_USE (powf, "powf is unportable - " "use gnulib module powf for portability"); # endif #endif #if @GNULIB_RINTF@ # if !@HAVE_RINTF@ _GL_FUNCDECL_SYS (rintf, float, (float x)); # endif _GL_CXXALIAS_SYS (rintf, float, (float x)); _GL_CXXALIASWARN (rintf); #elif defined GNULIB_POSIXCHECK # undef rintf # if HAVE_RAW_DECL_RINTF _GL_WARN_ON_USE (rintf, "rintf is unportable - " "use gnulib module rintf for portability"); # endif #endif #if @GNULIB_RINT@ # if !@HAVE_RINT@ _GL_FUNCDECL_SYS (rint, double, (double x)); # endif _GL_CXXALIAS_SYS (rint, double, (double x)); _GL_CXXALIASWARN (rint); #elif defined GNULIB_POSIXCHECK # undef rint # if HAVE_RAW_DECL_RINT _GL_WARN_ON_USE (rint, "rint is unportable - " "use gnulib module rint for portability"); # endif #endif #if @GNULIB_RINTL@ # if !@HAVE_RINTL@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); _GL_CXXALIASWARN (rintl); #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL _GL_WARN_ON_USE (rintl, "rintl is unportable - " "use gnulib module rintl for portability"); # endif #endif #if @GNULIB_ROUNDF@ # if @REPLACE_ROUNDF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef roundf # define roundf rpl_roundf # endif _GL_FUNCDECL_RPL (roundf, float, (float x)); _GL_CXXALIAS_RPL (roundf, float, (float x)); # else # if !@HAVE_DECL_ROUNDF@ _GL_FUNCDECL_SYS (roundf, float, (float x)); # endif _GL_CXXALIAS_SYS (roundf, float, (float x)); # endif _GL_CXXALIASWARN (roundf); #elif defined GNULIB_POSIXCHECK # undef roundf # if HAVE_RAW_DECL_ROUNDF _GL_WARN_ON_USE (roundf, "roundf is unportable - " "use gnulib module roundf for portability"); # endif #endif #if @GNULIB_ROUND@ # if @REPLACE_ROUND@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef round # define round rpl_round # endif _GL_FUNCDECL_RPL (round, double, (double x)); _GL_CXXALIAS_RPL (round, double, (double x)); # else # if !@HAVE_DECL_ROUND@ _GL_FUNCDECL_SYS (round, double, (double x)); # endif _GL_CXXALIAS_SYS (round, double, (double x)); # endif _GL_CXXALIASWARN (round); #elif defined GNULIB_POSIXCHECK # undef round # if HAVE_RAW_DECL_ROUND _GL_WARN_ON_USE (round, "round is unportable - " "use gnulib module round for portability"); # endif #endif #if @GNULIB_ROUNDL@ # if @REPLACE_ROUNDL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef roundl # define roundl rpl_roundl # endif _GL_FUNCDECL_RPL (roundl, long double, (long double x)); _GL_CXXALIAS_RPL (roundl, long double, (long double x)); # else # if !@HAVE_DECL_ROUNDL@ _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIASWARN (roundl); #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL _GL_WARN_ON_USE (roundl, "roundl is unportable - " "use gnulib module roundl for portability"); # endif #endif #if @GNULIB_SINF@ # if !@HAVE_SINF@ # undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinf, float, (float x)); _GL_CXXALIASWARN (sinf); #elif defined GNULIB_POSIXCHECK # undef sinf # if HAVE_RAW_DECL_SINF _GL_WARN_ON_USE (sinf, "sinf is unportable - " "use gnulib module sinf for portability"); # endif #endif #if @GNULIB_SINL@ # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ _GL_FUNCDECL_SYS (sinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sinl, long double, (long double x)); _GL_CXXALIASWARN (sinl); #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL _GL_WARN_ON_USE (sinl, "sinl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_SINHF@ # if !@HAVE_SINHF@ # undef sinhf _GL_FUNCDECL_SYS (sinhf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinhf, float, (float x)); _GL_CXXALIASWARN (sinhf); #elif defined GNULIB_POSIXCHECK # undef sinhf # if HAVE_RAW_DECL_SINHF _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " "use gnulib module sinhf for portability"); # endif #endif #if @GNULIB_SQRTF@ # if !@HAVE_SQRTF@ # undef sqrtf _GL_FUNCDECL_SYS (sqrtf, float, (float x)); # endif _GL_CXXALIAS_SYS (sqrtf, float, (float x)); _GL_CXXALIASWARN (sqrtf); #elif defined GNULIB_POSIXCHECK # undef sqrtf # if HAVE_RAW_DECL_SQRTF _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " "use gnulib module sqrtf for portability"); # endif #endif #if @GNULIB_SQRTL@ # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); _GL_CXXALIASWARN (sqrtl); #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_TANF@ # if !@HAVE_TANF@ # undef tanf _GL_FUNCDECL_SYS (tanf, float, (float x)); # endif _GL_CXXALIAS_SYS (tanf, float, (float x)); _GL_CXXALIASWARN (tanf); #elif defined GNULIB_POSIXCHECK # undef tanf # if HAVE_RAW_DECL_TANF _GL_WARN_ON_USE (tanf, "tanf is unportable - " "use gnulib module tanf for portability"); # endif #endif #if @GNULIB_TANL@ # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ _GL_FUNCDECL_SYS (tanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (tanl, long double, (long double x)); _GL_CXXALIASWARN (tanl); #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL _GL_WARN_ON_USE (tanl, "tanl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_TANHF@ # if !@HAVE_TANHF@ # undef tanhf _GL_FUNCDECL_SYS (tanhf, float, (float x)); # endif _GL_CXXALIAS_SYS (tanhf, float, (float x)); _GL_CXXALIASWARN (tanhf); #elif defined GNULIB_POSIXCHECK # undef tanhf # if HAVE_RAW_DECL_TANHF _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " "use gnulib module tanhf for portability"); # endif #endif #if @GNULIB_TRUNCF@ # if @REPLACE_TRUNCF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define truncf rpl_truncf # endif _GL_FUNCDECL_RPL (truncf, float, (float x)); _GL_CXXALIAS_RPL (truncf, float, (float x)); # else # if !@HAVE_DECL_TRUNCF@ _GL_FUNCDECL_SYS (truncf, float, (float x)); # endif _GL_CXXALIAS_SYS (truncf, float, (float x)); # endif _GL_CXXALIASWARN (truncf); #elif defined GNULIB_POSIXCHECK # undef truncf # if HAVE_RAW_DECL_TRUNCF _GL_WARN_ON_USE (truncf, "truncf is unportable - " "use gnulib module truncf for portability"); # endif #endif #if @GNULIB_TRUNC@ # if @REPLACE_TRUNC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define trunc rpl_trunc # endif _GL_FUNCDECL_RPL (trunc, double, (double x)); _GL_CXXALIAS_RPL (trunc, double, (double x)); # else # if !@HAVE_DECL_TRUNC@ _GL_FUNCDECL_SYS (trunc, double, (double x)); # endif _GL_CXXALIAS_SYS (trunc, double, (double x)); # endif _GL_CXXALIASWARN (trunc); #elif defined GNULIB_POSIXCHECK # undef trunc # if HAVE_RAW_DECL_TRUNC _GL_WARN_ON_USE (trunc, "trunc is unportable - " "use gnulib module trunc for portability"); # endif #endif #if @GNULIB_TRUNCL@ # if @REPLACE_TRUNCL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef truncl # define truncl rpl_truncl # endif _GL_FUNCDECL_RPL (truncl, long double, (long double x)); _GL_CXXALIAS_RPL (truncl, long double, (long double x)); # else # if !@HAVE_DECL_TRUNCL@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIASWARN (truncl); #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL _GL_WARN_ON_USE (truncl, "truncl is unportable - " "use gnulib module truncl for portability"); # endif #endif /* Definitions of function-like macros come here, after the function declarations. */ #if @GNULIB_ISFINITE@ # if @REPLACE_ISFINITE@ _GL_EXTERN_C int gl_isfinitef (float x); _GL_EXTERN_C int gl_isfinited (double x); _GL_EXTERN_C int gl_isfinitel (long double x); # undef isfinite # define isfinite(x) \ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ gl_isfinitef (x)) # endif # ifdef __cplusplus # ifdef isfinite _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isfinite _GL_WARN_REAL_FLOATING_DECL (isfinite); # undef isfinite # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) # endif #endif #if @GNULIB_ISINF@ # if @REPLACE_ISINF@ _GL_EXTERN_C int gl_isinff (float x); _GL_EXTERN_C int gl_isinfd (double x); _GL_EXTERN_C int gl_isinfl (long double x); # undef isinf # define isinf(x) \ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ gl_isinff (x)) # endif # ifdef __cplusplus # ifdef isinf _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isinf _GL_WARN_REAL_FLOATING_DECL (isinf); # undef isinf # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) # endif #endif #if @GNULIB_ISNANF@ /* Test for NaN for 'float' numbers. */ # if @HAVE_ISNANF@ /* The original <math.h> included above provides a declaration of isnan macro or (older) isnanf function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf _GL_EXTERN_C int isnanf (float x); # endif #endif #if @GNULIB_ISNAND@ /* Test for NaN for 'double' numbers. This function is a gnulib extension, unlike isnan() which applied only to 'double' numbers earlier but now is a type-generic macro. */ # if @HAVE_ISNAND@ /* The original <math.h> included above provides a declaration of isnan macro. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand _GL_EXTERN_C int isnand (double x); # endif #endif #if @GNULIB_ISNANL@ /* Test for NaN for 'long double' numbers. */ # if @HAVE_ISNANL@ /* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; # endif #endif /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ #if @GNULIB_ISNAN@ # if @REPLACE_ISNAN@ /* We can't just use the isnanf macro (e.g.) as exposed by isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ # if @HAVE_ISNANF@ && __GNUC__ >= 4 # define gl_isnan_f(x) __builtin_isnanf ((float)(x)) # else _GL_EXTERN_C int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif # if @HAVE_ISNAND@ && __GNUC__ >= 4 # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else _GL_EXTERN_C int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif # if @HAVE_ISNANL@ && __GNUC__ >= 4 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) # else _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) # endif # undef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) # elif __GNUC__ >= 4 # undef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ __builtin_isnanf ((float)(x))) # endif # ifdef __cplusplus # ifdef isnan _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) # endif # else /* Ensure isnan is a macro. */ # ifndef isnan # define isnan isnan # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isnan _GL_WARN_REAL_FLOATING_DECL (isnan); # undef isnan # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) # endif #endif #if @GNULIB_SIGNBIT@ # if @REPLACE_SIGNBIT_USING_GCC@ # undef signbit /* GCC 4.0 and newer provides three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) # endif # if @REPLACE_SIGNBIT@ # undef signbit _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); # if __GNUC__ >= 2 && !defined __STRICT_ANSI__ # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ ({ union { float _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ _m._value = (arg); \ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ }) # endif # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ ({ union { double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ _m._value = (arg); \ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ }) # endif # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ ({ union { long double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ _m._value = (arg); \ (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ }) # endif # endif # define signbit(x) \ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ gl_signbitf (x)) # endif # ifdef __cplusplus # ifdef signbit _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined signbit _GL_WARN_REAL_FLOATING_DECL (signbit); # undef signbit # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) # endif #endif #endif /* _@GUARD_PREFIX@_MATH_H */ #endif /* _@GUARD_PREFIX@_MATH_H */ ����������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/close.c����������������������������������������������������������������0000664�0000000�0000000�00000002707�12166360012�013425� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* close replacement. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #include <errno.h> #include "fd-hook.h" #include "msvc-inval.h" #undef close #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int close_nothrow (int fd) { int result; TRY_MSVC_INVAL { result = close (fd); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } #else # define close_nothrow close #endif /* Override close() to call into other gnulib modules. */ int rpl_close (int fd) { #if WINDOWS_SOCKETS int retval = execute_all_close_hooks (close_nothrow, fd); #else int retval = close_nothrow (fd); #endif #if REPLACE_FCHDIR if (retval >= 0) _gl_unregister_fd (fd); #endif return retval; } ���������������������������������������������������������id-utils-4.6+git20120811/lib/strerror-override.h����������������������������������������������������0000664�0000000�0000000�00000003500�12166360012�016014� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* strerror-override.h --- POSIX compatible system error routine Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ #ifndef _GL_STRERROR_OVERRIDE_H # define _GL_STRERROR_OVERRIDE_H # include <errno.h> # include <stddef.h> /* Reasonable buffer size that should never trigger ERANGE; if this proves too small, we intentionally abort(), to remind us to fix this value. */ # define STACKBUF_LEN 256 /* If ERRNUM maps to an errno value defined by gnulib, return a string describing the error. Otherwise return NULL. */ # if REPLACE_STRERROR_0 \ || GNULIB_defined_ESOCK \ || GNULIB_defined_EWINSOCK \ || GNULIB_defined_ENOMSG \ || GNULIB_defined_EIDRM \ || GNULIB_defined_ENOLINK \ || GNULIB_defined_EPROTO \ || GNULIB_defined_EMULTIHOP \ || GNULIB_defined_EBADMSG \ || GNULIB_defined_EOVERFLOW \ || GNULIB_defined_ENOTSUP \ || GNULIB_defined_ENETRESET \ || GNULIB_defined_ECONNABORTED \ || GNULIB_defined_ESTALE \ || GNULIB_defined_EDQUOT \ || GNULIB_defined_ECANCELED extern const char *strerror_override (int errnum); # else # define strerror_override(ignored) NULL # endif #endif /* _GL_STRERROR_OVERRIDE_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/umaxtostr.c������������������������������������������������������������0000664�0000000�0000000�00000000113�12166360012�014353� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define anytostr umaxtostr #define inttype uintmax_t #include "anytostr.c" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/ftello.c���������������������������������������������������������������0000664�0000000�0000000�00000004335�12166360012�013604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* An ftello() function that works around platform bugs. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdio.h> /* Get lseek. */ #include <unistd.h> #include "stdio-impl.h" off_t ftello (FILE *fp) #undef ftello #if !HAVE_FTELLO # undef ftell # define ftello ftell #endif { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return -1; #endif #if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ /* The Solaris stdio leaves the _IOREAD flag set after reading from a file reaches EOF and the program then starts writing to the file. ftello gets confused by this. */ if (fp_->_flag & _IOWRT) { off_t pos; /* Call ftello nevertheless, for the side effects that it does on fp. */ ftello (fp); /* Compute the file position ourselves. */ pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); if (pos >= 0) { if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) pos += fp_->_ptr - fp_->_base; } return pos; } #endif #if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an ftello that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } #endif return ftello (fp); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/size_max.h�������������������������������������������������������������0000664�0000000�0000000�00000002322�12166360012�014135� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* size_max.h -- declare SIZE_MAX through system headers Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ # include <limits.h> /* Get SIZE_MAX declaration on systems like glibc 2. */ # if HAVE_STDINT_H # include <stdint.h> # endif /* On systems where these include files don't define it, SIZE_MAX is defined in config.h. */ #endif /* GNULIB_SIZE_MAX_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/open.c�����������������������������������������������������������������0000664�0000000�0000000�00000013764�12166360012�013266� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Open a descriptor to a file. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* If the user's config.h happens to include <fcntl.h>, let it include only the system's <fcntl.h> here, so that orig_open doesn't recurse to rpl_open. */ #define __need_system_fcntl_h #include <config.h> /* Get the original definition of open. It might be defined as a macro. */ #include <fcntl.h> #include <sys/types.h> #undef __need_system_fcntl_h static inline int orig_open (const char *filename, int flags, mode_t mode) { return open (filename, flags, mode); } /* Specification. */ /* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <fcntl.h> above. */ #include "fcntl.h" #include <errno.h> #include <stdarg.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #ifndef REPLACE_OPEN_DIRECTORY # define REPLACE_OPEN_DIRECTORY 0 #endif int open (const char *filename, int flags, ...) { mode_t mode; int fd; mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } #if GNULIB_defined_O_NONBLOCK /* The only known platform that lacks O_NONBLOCK is mingw, but it also lacks named pipes and Unix sockets, which are the only two file types that require non-blocking handling in open(). Therefore, it is safe to ignore O_NONBLOCK here. It is handy that mingw also lacks openat(), so that is also covered here. */ flags &= ~O_NONBLOCK; #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX <http://www.opengroup.org/susv3/functions/open.html> says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, - if O_WRONLY or O_RDWR is specified, open() must fail because the file does not contain a '.' directory. */ if (flags & (O_CREAT | O_WRONLY | O_RDWR)) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { errno = EISDIR; return -1; } } #endif fd = orig_open (filename, flags, mode); #if REPLACE_FCHDIR /* Implementing fchdir and fdopendir requires the ability to open a directory file descriptor. If open doesn't support that (as on mingw), we use a dummy file that behaves the same as directories on Linux (ie. always reports EOF on attempts to read()), and override fstat() in fchdir.c to hide the fact that we have a dummy. */ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES && ((flags & O_ACCMODE) == O_RDONLY || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) { struct stat statbuf; if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) { /* Maximum recursion depth of 1. */ fd = open ("/dev/null", flags, mode); if (0 <= fd) fd = _gl_register_fd (fd, filename); } else errno = EACCES; } #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) { /* We know len is positive, since open did not fail with ENOENT. */ size_t len = strlen (filename); if (filename[len - 1] == '/') { struct stat statbuf; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return -1; } } } #endif #if REPLACE_FCHDIR if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) fd = _gl_register_fd (fd, filename); #endif return fd; } ������������id-utils-4.6+git20120811/lib/fseterr.c��������������������������������������������������������������0000664�0000000�0000000�00000005325�12166360012�013771� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Set the error indicator of a stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "fseterr.h" #include <errno.h> #include "stdio-impl.h" void fseterr (FILE *fp) { /* Most systems provide FILE as a struct and the necessary bitmask in <stdio.h>, because they need it for implementing getc() and putc() as fast macros. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags |= _IO_ERR_SEEN; #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ fp_->_flags |= __SERR; #elif defined __EMX__ /* emx+gcc */ fp->_flags |= _IOERR; #elif defined __minix /* Minix */ fp->_flags |= _IOERR; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ fp_->_flag |= _IOERR; #elif defined __UCLIBC__ /* uClibc */ fp->__modeflags |= __FLAG_ERROR; #elif defined __QNX__ /* QNX */ fp->_Mode |= 0x200 /* _MERR */; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__error = 1; #elif 0 /* unknown */ /* Portable fallback, based on an idea by Rich Felker. Wow! 6 system calls for something that is just a bit operation! Not activated on any system, because there is no way to repair FP when the sequence of system calls fails, and library code should not call abort(). */ int saved_errno; int fd; int fd2; saved_errno = errno; fflush (fp); fd = fileno (fp); fd2 = dup (fd); if (fd2 >= 0) { close (fd); fputc ('\0', fp); /* This should set the error indicator. */ fflush (fp); /* Or this. */ if (dup2 (fd2, fd) < 0) /* Whee... we botched the stream and now cannot restore it! */ abort (); close (fd2); } errno = saved_errno; #else #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib." #endif } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/iswblank.c�������������������������������������������������������������0000664�0000000�0000000�00000001642�12166360012�014127� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test wide character for being blank. Copyright (C) 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <wctype.h> int iswblank (wint_t wc) { return wc == ' ' || wc == '\t'; } ����������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strnlen1.h�������������������������������������������������������������0000664�0000000�0000000�00000002307�12166360012�014067� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Find the length of STRING + 1, but scan at most MAXLEN bytes. Copyright (C) 2005, 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _STRNLEN1_H #define _STRNLEN1_H #include <stddef.h> #ifdef __cplusplus extern "C" { #endif /* Find the length of STRING + 1, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many characters, return MAXLEN. */ /* This is the same as strnlen (string, maxlen - 1) + 1. */ extern size_t strnlen1 (const char *string, size_t maxlen) _GL_ATTRIBUTE_PURE; #ifdef __cplusplus } #endif #endif /* _STRNLEN1_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/anytostr.c�������������������������������������������������������������0000664�0000000�0000000�00000003026�12166360012�014176� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* anytostr.c -- convert integers to printable strings Copyright (C) 2001, 2006, 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert */ /* Tell gcc not to warn about the (i < 0) test, below. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" #endif #include <config.h> #include "inttostr.h" /* Convert I to a printable string in BUF, which must be at least INT_BUFSIZE_BOUND (INTTYPE) bytes long. Return the address of the printable string, which need not start at BUF. */ char * __attribute_warn_unused_result__ anytostr (inttype i, char *buf) { char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xstrndup.h�������������������������������������������������������������0000664�0000000�0000000�00000001774�12166360012�014217� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003, 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 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 <http://www.gnu.org/licenses/>. */ #include <stddef.h> /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ extern char *xstrndup (const char *string, size_t n); ����id-utils-4.6+git20120811/lib/string.in.h������������������������������������������������������������0000664�0000000�0000000�00000115224�12166360012�014237� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <string.h>. Copyright (C) 1995-1996, 2001-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _@GUARD_PREFIX@_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _@GUARD_PREFIX@_STRING_H #define _@GUARD_PREFIX@_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include <wchar.h> #endif /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ && ! defined __GLIBC__ # include <unistd.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ _GL_FUNCDECL_SYS (ffsl, int, (long int i)); # endif _GL_CXXALIAS_SYS (ffsl, int, (long int i)); _GL_CXXALIASWARN (ffsl); #elif defined GNULIB_POSIXCHECK # undef ffsl # if HAVE_RAW_DECL_FFSL _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); # endif #endif /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSLL@ # if !@HAVE_FFSLL@ _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); # endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll # if HAVE_RAW_DECL_FFSLL _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); # endif #endif /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); # else # if ! @HAVE_MEMCHR@ _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const void * std::memchr (const void *, int, size_t); } extern "C++" { void * std::memchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memchr, void *, (void const *__s, int __c, size_t __n), void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, (void const *__s, int __c, size_t __n)); # else _GL_CXXALIASWARN (memchr); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem # endif _GL_FUNCDECL_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else # if ! @HAVE_DECL_MEMMEM@ _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # endif _GL_CXXALIASWARN (memmem); #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); _GL_CXXALIASWARN (mempcpy); #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::memrchr (const void *, int, size_t); } extern "C++" { void * std::memrchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); # else _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::rawmemchr (const void *, int); } extern "C++" { void * std::rawmemchr (void *, int); } */ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); # else _GL_CXXALIASWARN (rawmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); _GL_CXXALIASWARN (stpcpy); #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if @REPLACE_STPNCPY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef stpncpy # define stpncpy rpl_stpncpy # endif _GL_FUNCDECL_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # else # if ! @HAVE_STPNCPY@ _GL_FUNCDECL_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif _GL_CXXALIASWARN (stpncpy); #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if @REPLACE_STRCHRNUL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strchrnul rpl_strchrnul # endif _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strchrnul, char *, (const char *str, int ch)); # else # if ! @HAVE_STRCHRNUL@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * std::strchrnul (const char *, int); } extern "C++" { char * std::strchrnul (char *, int); } */ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char *, (char const *__s, int __c_in), char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); # else _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Append no more than N characters from SRC onto DEST. */ #if @GNULIB_STRNCAT@ # if @REPLACE_STRNCAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strncat # define strncat rpl_strncat # endif _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); # else _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); # endif _GL_CXXALIASWARN (strncat); #elif defined GNULIB_POSIXCHECK # undef strncat # if HAVE_RAW_DECL_STRNCAT _GL_WARN_ON_USE (strncat, "strncat is unportable - " "use gnulib module strncat for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strndup # define strndup rpl_strndup # endif _GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); # else # if ! @HAVE_DECL_STRNDUP@ _GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); # endif _GL_CXXALIASWARN (strndup); #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if @REPLACE_STRNLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strnlen # define strnlen rpl_strnlen # endif _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); # else # if ! @HAVE_DECL_STRNLEN@ _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); # endif _GL_CXXALIASWARN (strnlen); #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const char * strpbrk (const char *, const char *); } extern "C++" { char * strpbrk (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, (char const *__s, char const *__accept)); # else _GL_CXXALIASWARN (strpbrk); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ _GL_FUNCDECL_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim)); _GL_CXXALIASWARN (strsep); # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strstr rpl_strstr # endif _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); # else /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strstr (const char *, const char *); } extern "C++" { char * strstr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strstr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strstr); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strcasestr rpl_strcasestr # endif _GL_FUNCDECL_RPL (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strcasestr, char *, (const char *haystack, const char *needle)); # else # if ! @HAVE_STRCASESTR@ _GL_FUNCDECL_SYS (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strcasestr (const char *, const char *); } extern "C++" { char * strcasestr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strcasestr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strcasestr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strtok_r # define strtok_r rpl_strtok_r # endif _GL_FUNCDECL_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # else # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ _GL_FUNCDECL_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # endif _GL_CXXALIASWARN (strtok_r); # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbslen rpl_mbslen # endif _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); # else _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif _GL_CXXALIASWARN (mbslen); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbschr); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux || defined __INTERIX # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbsrchr rpl_mbsrchr /* avoid collision with system function */ # endif _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbsrchr); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case. If the two match, return a pointer to the first byte after this prefix in STRING. Otherwise, return NULL. Note: This function may, in multibyte locales, return non-NULL if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); # else _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); # endif _GL_CXXALIASWARN (mbspbrk); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror # define strerror rpl_strerror # endif _GL_FUNCDECL_RPL (strerror, char *, (int)); _GL_CXXALIAS_RPL (strerror, char *, (int)); # else _GL_CXXALIAS_SYS (strerror, char *, (int)); # endif _GL_CXXALIASWARN (strerror); #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif /* Map any int, typically from errno, into an error message. Multithread-safe. Uses the POSIX declaration, not the glibc declaration. */ #if @GNULIB_STRERROR_R@ # if @REPLACE_STRERROR_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror_r # define strerror_r rpl_strerror_r # endif _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); # else # if !@HAVE_DECL_STRERROR_R@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif # if @HAVE_DECL_STRERROR_R@ _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK # undef strerror_r # if HAVE_RAW_DECL_STRERROR_R _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " "use gnulib module strerror_r-posix for portability"); # endif #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strsignal rpl_strsignal # endif _GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); # else # if ! @HAVE_DECL_STRSIGNAL@ _GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is 'const char *'. */ _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); # endif _GL_CXXALIASWARN (strsignal); #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); _GL_CXXALIASWARN (strverscmp); #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/pathmax.h��������������������������������������������������������������0000664�0000000�0000000�00000005667�12166360012�013777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Define PATH_MAX somehow. Requires sys/types.h. Copyright (C) 1992, 1999, 2001, 2003, 2005, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PATHMAX_H # define _PATHMAX_H /* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, including the terminating NUL byte. <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html> PATH_MAX is not defined on systems which have no limit on filename length, such as GNU/Hurd. This file does *not* define PATH_MAX always. Programs that use this file can handle the GNU/Hurd case in several ways: - Either with a package-wide handling, or with a per-file handling, - Either through a #ifdef PATH_MAX or through a fallback like #ifndef PATH_MAX # define PATH_MAX 8192 #endif or through a fallback like #ifndef PATH_MAX # define PATH_MAX pathconf ("/", _PC_PATH_MAX) #endif */ # include <unistd.h> # include <limits.h> # ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 256 # endif /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include <sys/param.h> # endif # if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN # endif # ifdef __hpux /* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename, *not* including the terminating NUL byte, and is set to 1023. Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is not defined at all any more. */ # undef PATH_MAX # define PATH_MAX 1024 # endif # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, section "Maximum Path Length Limitation", <http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath> explains that the maximum size of a filename, including the terminating NUL byte, is 260 = 3 + 256 + 1. This is the same value as - FILENAME_MAX in <stdio.h>, - _MAX_PATH in <stdlib.h>, - MAX_PATH in <windef.h>. Undefine the original value, because mingw's <limits.h> gets it wrong. */ # undef PATH_MAX # define PATH_MAX 260 # endif #endif /* _PATHMAX_H */ �������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stat-macros.h����������������������������������������������������������0000664�0000000�0000000�00000000220�11434330764�014556� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* All the mode bits that can be affected by chmod. */ #define CHMOD_MODE_BITS \ (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strings.in.h�����������������������������������������������������������0000664�0000000�0000000�00000007767�12166360012�014436� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A substitute <strings.h>. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _@GUARD_PREFIX@_STRINGS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Minix 3.1.8 has a bug: <sys/types.h> must be included before <strings.h>. But avoid namespace pollution on glibc systems. */ #if defined __minix && !defined __GLIBC__ # include <sys/types.h> #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_STRINGS_H@ # @INCLUDE_NEXT@ @NEXT_STRINGS_H@ #endif #ifndef _@GUARD_PREFIX@_STRINGS_H #define _@GUARD_PREFIX@_STRINGS_H #if ! @HAVE_DECL_STRNCASECMP@ /* Get size_t. */ # include <stddef.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Find the index of the least-significant set bit. */ #if @GNULIB_FFS@ # if !@HAVE_FFS@ _GL_FUNCDECL_SYS (ffs, int, (int i)); # endif _GL_CXXALIAS_SYS (ffs, int, (int i)); _GL_CXXALIASWARN (ffs); #elif defined GNULIB_POSIXCHECK # undef ffs # if HAVE_RAW_DECL_FFS _GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); # endif #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work in multibyte locales. */ #if ! @HAVE_STRCASECMP@ extern int strcasecmp (char const *s1, char const *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strcasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strcasecmp # if HAVE_RAW_DECL_STRCASECMP _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbscasecmp if you care about " "internationalization, or use c_strcasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ #if ! @HAVE_DECL_STRNCASECMP@ extern int strncasecmp (char const *s1, char const *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strncasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strncasecmp # if HAVE_RAW_DECL_STRNCASECMP _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbsncasecmp or mbspcasecmp if you care about " "internationalization, or use c_strncasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif #ifdef __cplusplus } #endif #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ ���������id-utils-4.6+git20120811/lib/str-two-way.h����������������������������������������������������������0000664�0000000�0000000�00000042276�12166360012�014547� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Byte-wise substring search, using the Two-Way algorithm. Copyright (C) 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake <ebb9@byu.net>, 2008. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Before including this file, you need to include <config.h> and <string.h>, and define: RESULT_TYPE A macro that expands to the return type. AVAILABLE(h, h_l, j, n_l) A macro that returns nonzero if there are at least N_L bytes left starting at H[J]. H is 'unsigned char *', H_L, J, and N_L are 'size_t'; H_L is an lvalue. For NUL-terminated searches, H_L can be modified each iteration to avoid having to compute the end of H up front. For case-insensitivity, you may optionally define: CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L characters of P1 and P2 are equal. CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. This file undefines the macros documented above, and defines LONG_NEEDLE_THRESHOLD. */ #include <limits.h> #include <stdint.h> /* We use the Two-Way string matching algorithm (also known as Chrochemore-Perrin), which guarantees linear complexity with constant space. Additionally, for long needles, we also use a bad character shift table similar to the Boyer-Moore algorithm to achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf */ /* Point at which computing a bad-byte shift table is likely to be worthwhile. Small needles should not compute a table, since it adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a speedup no greater than a factor of NEEDLE_LEN. The larger the needle, the better the potential performance gain. On the other hand, on non-POSIX systems with CHAR_BIT larger than eight, the memory required for the table is prohibitive. */ #if CHAR_BIT < 10 # define LONG_NEEDLE_THRESHOLD 32U #else # define LONG_NEEDLE_THRESHOLD SIZE_MAX #endif #ifndef MAX # define MAX(a, b) ((a < b) ? (b) : (a)) #endif #ifndef CANON_ELEMENT # define CANON_ELEMENT(c) c #endif #ifndef CMP_FUNC # define CMP_FUNC memcmp #endif /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. Return the index of the first byte in the right half, and set *PERIOD to the global period of the right half. The global period of a string is the smallest index (possibly its length) at which all remaining bytes in the string are repetitions of the prefix (the last repetition may be a subset of the prefix). When NEEDLE is factored into two halves, a local period is the length of the smallest word that shares a suffix with the left half and shares a prefix with the right half. All factorizations of a non-empty NEEDLE have a local period of at least 1 and no greater than NEEDLE_LEN. A critical factorization has the property that the local period equals the global period. All strings have at least one critical factorization with the left half smaller than the global period. And while some strings have more than one critical factorization, it is provable that with an ordered alphabet, at least one of the critical factorizations corresponds to a maximal suffix. Given an ordered alphabet, a critical factorization can be computed in linear time, with 2 * NEEDLE_LEN comparisons, by computing the shorter of two ordered maximal suffixes. The ordered maximal suffixes are determined by lexicographic comparison while tracking periodicity. */ static size_t critical_factorization (const unsigned char *needle, size_t needle_len, size_t *period) { /* Index of last byte of left half, or SIZE_MAX. */ size_t max_suffix, max_suffix_rev; size_t j; /* Index into NEEDLE for current candidate suffix. */ size_t k; /* Offset into current period. */ size_t p; /* Intermediate period. */ unsigned char a, b; /* Current comparison bytes. */ /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered out 0-length needles. */ if (needle_len < 3) { *period = 1; return needle_len - 1; } /* Invariants: 0 <= j < NEEDLE_LEN - 1 -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) min(max_suffix, max_suffix_rev) < global period of NEEDLE 1 <= p <= global period of NEEDLE p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] 1 <= k <= p */ /* Perform lexicographic search. */ max_suffix = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix + k]); if (a < b) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* b < a */ { /* Suffix is larger, start over from current location. */ max_suffix = j++; k = p = 1; } } *period = p; /* Perform reverse lexicographic search. */ max_suffix_rev = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix_rev + k]); if (b < a) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix_rev; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* a < b */ { /* Suffix is larger, start over from current location. */ max_suffix_rev = j++; k = p = 1; } } /* Choose the shorter suffix. Return the index of the first byte of the right half, rather than the last byte of the left half. For some examples, 'banana' has two critical factorizations, both exposed by the two lexicographic extreme suffixes of 'anana' and 'nana', where both suffixes have a period of 2. On the other hand, with 'aab' and 'bba', both strings have a single critical factorization of the last byte, with the suffix having a period of 1. While the maximal lexicographic suffix of 'aab' is 'b', the maximal lexicographic suffix of 'bba' is 'ba', which is not a critical factorization. Conversely, the maximal reverse lexicographic suffix of 'a' works for 'bba', but not 'ab' for 'aab'. The shorter suffix of the two will always be a critical factorization. */ if (max_suffix_rev + 1 < max_suffix + 1) return max_suffix + 1; *period = p; return max_suffix_rev + 1; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. Performance is guaranteed to be linear, with an initialization cost of 2 * NEEDLE_LEN comparisons. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ static RETURN_TYPE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch in the left half can only advance by the period, so use memory to avoid rescanning known occurrences of the period in the right half. */ size_t memory = 0; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = MAX (suffix, memory); while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = suffix; while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. Performance is guaranteed to be linear, with an initialization cost of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance is not possible. */ static RETURN_TYPE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ size_t shift_table[1U << CHAR_BIT]; /* See below. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Populate shift_table. For each possible byte value c, shift_table[c] is the distance from the last occurrence of c to the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ for (i = 0; i < 1U << CHAR_BIT; i++) shift_table[i] = needle_len; for (i = 0; i < needle_len; i++) shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch in the left half can only advance by the period, so use memory to avoid rescanning known occurrences of the period in the right half. */ size_t memory = 0; size_t shift; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { if (memory && shift < period) { /* Since needle is periodic, but the last period has a byte out of place, there can be no match until after the mismatch. */ shift = needle_len - period; } memory = 0; j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = MAX (suffix, memory); while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ size_t shift; period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = suffix; while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } #undef AVAILABLE #undef CANON_ELEMENT #undef CMP_FUNC #undef MAX #undef RETURN_TYPE ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stdlib.in.h������������������������������������������������������������0000664�0000000�0000000�00000076030�12166360012�014213� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <stdlib.h>. Copyright (C) 1995, 2001-2004, 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 <http://www.gnu.org/licenses/>. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _@GUARD_PREFIX@_STDLIB_H #define _@GUARD_PREFIX@_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */ #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS # include <sys/wait.h> #endif /* Solaris declares getloadavg() in <sys/loadavg.h>. */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include <sys/loadavg.h> #endif /* Native Windows platforms declare mktemp() in <io.h>. */ #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include <io.h> #endif #if @GNULIB_RANDOM_R@ /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included from <stdlib.h> if _REENTRANT is defined. Include it whenever we need 'struct random_data'. */ # if @HAVE_RANDOM_H@ # include <random.h> # endif # if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ # include <stdint.h> # endif # if !@HAVE_STRUCT_RANDOM_DATA@ /* Define 'struct random_data'. But allow multiple gnulib generated <stdlib.h> replacements to coexist. */ # if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; # define GNULIB_defined_struct_random_data 1 # endif # endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ /* On MacOS X 10.5, only <unistd.h> declares mkstemps. */ /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include <unistd.h> #endif /* The definition of _Noreturn is copied here. */ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #if @GNULIB__EXIT@ /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ # if !@HAVE__EXIT@ _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " "use gnulib module _Exit for portability"); # endif #endif #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ # if !@HAVE_ATOLL@ _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); _GL_CXXALIASWARN (atoll); #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif _GL_CXXALIASWARN (calloc); #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else # if !@HAVE_CANONICALIZE_FILE_NAME@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ # if !@HAVE_DECL_GETLOADAVG@ _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); _GL_CXXALIASWARN (getloadavg); #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); _GL_CXXALIASWARN (getsubopt); #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_GRANTPT@ /* Change the ownership and access permission of the slave side of the pseudo-terminal whose master side is specified by FD. */ # if !@HAVE_GRANTPT@ _GL_FUNCDECL_SYS (grantpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (grantpt, int, (int fd)); _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not rely on GNU or POSIX semantics for malloc and realloc (for example, by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ # if @REPLACE_MALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif _GL_FUNCDECL_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBTOWC@ # if @REPLACE_MBTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc # define mbtowc rpl_mbtowc # endif _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # else _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIASWARN (mbtowc); #endif #if @GNULIB_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ # if !@HAVE_MKDTEMP@ _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); _GL_CXXALIASWARN (mkdtemp); #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMP@ _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemp); #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMPS@ _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemps); #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if @REPLACE_MKSTEMP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkstemp rpl_mkstemp # endif _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else # if ! @HAVE_MKSTEMP@ _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKSTEMPS@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); _GL_CXXALIASWARN (mkstemps); #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_POSIX_OPENPT@ /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ # if !@HAVE_POSIX_OPENPT@ _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); # endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); _GL_CXXALIASWARN (posix_openpt); #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " "use gnulib module posix_openpt for portability"); # endif #endif #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ # if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname # if HAVE_RAW_DECL_PTSNAME _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " "use gnulib module ptsname for portability"); # endif #endif #if @GNULIB_PTSNAME_R@ /* Set the pathname of the pseudo-terminal slave associated with the master FD is open on and return 0, or set errno and return non-zero on errors. */ # if @REPLACE_PTSNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ptsname_r # define ptsname_r rpl_ptsname_r # endif _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); # else # if !@HAVE_PTSNAME_R@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIASWARN (ptsname_r); #elif defined GNULIB_POSIXCHECK # undef ptsname_r # if HAVE_RAW_DECL_PTSNAME_R _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " "use gnulib module ptsname_r for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv # define putenv rpl_putenv # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (random, long, (void)); # endif _GL_CXXALIAS_SYS (random, long, (void)); _GL_CXXALIASWARN (random); #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM _GL_WARN_ON_USE (random, "random is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); # endif _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); _GL_CXXALIASWARN (srandom); #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM _GL_WARN_ON_USE (srandom, "srandom is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); _GL_CXXALIASWARN (initstate); #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate, "initstate is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); _GL_CXXALIASWARN (setstate); #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate, "setstate is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef random_r # define random_r rpl_random_r # endif _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); # endif _GL_CXXALIASWARN (random_r); #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef srandom_r # define srandom_r rpl_srandom_r # endif _GL_FUNCDECL_RPL (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (srandom_r); #elif defined GNULIB_POSIXCHECK # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef initstate_r # define initstate_r rpl_initstate_r # endif _GL_FUNCDECL_RPL (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setstate_r # define setstate_r rpl_setstate_r # endif _GL_FUNCDECL_RPL (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (setstate_r, int, (char *arg_state, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath # endif _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); # else # if !@HAVE_REALPATH@ _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); # endif _GL_CXXALIASWARN (realpath); #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ # if !@HAVE_RPMATCH@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); _GL_CXXALIASWARN (rpmatch); #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if @REPLACE_SETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setenv # define setenv rpl_setenv # endif _GL_FUNCDECL_RPL (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (setenv, int, (const char *name, const char *value, int replace)); # else # if !@HAVE_DECL_SETENV@ _GL_FUNCDECL_SYS (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setenv, int, (const char *name, const char *value, int replace)); # endif # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) _GL_CXXALIASWARN (setenv); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ # if @REPLACE_STRTOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strtod rpl_strtod # endif _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); # else # if !@HAVE_STRTOD@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif _GL_CXXALIASWARN (strtod); #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ # if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ # if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNLOCKPT@ /* Unlock the slave side of the pseudo-terminal whose master side is specified by FD, so that it can be opened. */ # if !@HAVE_UNLOCKPT@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); _GL_CXXALIASWARN (unlockpt); #elif defined GNULIB_POSIXCHECK # undef unlockpt # if HAVE_RAW_DECL_UNLOCKPT _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " "use gnulib module unlockpt for portability"); # endif #endif #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unsetenv # define unsetenv rpl_unsetenv # endif _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); # else # if !@HAVE_DECL_UNSETENV@ _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); # endif # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) _GL_CXXALIASWARN (unsetenv); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCTOMB@ # if @REPLACE_WCTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb # define wctomb rpl_wctomb # endif _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif _GL_CXXALIASWARN (wctomb); #endif #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/quote.c����������������������������������������������������������������0000664�0000000�0000000�00000002376�12166360012�013457� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* quote.c - quote arguments for output Copyright (C) 1998-2001, 2003, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert <eggert@twinsun.com> */ #include <config.h> #include "quotearg.h" #include "quote.h" /* Return an unambiguous printable representation of NAME, allocated in slot N, suitable for diagnostics. */ char const * quote_n (int n, char const *name) { return quotearg_n_style (n, locale_quoting_style, name); } /* Return an unambiguous printable representation of NAME, suitable for diagnostics. */ char const * quote (char const *name) { return quote_n (0, name); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fpending.c�������������������������������������������������������������0000664�0000000�0000000�00000002045�12166360012�014105� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fpending.c -- return the number of pending output bytes on a stream Copyright (C) 2000, 2004, 2006-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "fpending.h" /* Return the number of pending (aka buffered, unflushed) bytes on the stream, FP, that is open for writing. */ size_t __fpending (FILE *fp) { return PENDING_OUTPUT_N_BYTES; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/quotearg.c�������������������������������������������������������������0000664�0000000�0000000�00000073754�12166360012�014161� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* quotearg.c - quote arguments for output Copyright (C) 1998-2002, 2004-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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert <eggert@twinsun.com> */ /* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that the quoting_options_from_style function might be candidate for attribute 'pure' */ #if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" #endif #include <config.h> #include "quotearg.h" #include "xalloc.h" #include "c-strcaseeq.h" #include "localcharset.h" #include <ctype.h> #include <errno.h> #include <limits.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <wchar.h> #include <wctype.h> #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #define INT_BITS (sizeof (int) * CHAR_BIT) struct quoting_options { /* Basic quoting style. */ enum quoting_style style; /* Additional flags. Bitwise combination of enum quoting_flags. */ int flags; /* Quote the characters indicated by this bit vector even if the quoting style would not normally require them to be quoted. */ unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1]; /* The left quote for custom_quoting_style. */ char const *left_quote; /* The right quote for custom_quoting_style. */ char const *right_quote; }; /* Names of quoting styles. */ char const *const quoting_style_args[] = { "literal", "shell", "shell-always", "c", "c-maybe", "escape", "locale", "clocale", 0 }; /* Correspondences to quoting style names. */ enum quoting_style const quoting_style_vals[] = { literal_quoting_style, shell_quoting_style, shell_always_quoting_style, c_quoting_style, c_maybe_quoting_style, escape_quoting_style, locale_quoting_style, clocale_quoting_style }; /* The default quoting options. */ static struct quoting_options default_quoting_options; /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options * clone_quoting_options (struct quoting_options *o) { int e = errno; struct quoting_options *p = xmemdup (o ? o : &default_quoting_options, sizeof *o); errno = e; return p; } /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o) { return (o ? o : &default_quoting_options)->style; } /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s) { (o ? o : &default_quoting_options)->style = s; } /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). */ int set_char_quoting (struct quoting_options *o, char c, int i) { unsigned char uc = c; unsigned int *p = (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS; int shift = uc % INT_BITS; int r = (*p >> shift) & 1; *p ^= ((i & 1) ^ r) << shift; return r; } /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i) { int r; if (!o) o = &default_quoting_options; r = o->flags; o->flags = i; return r; } void set_custom_quoting (struct quoting_options *o, char const *left_quote, char const *right_quote) { if (!o) o = &default_quoting_options; o->style = custom_quoting_style; if (!left_quote || !right_quote) abort (); o->left_quote = left_quote; o->right_quote = right_quote; } /* Return quoting options for STYLE, with no extra quoting. */ static struct quoting_options /* NOT PURE!! */ quoting_options_from_style (enum quoting_style style) { struct quoting_options o = { 0 }; if (style == custom_quoting_style) abort (); o.style = style; return o; } /* MSGID approximates a quotation mark. Return its translation if it has one; otherwise, return either it or "\"", depending on S. S is either clocale_quoting_style or locale_quoting_style. */ static char const * gettext_quote (char const *msgid, enum quoting_style s) { char const *translation = _(msgid); char const *locale_code; if (translation != msgid) return translation; /* For UTF-8 and GB-18030, use single quotes U+2018 and U+2019. Here is a list of other locales that include U+2018 and U+2019: ISO-8859-7 0xA1 KOI8-T 0x91 CP869 0x8B CP874 0x91 CP932 0x81 0x65 CP936 0xA1 0xAE CP949 0xA1 0xAE CP950 0xA1 0xA5 CP1250 0x91 CP1251 0x91 CP1252 0x91 CP1253 0x91 CP1254 0x91 CP1255 0x91 CP1256 0x91 CP1257 0x91 EUC-JP 0xA1 0xC6 EUC-KR 0xA1 0xAE EUC-TW 0xA1 0xE4 BIG5 0xA1 0xA5 BIG5-HKSCS 0xA1 0xA5 EUC-CN 0xA1 0xAE GBK 0xA1 0xAE Georgian-PS 0x91 PT154 0x91 None of these is still in wide use; using iconv is overkill. */ locale_code = locale_charset (); if (STRCASEEQ (locale_code, "UTF-8", 'U','T','F','-','8',0,0,0,0)) return msgid[0] == '`' ? "\xe2\x80\x98": "\xe2\x80\x99"; if (STRCASEEQ (locale_code, "GB18030", 'G','B','1','8','0','3','0',0,0)) return msgid[0] == '`' ? "\xa1\ae": "\xa1\xaf"; return (s == clocale_quoting_style ? "\"" : "'"); } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and QUOTE_THESE_TOO to control quoting. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG, ARGSIZE, O), except it breaks O into its component pieces and is not careful about errno. */ static size_t quotearg_buffer_restyled (char *buffer, size_t buffersize, char const *arg, size_t argsize, enum quoting_style quoting_style, int flags, unsigned int const *quote_these_too, char const *left_quote, char const *right_quote) { size_t i; size_t len = 0; char const *quote_string = 0; size_t quote_string_len = 0; bool backslash_escapes = false; bool unibyte_locale = MB_CUR_MAX == 1; bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0; #define STORE(c) \ do \ { \ if (len < buffersize) \ buffer[len] = (c); \ len++; \ } \ while (0) switch (quoting_style) { case c_maybe_quoting_style: quoting_style = c_quoting_style; elide_outer_quotes = true; /* Fall through. */ case c_quoting_style: if (!elide_outer_quotes) STORE ('"'); backslash_escapes = true; quote_string = "\""; quote_string_len = 1; break; case escape_quoting_style: backslash_escapes = true; elide_outer_quotes = false; break; case locale_quoting_style: case clocale_quoting_style: case custom_quoting_style: { if (quoting_style != custom_quoting_style) { /* TRANSLATORS: Get translations for open and closing quotation marks. The message catalog should translate "`" to a left quotation mark suitable for the locale, and similarly for "'". For example, a French Unicode local should translate these to U+00AB (LEFT-POINTING DOUBLE ANGLE QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK), respectively. If the catalog has no translation, we will try to use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the current locale is not Unicode, locale_quoting_style will quote 'like this', and clocale_quoting_style will quote "like this". You should always include translations for "`" and "'" even if U+2018 and U+2019 are appropriate for your locale. If you don't know what to put here, please see <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> and use glyphs suitable for your language. */ left_quote = gettext_quote (N_("`"), quoting_style); right_quote = gettext_quote (N_("'"), quoting_style); } if (!elide_outer_quotes) for (quote_string = left_quote; *quote_string; quote_string++) STORE (*quote_string); backslash_escapes = true; quote_string = right_quote; quote_string_len = strlen (quote_string); } break; case shell_quoting_style: quoting_style = shell_always_quoting_style; elide_outer_quotes = true; /* Fall through. */ case shell_always_quoting_style: if (!elide_outer_quotes) STORE ('\''); quote_string = "'"; quote_string_len = 1; break; case literal_quoting_style: elide_outer_quotes = false; break; default: abort (); } for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++) { unsigned char c; unsigned char esc; bool is_right_quote = false; if (backslash_escapes && quote_string_len && i + quote_string_len <= argsize && memcmp (arg + i, quote_string, quote_string_len) == 0) { if (elide_outer_quotes) goto force_outer_quoting_style; is_right_quote = true; } c = arg[i]; switch (c) { case '\0': if (backslash_escapes) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); /* If quote_string were to begin with digits, we'd need to test for the end of the arg as well. However, it's hard to imagine any locale that would use digits in quotes, and set_custom_quoting is documented not to accept them. */ if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9') { STORE ('0'); STORE ('0'); } c = '0'; /* We don't have to worry that this last '0' will be backslash-escaped because, again, quote_string should not start with it and because quote_these_too is documented as not accepting it. */ } else if (flags & QA_ELIDE_NULL_BYTES) continue; break; case '?': switch (quoting_style) { case shell_always_quoting_style: if (elide_outer_quotes) goto force_outer_quoting_style; break; case c_quoting_style: if ((flags & QA_SPLIT_TRIGRAPHS) && i + 2 < argsize && arg[i + 1] == '?') switch (arg[i + 2]) { case '!': case '\'': case '(': case ')': case '-': case '/': case '<': case '=': case '>': /* Escape the second '?' in what would otherwise be a trigraph. */ if (elide_outer_quotes) goto force_outer_quoting_style; c = arg[i + 2]; i += 2; STORE ('?'); STORE ('"'); STORE ('"'); STORE ('?'); break; default: break; } break; default: break; } break; case '\a': esc = 'a'; goto c_escape; case '\b': esc = 'b'; goto c_escape; case '\f': esc = 'f'; goto c_escape; case '\n': esc = 'n'; goto c_and_shell_escape; case '\r': esc = 'r'; goto c_and_shell_escape; case '\t': esc = 't'; goto c_and_shell_escape; case '\v': esc = 'v'; goto c_escape; case '\\': esc = c; /* No need to escape the escape if we are trying to elide outer quotes and nothing else is problematic. */ if (backslash_escapes && elide_outer_quotes && quote_string_len) goto store_c; c_and_shell_escape: if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; /* Fall through. */ c_escape: if (backslash_escapes) { c = esc; goto store_escape; } break; case '{': case '}': /* sometimes special if isolated */ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) break; /* Fall through. */ case '#': case '~': if (i != 0) break; /* Fall through. */ case ' ': case '!': /* special in bash */ case '"': case '$': case '&': case '(': case ')': case '*': case ';': case '<': case '=': /* sometimes special in 0th or (with "set -k") later args */ case '>': case '[': case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */ case '`': case '|': /* A shell special character. In theory, '$' and '`' could be the first bytes of multibyte characters, which means we should check them with mbrtowc, but in practice this doesn't happen so it's not worth worrying about. */ if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; break; case '\'': if (quoting_style == shell_always_quoting_style) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\''); STORE ('\\'); STORE ('\''); } break; case '%': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case ']': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': /* These characters don't cause problems, no matter what the quoting style is. They cannot start multibyte sequences. A digit or a special letter would cause trouble if it appeared at the beginning of quote_string because we'd then escape by prepending a backslash. However, it's hard to imagine any locale that would use digits or letters as quotes, and set_custom_quoting is documented not to accept them. Also, a digit or a special letter would cause trouble if it appeared in quote_these_too, but that's also documented as not accepting them. */ break; default: /* If we have a multibyte sequence, copy it until we reach its end, find an error, or come back to the initial shift state. For C-like styles, if the sequence has unprintable characters, escape the whole sequence, since we can't easily escape single characters within it. */ { /* Length of multibyte sequence found so far. */ size_t m; bool printable; if (unibyte_locale) { m = 1; printable = isprint (c) != 0; } else { mbstate_t mbstate; memset (&mbstate, 0, sizeof mbstate); m = 0; printable = true; if (argsize == SIZE_MAX) argsize = strlen (arg); do { wchar_t w; size_t bytes = mbrtowc (&w, &arg[i + m], argsize - (i + m), &mbstate); if (bytes == 0) break; else if (bytes == (size_t) -1) { printable = false; break; } else if (bytes == (size_t) -2) { printable = false; while (i + m < argsize && arg[i + m]) m++; break; } else { /* Work around a bug with older shells that "see" a '\' that is really the 2nd byte of a multibyte character. In practice the problem is limited to ASCII chars >= '@' that are shell special chars. */ if ('[' == 0x5b && elide_outer_quotes && quoting_style == shell_always_quoting_style) { size_t j; for (j = 1; j < bytes; j++) switch (arg[i + m + j]) { case '[': case '\\': case '^': case '`': case '|': goto force_outer_quoting_style; default: break; } } if (! iswprint (w)) printable = false; m += bytes; } } while (! mbsinit (&mbstate)); } if (1 < m || (backslash_escapes && ! printable)) { /* Output a multibyte sequence, or an escaped unprintable unibyte character. */ size_t ilim = i + m; for (;;) { if (backslash_escapes && ! printable) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); STORE ('0' + (c >> 6)); STORE ('0' + ((c >> 3) & 7)); c = '0' + (c & 7); } else if (is_right_quote) { STORE ('\\'); is_right_quote = false; } if (ilim <= i + 1) break; STORE (c); c = arg[++i]; } goto store_c; } } } if (! ((backslash_escapes || elide_outer_quotes) && quote_these_too && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))) && !is_right_quote) goto store_c; store_escape: if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); store_c: STORE (c); } if (len == 0 && quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; if (quote_string && !elide_outer_quotes) for (; *quote_string; quote_string++) STORE (*quote_string); if (len < buffersize) buffer[len] = '\0'; return len; force_outer_quoting_style: /* Don't reuse quote_these_too, since the addition of outer quotes sufficiently quotes the specified characters. */ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, quoting_style, flags & ~QA_ELIDE_OUTER_QUOTES, NULL, left_quote, right_quote); } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. */ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p->flags, p->quote_these_too, p->left_quote, p->right_quote); errno = e; return r; } /* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */ char * quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o) { return quotearg_alloc_mem (arg, argsize, NULL, o); } /* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly allocated storage containing the quoted string, and store the resulting size into *SIZE, if non-NULL. The result can contain embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not NULL, and set_quoting_flags has not set the null byte elision flag. */ char * quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; /* Elide embedded null bytes if we can't return a size. */ int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES); size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style, flags, p->quote_these_too, p->left_quote, p->right_quote) + 1; char *buf = xcharalloc (bufsize); quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags, p->quote_these_too, p->left_quote, p->right_quote); errno = e; if (size) *size = bufsize - 1; return buf; } /* A storage slot with size and pointer to a value. */ struct slotvec { size_t size; char *val; }; /* Preallocate a slot 0 buffer, so that the caller can always quote one small component of a "memory exhausted" message in slot 0. */ static char slot0[256]; static unsigned int nslots = 1; static struct slotvec slotvec0 = {sizeof slot0, slot0}; static struct slotvec *slotvec = &slotvec0; void quotearg_free (void) { struct slotvec *sv = slotvec; unsigned int i; for (i = 1; i < nslots; i++) free (sv[i].val); if (sv[0].val != slot0) { free (sv[0].val); slotvec0.size = sizeof slot0; slotvec0.val = slot0; } if (sv != &slotvec0) { free (sv); slotvec = &slotvec0; } nslots = 1; } /* Use storage slot N to return a quoted version of argument ARG. ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a null-terminated string. OPTIONS specifies the quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. N is deliberately declared with type "int" to allow for future extensions (using negative values). */ static char * quotearg_n_options (int n, char const *arg, size_t argsize, struct quoting_options const *options) { int e = errno; unsigned int n0 = n; struct slotvec *sv = slotvec; if (n < 0) abort (); if (nslots <= n0) { /* FIXME: technically, the type of n1 should be 'unsigned int', but that evokes an unsuppressible warning from gcc-4.0.1 and older. If gcc ever provides an option to suppress that warning, revert to the original type, so that the test in xalloc_oversized is once again performed only at compile time. */ size_t n1 = n0 + 1; bool preallocated = (sv == &slotvec0); if (xalloc_oversized (n1, sizeof *sv)) xalloc_die (); slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv); if (preallocated) *sv = slotvec0; memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv); nslots = n1; } { size_t size = sv[n].size; char *val = sv[n].val; /* Elide embedded null bytes since we don't return a size. */ int flags = options->flags | QA_ELIDE_NULL_BYTES; size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too, options->left_quote, options->right_quote); if (size <= qsize) { sv[n].size = size = qsize + 1; if (val != slot0) free (val); sv[n].val = val = xcharalloc (size); quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too, options->left_quote, options->right_quote); } errno = e; return val; } } char * quotearg_n (int n, char const *arg) { return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options); } char * quotearg_n_mem (int n, char const *arg, size_t argsize) { return quotearg_n_options (n, arg, argsize, &default_quoting_options); } char * quotearg (char const *arg) { return quotearg_n (0, arg); } char * quotearg_mem (char const *arg, size_t argsize) { return quotearg_n_mem (0, arg, argsize); } char * quotearg_n_style (int n, enum quoting_style s, char const *arg) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, SIZE_MAX, &o); } char * quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, argsize, &o); } char * quotearg_style (enum quoting_style s, char const *arg) { return quotearg_n_style (0, s, arg); } char * quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize) { return quotearg_n_style_mem (0, s, arg, argsize); } char * quotearg_char_mem (char const *arg, size_t argsize, char ch) { struct quoting_options options; options = default_quoting_options; set_char_quoting (&options, ch, 1); return quotearg_n_options (0, arg, argsize, &options); } char * quotearg_char (char const *arg, char ch) { return quotearg_char_mem (arg, SIZE_MAX, ch); } char * quotearg_colon (char const *arg) { return quotearg_char (arg, ':'); } char * quotearg_colon_mem (char const *arg, size_t argsize) { return quotearg_char_mem (arg, argsize, ':'); } char * quotearg_n_custom (int n, char const *left_quote, char const *right_quote, char const *arg) { return quotearg_n_custom_mem (n, left_quote, right_quote, arg, SIZE_MAX); } char * quotearg_n_custom_mem (int n, char const *left_quote, char const *right_quote, char const *arg, size_t argsize) { struct quoting_options o = default_quoting_options; set_custom_quoting (&o, left_quote, right_quote); return quotearg_n_options (n, arg, argsize, &o); } char * quotearg_custom (char const *left_quote, char const *right_quote, char const *arg) { return quotearg_n_custom (0, left_quote, right_quote, arg); } char * quotearg_custom_mem (char const *left_quote, char const *right_quote, char const *arg, size_t argsize) { return quotearg_n_custom_mem (0, left_quote, right_quote, arg, argsize); } ��������������������id-utils-4.6+git20120811/lib/realloc.c��������������������������������������������������������������0000664�0000000�0000000�00000004070�12166360012�013734� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* realloc() function that is glibc compatible. Copyright (C) 1997, 2003-2004, 2006-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering and Bruno Haible */ #define _GL_USE_STDLIB_ALLOC 1 #include <config.h> /* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ #ifdef realloc # define NEED_REALLOC_GNU 1 /* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ #elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU # define NEED_REALLOC_GNU 1 #endif /* Infer the properties of the system's malloc function. The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU # define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 #endif #include <stdlib.h> #include <errno.h> /* Change the size of an allocated block of memory P to N bytes, with error checking. If N is zero, change it to 1. If P is NULL, use malloc. */ void * rpl_realloc (void *p, size_t n) { void *result; #if NEED_REALLOC_GNU if (n == 0) { n = 1; /* In theory realloc might fail, so don't rely on it to free. */ free (p); p = NULL; } #endif if (p == NULL) { #if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE if (n == 0) n = 1; #endif result = malloc (n); } else result = realloc (p, n); #if !HAVE_REALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strerror-override.c����������������������������������������������������0000664�0000000�0000000�00000021030�12166360012�016005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* strerror-override.c --- POSIX compatible system error routine Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2010. */ #include <config.h> #include "strerror-override.h" #include <errno.h> #if GNULIB_defined_EWINSOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H # include <winsock2.h> # endif #endif /* If ERRNUM maps to an errno value defined by gnulib, return a string describing the error. Otherwise return NULL. */ const char * strerror_override (int errnum) { /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ switch (errnum) { #if REPLACE_STRERROR_0 case 0: return "Success"; #endif #if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */ case EINPROGRESS: return "Operation now in progress"; case EALREADY: return "Operation already in progress"; case ENOTSOCK: return "Socket operation on non-socket"; case EDESTADDRREQ: return "Destination address required"; case EMSGSIZE: return "Message too long"; case EPROTOTYPE: return "Protocol wrong type for socket"; case ENOPROTOOPT: return "Protocol not available"; case EPROTONOSUPPORT: return "Protocol not supported"; case EOPNOTSUPP: return "Operation not supported"; case EAFNOSUPPORT: return "Address family not supported by protocol"; case EADDRINUSE: return "Address already in use"; case EADDRNOTAVAIL: return "Cannot assign requested address"; case ENETDOWN: return "Network is down"; case ENETUNREACH: return "Network is unreachable"; case ECONNRESET: return "Connection reset by peer"; case ENOBUFS: return "No buffer space available"; case EISCONN: return "Transport endpoint is already connected"; case ENOTCONN: return "Transport endpoint is not connected"; case ETIMEDOUT: return "Connection timed out"; case ECONNREFUSED: return "Connection refused"; case ELOOP: return "Too many levels of symbolic links"; case EHOSTUNREACH: return "No route to host"; case EWOULDBLOCK: return "Operation would block"; case ETXTBSY: return "Text file busy"; case ENODATA: return "No data available"; case ENOSR: return "Out of streams resources"; case ENOSTR: return "Device not a stream"; case ENOTRECOVERABLE: return "State not recoverable"; case EOWNERDEAD: return "Owner died"; case ETIME: return "Timer expired"; case EOTHER: return "Other error"; #endif #if GNULIB_defined_EWINSOCK /* native Windows platforms */ case ESOCKTNOSUPPORT: return "Socket type not supported"; case EPFNOSUPPORT: return "Protocol family not supported"; case ESHUTDOWN: return "Cannot send after transport endpoint shutdown"; case ETOOMANYREFS: return "Too many references: cannot splice"; case EHOSTDOWN: return "Host is down"; case EPROCLIM: return "Too many processes"; case EUSERS: return "Too many users"; case EDQUOT: return "Disk quota exceeded"; case ESTALE: return "Stale NFS file handle"; case EREMOTE: return "Object is remote"; # if HAVE_WINSOCK2_H /* WSA_INVALID_HANDLE maps to EBADF */ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ /* WSA_INVALID_PARAMETER maps to EINVAL */ case WSA_OPERATION_ABORTED: return "Overlapped operation aborted"; case WSA_IO_INCOMPLETE: return "Overlapped I/O event object not in signaled state"; case WSA_IO_PENDING: return "Overlapped operations will complete later"; /* WSAEINTR maps to EINTR */ /* WSAEBADF maps to EBADF */ /* WSAEACCES maps to EACCES */ /* WSAEFAULT maps to EFAULT */ /* WSAEINVAL maps to EINVAL */ /* WSAEMFILE maps to EMFILE */ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ /* WSAEINPROGRESS maps to EINPROGRESS */ /* WSAEALREADY maps to EALREADY */ /* WSAENOTSOCK maps to ENOTSOCK */ /* WSAEDESTADDRREQ maps to EDESTADDRREQ */ /* WSAEMSGSIZE maps to EMSGSIZE */ /* WSAEPROTOTYPE maps to EPROTOTYPE */ /* WSAENOPROTOOPT maps to ENOPROTOOPT */ /* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ /* WSAEOPNOTSUPP maps to EOPNOTSUPP */ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ /* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */ /* WSAEADDRINUSE maps to EADDRINUSE */ /* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */ /* WSAENETDOWN maps to ENETDOWN */ /* WSAENETUNREACH maps to ENETUNREACH */ /* WSAENETRESET maps to ENETRESET */ /* WSAECONNABORTED maps to ECONNABORTED */ /* WSAECONNRESET maps to ECONNRESET */ /* WSAENOBUFS maps to ENOBUFS */ /* WSAEISCONN maps to EISCONN */ /* WSAENOTCONN maps to ENOTCONN */ /* WSAESHUTDOWN is ESHUTDOWN */ /* WSAETOOMANYREFS is ETOOMANYREFS */ /* WSAETIMEDOUT maps to ETIMEDOUT */ /* WSAECONNREFUSED maps to ECONNREFUSED */ /* WSAELOOP maps to ELOOP */ /* WSAENAMETOOLONG maps to ENAMETOOLONG */ /* WSAEHOSTDOWN is EHOSTDOWN */ /* WSAEHOSTUNREACH maps to EHOSTUNREACH */ /* WSAENOTEMPTY maps to ENOTEMPTY */ /* WSAEPROCLIM is EPROCLIM */ /* WSAEUSERS is EUSERS */ /* WSAEDQUOT is EDQUOT */ /* WSAESTALE is ESTALE */ /* WSAEREMOTE is EREMOTE */ case WSASYSNOTREADY: return "Network subsystem is unavailable"; case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range"; case WSANOTINITIALISED: return "Successful WSAStartup not yet performed"; case WSAEDISCON: return "Graceful shutdown in progress"; case WSAENOMORE: case WSA_E_NO_MORE: return "No more results"; case WSAECANCELLED: case WSA_E_CANCELLED: return "Call was canceled"; case WSAEINVALIDPROCTABLE: return "Procedure call table is invalid"; case WSAEINVALIDPROVIDER: return "Service provider is invalid"; case WSAEPROVIDERFAILEDINIT: return "Service provider failed to initialize"; case WSASYSCALLFAILURE: return "System call failure"; case WSASERVICE_NOT_FOUND: return "Service not found"; case WSATYPE_NOT_FOUND: return "Class type not found"; case WSAEREFUSED: return "Database query was refused"; case WSAHOST_NOT_FOUND: return "Host not found"; case WSATRY_AGAIN: return "Nonauthoritative host not found"; case WSANO_RECOVERY: return "Nonrecoverable error"; case WSANO_DATA: return "Valid name, no data record of requested type"; /* WSA_QOS_* omitted */ # endif #endif #if GNULIB_defined_ENOMSG case ENOMSG: return "No message of desired type"; #endif #if GNULIB_defined_EIDRM case EIDRM: return "Identifier removed"; #endif #if GNULIB_defined_ENOLINK case ENOLINK: return "Link has been severed"; #endif #if GNULIB_defined_EPROTO case EPROTO: return "Protocol error"; #endif #if GNULIB_defined_EMULTIHOP case EMULTIHOP: return "Multihop attempted"; #endif #if GNULIB_defined_EBADMSG case EBADMSG: return "Bad message"; #endif #if GNULIB_defined_EOVERFLOW case EOVERFLOW: return "Value too large for defined data type"; #endif #if GNULIB_defined_ENOTSUP case ENOTSUP: return "Not supported"; #endif #if GNULIB_defined_ENETRESET case ENETRESET: return "Network dropped connection on reset"; #endif #if GNULIB_defined_ECONNABORTED case ECONNABORTED: return "Software caused connection abort"; #endif #if GNULIB_defined_ESTALE case ESTALE: return "Stale NFS file handle"; #endif #if GNULIB_defined_EDQUOT case EDQUOT: return "Disk quota exceeded"; #endif #if GNULIB_defined_ECANCELED case ECANCELED: return "Operation canceled"; #endif default: return NULL; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/save-cwd.h�������������������������������������������������������������0000664�0000000�0000000�00000002045�12166360012�014031� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Save and restore current working directory. Copyright (C) 1995, 1997-1998, 2003, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #ifndef SAVE_CWD_H # define SAVE_CWD_H 1 struct saved_cwd { int desc; char *name; }; int save_cwd (struct saved_cwd *cwd); int restore_cwd (const struct saved_cwd *cwd); void free_cwd (struct saved_cwd *cwd); #endif /* SAVE_CWD_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fopen.c����������������������������������������������������������������0000664�0000000�0000000�00000006654�12166360012�013434� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Open a stream to a file. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* If the user's config.h happens to include <stdio.h>, let it include only the system's <stdio.h> here, so that orig_fopen doesn't recurse to rpl_fopen. */ #define __need_FILE #include <config.h> /* Get the original definition of fopen. It might be defined as a macro. */ #include <stdio.h> #undef __need_FILE static inline FILE * orig_fopen (const char *filename, const char *mode) { return fopen (filename, mode); } /* Specification. */ /* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <stdio.h> above. */ #include "stdio.h" #include <errno.h> #include <fcntl.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> FILE * rpl_fopen (const char *filename, const char *mode) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if FOPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and a mode that requires write access is specified, then fail. Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html> says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then if a mode that requires write access is specified, fopen() must fail because POSIX <http://www.opengroup.org/susv3/functions/fopen.html> says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then fopen() must fail since the file does not contain a '.' directory. */ { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { int fd; struct stat statbuf; FILE *fp; if (mode[0] == 'w' || mode[0] == 'a') { errno = EISDIR; return NULL; } fd = open (filename, O_RDONLY); if (fd < 0) return NULL; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return NULL; } fp = fdopen (fd, mode); if (fp == NULL) { int saved_errno = errno; close (fd); errno = saved_errno; } return fp; } } # endif return orig_fopen (filename, mode); } ������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/quotearg.h�������������������������������������������������������������0000664�0000000�0000000�00000037074�12166360012�014161� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* quotearg.h - quote arguments for output Copyright (C) 1998-2002, 2004, 2006, 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert <eggert@twinsun.com> */ #ifndef QUOTEARG_H_ # define QUOTEARG_H_ 1 # include <stddef.h> /* Basic quoting styles. For each style, an example is given on the input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that style and the default flags and quoted characters. Note that the examples are shown here as valid C strings rather than what displays on a terminal (with "??/" as a trigraph for "\\"). */ enum quoting_style { /* Output names as-is (ls --quoting-style=literal). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "\0 \t\n'\"\033??/\\", "a:b" quotearg: "simple", " \t\n'\"\033??/\\", "a:b" quotearg_colon: "simple", " \t\n'\"\033??/\\", "a:b" */ literal_quoting_style, /* Quote names for the shell if they contain shell metacharacters or would cause ambiguous output (ls --quoting-style=shell). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b" quotearg: "simple", "' \t\n'\\''\"\033??/\\'", "a:b" quotearg_colon: "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_quoting_style, /* Quote names for the shell, even if they would normally not require quoting (ls --quoting-style=shell-always). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. quotearg_buffer: "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'" quotearg: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" quotearg_colon: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_always_quoting_style, /* Quote names as for a C language string (ls --quoting-style=c). Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. Split into consecutive strings if QA_SPLIT_TRIGRAPHS. quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" */ c_quoting_style, /* Like c_quoting_style except omit the surrounding double-quote characters if no quoted characters are encountered. quotearg_buffer: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg_colon: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" */ c_maybe_quoting_style, /* Like c_quoting_style except always omit the surrounding double-quote characters and ignore QA_SPLIT_TRIGRAPHS (ls --quoting-style=escape). quotearg_buffer: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg_colon: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b" */ escape_quoting_style, /* Like clocale_quoting_style, but use single quotes in the default C locale or if the program does not use gettext (ls --quoting-style=locale). For UTF-8 locales, quote characters will use Unicode. LC_MESSAGES=C quotearg_buffer: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg_colon: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ locale_quoting_style, /* Like c_quoting_style except use quotation marks appropriate for the locale and ignore QA_SPLIT_TRIGRAPHS (ls --quoting-style=clocale). LC_MESSAGES=C quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ clocale_quoting_style, /* Like clocale_quoting_style except use the custom quotation marks set by set_custom_quoting. If custom quotation marks are not set, the behavior is undefined. left_quote = right_quote = "'" quotearg_buffer: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" quotearg: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" quotearg_colon: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'" left_quote = "(" and right_quote = ")" quotearg_buffer: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" quotearg: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" quotearg_colon: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)" left_quote = ":" and right_quote = " " quotearg_buffer: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " quotearg: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " quotearg_colon: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b " left_quote = "\"'" and right_quote = "'\"" Notice that this is treated as a single level of quotes or two levels where the outer quote need not be escaped within the inner quotes. For two levels where the outer quote must be escaped within the inner quotes, you must use separate quotearg invocations. quotearg_buffer: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" quotearg: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" quotearg_colon: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\"" */ custom_quoting_style }; /* Flags for use in set_quoting_flags. */ enum quoting_flags { /* Always elide null bytes from styles that do not quote them, even when the length of the result is available to the caller. */ QA_ELIDE_NULL_BYTES = 0x01, /* Omit the surrounding quote characters if no escaped characters are encountered. Note that if no other character needs escaping, then neither does the escape character. */ QA_ELIDE_OUTER_QUOTES = 0x02, /* In the c_quoting_style and c_maybe_quoting_style, split ANSI trigraph sequences into concatenated strings (for example, "?""?/" rather than "??/", which could be confused with "\\"). */ QA_SPLIT_TRIGRAPHS = 0x04 }; /* For now, --quoting-style=literal is the default, but this may change. */ # ifndef DEFAULT_QUOTING_STYLE # define DEFAULT_QUOTING_STYLE literal_quoting_style # endif /* Names of quoting styles and their corresponding values. */ extern char const *const quoting_style_args[]; extern enum quoting_style const quoting_style_vals[]; struct quoting_options; /* The functions listed below set and use a hidden variable that contains the default quoting style options. */ /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options *clone_quoting_options (struct quoting_options *o); /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o); /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s); /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). C must never be a digit or a letter that has special meaning after a backslash (for example, "\t" for tab). */ int set_char_quoting (struct quoting_options *o, char c, int i); /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i); /* In O (or in the default if O is null), set the value of the quoting style to custom_quoting_style, set the left quote to LEFT_QUOTE, and set the right quote to RIGHT_QUOTE. Each of LEFT_QUOTE and RIGHT_QUOTE must be null-terminated and can be the empty string. Because backslashes are used for escaping, it does not make sense for RIGHT_QUOTE to contain a backslash. RIGHT_QUOTE must not begin with a digit or a letter that has special meaning after a backslash (for example, "\t" for tab). */ void set_custom_quoting (struct quoting_options *o, char const *left_quote, char const *right_quote); /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is -1, use the string length of the argument for ARGSIZE. On output, BUFFER might contain embedded null bytes if ARGSIZE was not -1, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_buffer, except return the result in a newly allocated buffer. It is the caller's responsibility to free the result. The result will not contain embedded null bytes. */ char *quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_alloc, except that the length of the result, excluding the terminating null byte, is stored into SIZE if it is non-NULL. The result might contain embedded null bytes if ARGSIZE was not -1, SIZE was not NULL, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ char *quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o); /* Use storage slot N to return a quoted version of the string ARG. Use the default quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. The output of all functions in the quotearg_n family are guaranteed to not contain embedded null bytes.*/ char *quotearg_n (int n, char const *arg); /* Equivalent to quotearg_n (0, ARG). */ char *quotearg (char const *arg); /* Use storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n (N, ARG), except it can quote null bytes. */ char *quotearg_n_mem (int n, char const *arg, size_t argsize); /* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */ char *quotearg_mem (char const *arg, size_t argsize); /* Use style S and storage slot N to return a quoted version of the string ARG. This is like quotearg_n (N, ARG), except that it uses S with no other options to specify the quoting method. */ char *quotearg_n_style (int n, enum quoting_style s, char const *arg); /* Use style S and storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n_style (N, S, ARG), except it can quote null bytes. */ char *quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize); /* Equivalent to quotearg_n_style (0, S, ARG). */ char *quotearg_style (enum quoting_style s, char const *arg); /* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */ char *quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize); /* Like quotearg (ARG), except also quote any instances of CH. See set_char_quoting for a description of acceptable CH values. */ char *quotearg_char (char const *arg, char ch); /* Like quotearg_char (ARG, CH), except it can quote null bytes. */ char *quotearg_char_mem (char const *arg, size_t argsize, char ch); /* Equivalent to quotearg_char (ARG, ':'). */ char *quotearg_colon (char const *arg); /* Like quotearg_colon (ARG), except it can quote null bytes. */ char *quotearg_colon_mem (char const *arg, size_t argsize); /* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See set_custom_quoting for a description of acceptable LEFT_QUOTE and RIGHT_QUOTE values. */ char *quotearg_n_custom (int n, char const *left_quote, char const *right_quote, char const *arg); /* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it can quote null bytes. */ char *quotearg_n_custom_mem (int n, char const *left_quote, char const *right_quote, char const *arg, size_t argsize); /* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG). */ char *quotearg_custom (char const *left_quote, char const *right_quote, char const *arg); /* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG, ARGSIZE). */ char *quotearg_custom_mem (char const *left_quote, char const *right_quote, char const *arg, size_t argsize); /* Free any dynamically allocated memory. */ void quotearg_free (void); #endif /* !QUOTEARG_H_ */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/offtostr.c�������������������������������������������������������������0000664�0000000�0000000�00000000106�12166360012�014155� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define anytostr offtostr #define inttype off_t #include "anytostr.c" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/Makefile.in������������������������������������������������������������0000664�0000000�0000000�00000432064�12166360012�014224� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004-2007, 2009-2012 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file 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 file 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 file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=get-rusage-as-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt announce-gen argv-iter autobuild calloc closeout dirname do-release-commit-and-tag error exclude exitfail extensions fflush fnmatch fnmatch-gnu fopen fpending fprintf-posix freopen getcwd getopt-gnu gettext-h git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update gnumakefile gnupload havelib ignore-value inttostr lstat maintainer-makefile malloc manywarnings mbchar mbuiter mempcpy obstack pathmax perl posix-shell printf-posix progname quote quotearg readme-release realloc regex sprintf-posix stat-macros stdbool strcase strcasestr strnlen1 strsep sys_ioctl update-copyright useless-if-before-free vc-list-files warnings xalloc xalloc-die xgetcwd VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.hin $(srcdir)/gnulib.mk \ $(top_srcdir)/build-aux/depcomp alloca.c @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_1 = uniwidth/width.c subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__libgnu_a_SOURCES_DIST = argv-iter.c argv-iter.h bitrotate.h \ c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \ cloexec.c close-stream.c closeout.c dirname.c basename.c \ dirname-lgpl.c basename-lgpl.c stripslash.c exclude.c \ exitfail.c fd-hook.c filenamecat-lgpl.c freading.c fseterr.c \ gettext.h hash.c imaxtostr.c inttostr.c offtostr.c uinttostr.c \ umaxtostr.c localcharset.h localcharset.c mbchar.c \ mbscasecmp.c mbuiter.h openat-die.c printf-frexp.c \ printf-frexpl.c progname.h progname.c quote.c quotearg.c \ save-cwd.c size_max.h strnlen1.h strnlen1.c dup-safer.c \ fd-safer.c pipe-safer.c uniwidth/width.c xmalloc.c \ xalloc-die.c xgetcwd.c xsize.h xstrndup.h xstrndup.c @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_1 = \ @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@ width.$(OBJEXT) am_libgnu_a_OBJECTS = argv-iter.$(OBJEXT) c-ctype.$(OBJEXT) \ c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \ cloexec.$(OBJEXT) close-stream.$(OBJEXT) closeout.$(OBJEXT) \ dirname.$(OBJEXT) basename.$(OBJEXT) dirname-lgpl.$(OBJEXT) \ basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) exclude.$(OBJEXT) \ exitfail.$(OBJEXT) fd-hook.$(OBJEXT) \ filenamecat-lgpl.$(OBJEXT) freading.$(OBJEXT) \ fseterr.$(OBJEXT) hash.$(OBJEXT) imaxtostr.$(OBJEXT) \ inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \ umaxtostr.$(OBJEXT) localcharset.$(OBJEXT) mbchar.$(OBJEXT) \ mbscasecmp.$(OBJEXT) openat-die.$(OBJEXT) \ printf-frexp.$(OBJEXT) printf-frexpl.$(OBJEXT) \ progname.$(OBJEXT) quote.$(OBJEXT) quotearg.$(OBJEXT) \ save-cwd.$(OBJEXT) strnlen1.$(OBJEXT) dup-safer.$(OBJEXT) \ fd-safer.$(OBJEXT) pipe-safer.$(OBJEXT) $(am__objects_1) \ xmalloc.$(OBJEXT) xalloc-die.$(OBJEXT) xgetcwd.$(OBJEXT) \ xstrndup.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(am__libgnu_a_SOURCES_DIST) $(EXTRA_libgnu_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) configmake.h dirent.h $(ERRNO_H) fcntl.h \ $(FLOAT_H) $(FNMATCH_H) $(GETOPT_H) langinfo.h math.h \ arg-nonnull.h c++defs.h warn-on-use.h $(STDBOOL_H) $(STDDEF_H) \ $(STDINT_H) stdio.h stdlib.h string.h strings.h sys/ioctl.h \ sys/stat.h sys/types.h time.h unistd.h \ $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) wchar.h \ wctype.h CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed #if GNU_MAKE # [nicer features that work only with GNU Make] #else # [fallback features that work in any 'make' implementation; see # http://www.opengroup.org/susv3/utilities/make.html # for the 2004 POSIX specification] #endif EXTRA_DIST = alloca.c alloca.in.h $(top_srcdir)/build-aux/announce-gen \ openat-priv.h openat-proc.c btowc.c c-strcaseeq.h calloc.c \ calloc.c chdir-long.c chdir-long.h cloexec.h close.c \ close-stream.h closedir.c dirent-private.h closeout.h \ dirent.in.h dirfd.c stripslash.c dirname.h \ $(top_srcdir)/build-aux/do-release-commit-and-tag dosname.h \ dup.c dup2.c errno.in.h error.c error.h exclude.h exitfail.h \ fchdir.c fcntl.c fcntl.in.h fd-hook.h fdopendir.c fflush.c \ stdio-impl.h filename.h filenamecat.h float.c float.in.h \ itold.c fnmatch.c fnmatch.in.h fnmatch_loop.c fopen.c \ fpending.c fpending.h fprintf.c fpucw.h fpurge.c stdio-impl.h \ freading.h stdio-impl.h freopen.c frexp.c frexp.c frexpl.c \ fseek.c fseeko.c stdio-impl.h fseterr.h stdio-impl.h fstat.c \ at-func.c fstatat.c openat-priv.h ftell.c ftello.c \ stdio-impl.h $(top_srcdir)/build-aux/gendocs.sh getcwd.c \ getcwd-lgpl.c getdelim.c getdtablesize.c getopt.c getopt.in.h \ getopt1.c getopt_int.h $(top_srcdir)/build-aux/git-version-gen \ $(top_srcdir)/build-aux/gitlog-to-changelog \ $(top_srcdir)/build-aux/gnu-web-doc-update \ $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \ hash.h $(top_srcdir)/build-aux/config.rpath ignore-value.h \ intprops.h anytostr.c inttostr.h float+.h isnan.c \ isnand-nolibm.h isnand.c float+.h isnan.c isnanf-nolibm.h \ isnanf.c float+.h isnan.c isnanl-nolibm.h isnanl.c iswblank.c \ langinfo.in.h config.charset ref-add.sin ref-del.sin lseek.c \ lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c math.in.h \ mbchar.h mbrtowc.c mbsinit.c mbsrtowcs-impl.h \ mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \ memchr.valgrind mempcpy.c memrchr.c msvc-inval.c msvc-inval.h \ msvc-nothrow.c msvc-nothrow.h nl_langinfo.c obstack.c \ obstack.h open.c openat-priv.h openat.c openat.h \ dirent-private.h opendir.c pathmax.h printf-frexp.h \ printf-frexp.c printf-frexpl.h printf.c quote.h quotearg.h \ dirent-private.h readdir.c $(top_srcdir)/README-release \ realloc.c realloc.c regcomp.c regex.c regex.h regex_internal.c \ regex_internal.h regexec.c dirent-private.h rewinddir.c \ save-cwd.h float+.h signbitd.c signbitf.c signbitl.c \ $(top_srcdir)/build-aux/snippet/_Noreturn.h \ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ $(top_srcdir)/build-aux/snippet/warn-on-use.h sprintf.c stat.c \ stat-macros.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ stdlib.in.h strcasecmp.c strncasecmp.c str-two-way.h \ strcasestr.c strdup.c streq.h strerror.c strerror-override.c \ strerror-override.h string.in.h strings.in.h strndup.c \ strnlen.c strsep.c sys_ioctl.in.h sys_stat.in.h sys_types.in.h \ time.in.h unistd.in.h unistd--.h unistd-safer.h unitypes.in.h \ localcharset.h uniwidth.in.h uniwidth/cjk.h \ $(top_srcdir)/build-aux/update-copyright \ $(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \ float+.h printf-args.c printf-args.h printf-parse.c \ printf-parse.h vasnprintf.c vasnprintf.h \ $(top_srcdir)/build-aux/vc-list-files verify.h vfprintf.c \ wchar.in.h wcrtomb.c wctype.in.h wcwidth.c xalloc.h \ xalloc-oversized.h xgetcwd.h MAINTAINERCLEANFILES = MOSTLYCLEANDIRS = sys sys MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \ dirent.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \ float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t langinfo.h \ langinfo.h-t math.h math.h-t arg-nonnull.h arg-nonnull.h-t \ c++defs.h c++defs.h-t warn-on-use.h warn-on-use.h-t stdbool.h \ stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ stdio.h-t stdlib.h stdlib.h-t string.h string.h-t strings.h \ strings.h-t sys/ioctl.h sys/ioctl.h-t sys/stat.h sys/stat.h-t \ sys/types.h sys/types.h-t time.h time.h-t unistd.h unistd.h-t \ unitypes.h unitypes.h-t uniwidth.h uniwidth.h-t wchar.h \ wchar.h-t wctype.h wctype.h-t SUFFIXES = .sed .sin noinst_LIBRARIES = libgnu.a #script: script.in # rm -f $@-t $@ # sed -e 's#@''PREFERABLY_POSIX_SHELL''@#$(PREFERABLY_POSIX_SHELL)#g' \ # -e 's#@''POSIX_SHELL''@#$(POSIX_SHELL)#g' \ # -e $(srcdir)/$@.in >$@-t # chmod a+x $@-t # mv $@-t $@ #EXTRA_DIST += script.in #MOSTLYCLEANFILES += script script-t libgnu_a_SOURCES = argv-iter.c argv-iter.h bitrotate.h c-ctype.h \ c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c cloexec.c \ close-stream.c closeout.c dirname.c basename.c dirname-lgpl.c \ basename-lgpl.c stripslash.c exclude.c exitfail.c fd-hook.c \ filenamecat-lgpl.c freading.c fseterr.c gettext.h hash.c \ imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c \ localcharset.h localcharset.c mbchar.c mbscasecmp.c mbuiter.h \ openat-die.c printf-frexp.c printf-frexpl.c progname.h \ progname.c quote.c quotearg.c save-cwd.c size_max.h strnlen1.h \ strnlen1.c dup-safer.c fd-safer.c pipe-safer.c $(am__append_1) \ xmalloc.c xalloc-die.c xgetcwd.c xsize.h xstrndup.h xstrndup.c libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ $(LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ $(LIBOBJS) EXTRA_libgnu_a_SOURCES = alloca.c openat-proc.c btowc.c calloc.c \ calloc.c chdir-long.c close.c closedir.c dirfd.c stripslash.c \ dup.c dup2.c error.c fchdir.c fcntl.c fdopendir.c fflush.c \ float.c itold.c fnmatch.c fnmatch_loop.c fopen.c fpending.c \ fprintf.c fpurge.c freopen.c frexp.c frexp.c frexpl.c fseek.c \ fseeko.c fstat.c at-func.c fstatat.c ftell.c ftello.c getcwd.c \ getcwd-lgpl.c getdelim.c getdtablesize.c getopt.c getopt1.c \ anytostr.c isnan.c isnand.c isnan.c isnanf.c isnan.c isnanl.c \ iswblank.c lseek.c lstat.c malloc.c malloc.c mbrtowc.c \ mbsinit.c mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c \ mempcpy.c memrchr.c msvc-inval.c msvc-nothrow.c nl_langinfo.c \ obstack.c open.c openat.c opendir.c printf-frexp.c printf.c \ readdir.c realloc.c realloc.c regcomp.c regex.c \ regex_internal.c regexec.c rewinddir.c signbitd.c signbitf.c \ signbitl.c sprintf.c stat.c strcasecmp.c strncasecmp.c \ strcasestr.c strdup.c strerror.c strerror-override.c strndup.c \ strnlen.c strsep.c asnprintf.c printf-args.c printf-parse.c \ vasnprintf.c vfprintf.c wcrtomb.c wcwidth.c charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .sed .sin .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/gnulib.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status lib/config.h $(srcdir)/config.hin: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES) $(AM_V_at)-rm -f libgnu.a $(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) $(AM_V_at)$(RANLIB) libgnu.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argv-iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exclude.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseterr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbscasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewinddir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/width.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` width.o: uniwidth/width.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT width.o -MD -MP -MF $(DEPDIR)/width.Tpo -c -o width.o `test -f 'uniwidth/width.c' || echo '$(srcdir)/'`uniwidth/width.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/width.Tpo $(DEPDIR)/width.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uniwidth/width.c' object='width.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o width.o `test -f 'uniwidth/width.c' || echo '$(srcdir)/'`uniwidth/width.c width.obj: uniwidth/width.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT width.obj -MD -MP -MF $(DEPDIR)/width.Tpo -c -o width.obj `if test -f 'uniwidth/width.c'; then $(CYGPATH_W) 'uniwidth/width.c'; else $(CYGPATH_W) '$(srcdir)/uniwidth/width.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/width.Tpo $(DEPDIR)/width.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uniwidth/width.c' object='width.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o width.obj `if test -f 'uniwidth/width.c'; then $(CYGPATH_W) 'uniwidth/width.c'; else $(CYGPATH_W) '$(srcdir)/uniwidth/width.c'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) config.h all-local installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-local distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-exec-local install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist ctags distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-local distclean-tags distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-exec-local install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ uninstall uninstall-am uninstall-local # We need the following in order to create <alloca.h> when the system # doesn't have one that works with the given compiler. @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \ @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \ @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t mv -f $@-t $@ # We need the following in order to create <dirent.h> when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/dirent.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <errno.h> when the system # doesn't have one that is POSIX compliant. @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \ @GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \ @GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ @GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ # We need the following in order to create <fcntl.h> when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <float.h> when the system # doesn't have one that works with the given compiler. @GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_FLOAT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_FLOAT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ < $(srcdir)/float.in.h; \ @GL_GENERATE_FLOAT_H_TRUE@ } > $@-t && \ @GL_GENERATE_FLOAT_H_TRUE@ mv $@-t $@ @GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ # We need the following in order to create <fnmatch.h> when the system # doesn't have one that supports the required API. @GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) @GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \ @GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \ @GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status @GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@ # We need the following in order to create <getopt.h> when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ distclean-local: clean-GNUmakefile clean-GNUmakefile: test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || : # We need the following in order to create an empty placeholder for # <langinfo.h> when the system doesn't have one. langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ # We need the following in order to create <math.h> when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ < $(srcdir)/math.in.h | \ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create <stdbool.h> when the system # doesn't have one that works. @GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ @GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ # We need the following in order to create <stddef.h> when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ @GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ # We need the following in order to create <stdint.h> when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status @GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ @GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status @GL_GENERATE_STDINT_H_FALSE@ rm -f $@ # We need the following in order to create <stdio.h> when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <stdlib.h> when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <string.h> when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <strings.h> when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <sys/ioctl.h> when the system # does not have a complete one. sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_ioctl.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <sys/stat.h> when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <sys/types.h> when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <time.h> when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ unitypes.h: unitypes.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unitypes.in.h; \ } > $@-t && \ mv -f $@-t $@ uniwidth.h: uniwidth.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uniwidth.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create <wchar.h> when the system # version does not work standalone. wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <wctype.h> when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/basename.c�������������������������������������������������������������0000664�0000000�0000000�00000003345�12166360012�014072� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998-2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <string.h> #include "xalloc.h" #include "xstrndup.h" char * base_name (char const *name) { char const *base = last_component (name); size_t length; /* If there is no last component, then name is a file system root or the empty string. */ if (! *base) return xstrndup (name, base_len (name)); /* Collapse a sequence of trailing slashes into one. */ length = base_len (base); if (ISSLASH (base[length])) length++; /* On systems with drive letters, "a/b:c" must return "./b:c" rather than "b:c" to avoid confusion with a drive letter. On systems with pure POSIX semantics, this is not an issue. */ if (FILE_SYSTEM_PREFIX_LEN (base)) { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } /* Finally, copy the basename. */ return xstrndup (base, length); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/frexpl.c���������������������������������������������������������������0000664�0000000�0000000�00000001756�12166360012�013623� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a 'long double' into fraction and mantissa. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Specification. */ # include <math.h> long double frexpl (long double x, int *expptr) { return frexp (x, expptr); } #else # define USE_LONG_DOUBLE # include "frexp.c" #endif ������������������id-utils-4.6+git20120811/lib/calloc.c���������������������������������������������������������������0000664�0000000�0000000�00000003633�12166360012�013554� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* calloc() function that is glibc compatible. This wrapper function is required at least on Tru64 UNIX 5.1 and mingw. Copyright (C) 2004-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering and Bruno Haible */ #include <config.h> /* Only the AC_FUNC_CALLOC macro defines 'calloc' already in config.h. */ #ifdef calloc # define NEED_CALLOC_GNU 1 # undef calloc /* Whereas the gnulib module 'calloc-gnu' defines HAVE_CALLOC_GNU. */ #elif GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU # define NEED_CALLOC_GNU 1 #endif /* Specification. */ #include <stdlib.h> #include <errno.h> /* Call the system's calloc below. */ #undef calloc /* Allocate and zero-fill an NxS-byte block of memory from the heap. If N or S is zero, allocate and zero-fill a 1-byte block. */ void * rpl_calloc (size_t n, size_t s) { void *result; #if NEED_CALLOC_GNU if (n == 0 || s == 0) { n = 1; s = 1; } else { /* Defend against buggy calloc implementations that mishandle size_t overflow. */ size_t bytes = n * s; if (bytes / s != n) { errno = ENOMEM; return NULL; } } #endif result = calloc (n, s); #if !HAVE_CALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } �����������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/pipe-safer.c�����������������������������������������������������������0000664�0000000�0000000�00000002656�12166360012�014356� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Invoke pipe, but avoid some glitches. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "unistd-safer.h" #include <unistd.h> #include <errno.h> /* Like pipe, but ensure that neither of the file descriptors is STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on platforms that lack pipe. */ int pipe_safer (int fd[2]) { #if HAVE_PIPE if (pipe (fd) == 0) { int i; for (i = 0; i < 2; i++) { fd[i] = fd_safer (fd[i]); if (fd[i] < 0) { int e = errno; close (fd[1 - i]); errno = e; return -1; } } return 0; } #else errno = ENOSYS; #endif return -1; } ����������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/streq.h����������������������������������������������������������������0000664�0000000�0000000�00000007616�12166360012�013467� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Optimized string comparison. Copyright (C) 2001-2002, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>. */ #ifndef _GL_STREQ_H #define _GL_STREQ_H #include <string.h> /* STREQ allows to optimize string comparison with a small literal string. STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) is semantically equivalent to strcmp (s, "EUC-KR") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) static inline int streq9 (const char *s1, const char *s2) { return strcmp (s1 + 9, s2 + 9) == 0; } static inline int streq8 (const char *s1, const char *s2, char s28) { if (s1[8] == s28) { if (s28 == 0) return 1; else return streq9 (s1, s2); } else return 0; } static inline int streq7 (const char *s1, const char *s2, char s27, char s28) { if (s1[7] == s27) { if (s27 == 0) return 1; else return streq8 (s1, s2, s28); } else return 0; } static inline int streq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (s1[6] == s26) { if (s26 == 0) return 1; else return streq7 (s1, s2, s27, s28); } else return 0; } static inline int streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (s1[5] == s25) { if (s25 == 0) return 1; else return streq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (s1[4] == s24) { if (s24 == 0) return 1; else return streq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[3] == s23) { if (s23 == 0) return 1; else return streq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[2] == s22) { if (s22 == 0) return 1; else return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[1] == s21) { if (s21 == 0) return 1; else return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[0] == s20) { if (s20 == 0) return 1; else return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif #endif /* _GL_STREQ_H */ ������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/filenamecat.h����������������������������������������������������������0000664�0000000�0000000�00000002044�12166360012�014567� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Concatenate two arbitrary file names. Copyright (C) 1996-1997, 2003, 2005, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #if GNULIB_FILENAMECAT char *file_name_concat (char const *dir, char const *base, char **base_in_result); #endif char *mfile_name_concat (char const *dir, char const *base, char **base_in_result); ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-strncasecmp.c��������������������������������������������������������0000664�0000000�0000000�00000003217�12166360012�015057� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include "c-strcase.h" #include <limits.h> #include "c-ctype.h" int c_strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-strcaseeq.h����������������������������������������������������������0000664�0000000�0000000�00000010774�12166360012�014542� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Optimized case-insensitive string comparison in C locale. Copyright (C) 2001-2002, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>. */ #include "c-strcase.h" #include "c-ctype.h" /* STRCASEEQ allows to optimize string comparison with a small literal string. STRCASEEQ (s, "UTF-8", 'U','T','F','-','8',0,0,0,0) is semantically equivalent to c_strcasecmp (s, "UTF-8") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) /* Case insensitive comparison of ASCII characters. */ # if C_CTYPE_ASCII # define CASEEQ(other,upper) \ (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper)) # elif C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE # define CASEEQ(other,upper) \ (c_isupper (upper) ? (other) == (upper) || (other) == (upper) - 'A' + 'a' : (other) == (upper)) # else # define CASEEQ(other,upper) \ (c_toupper (other) == (upper)) # endif static inline int strcaseeq9 (const char *s1, const char *s2) { return c_strcasecmp (s1 + 9, s2 + 9) == 0; } static inline int strcaseeq8 (const char *s1, const char *s2, char s28) { if (CASEEQ (s1[8], s28)) { if (s28 == 0) return 1; else return strcaseeq9 (s1, s2); } else return 0; } static inline int strcaseeq7 (const char *s1, const char *s2, char s27, char s28) { if (CASEEQ (s1[7], s27)) { if (s27 == 0) return 1; else return strcaseeq8 (s1, s2, s28); } else return 0; } static inline int strcaseeq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (CASEEQ (s1[6], s26)) { if (s26 == 0) return 1; else return strcaseeq7 (s1, s2, s27, s28); } else return 0; } static inline int strcaseeq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[5], s25)) { if (s25 == 0) return 1; else return strcaseeq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int strcaseeq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[4], s24)) { if (s24 == 0) return 1; else return strcaseeq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int strcaseeq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[3], s23)) { if (s23 == 0) return 1; else return strcaseeq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int strcaseeq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[2], s22)) { if (s22 == 0) return 1; else return strcaseeq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int strcaseeq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[1], s21)) { if (s21 == 0) return 1; else return strcaseeq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int strcaseeq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (CASEEQ (s1[0], s20)) { if (s20 == 0) return 1; else return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (c_strcasecmp (s1, s2) == 0) #endif ����id-utils-4.6+git20120811/lib/printf-frexp.c���������������������������������������������������������0000664�0000000�0000000�00000012316�12166360012�014741� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #if ! defined USE_LONG_DOUBLE # include <config.h> #endif /* Specification. */ #ifdef USE_LONG_DOUBLE # include "printf-frexpl.h" #else # include "printf-frexp.h" #endif #include <float.h> #include <math.h> #ifdef USE_LONG_DOUBLE # include "fpucw.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 2.0, not < 2.0. */ #ifdef USE_LONG_DOUBLE # define FUNC printf_frexpl # define DOUBLE long double # define MIN_EXP LDBL_MIN_EXP # if HAVE_FREXPL_IN_LIBC && HAVE_LDEXPL_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexpl # define LDEXP ldexpl # endif # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC printf_frexp # define DOUBLE double # define MIN_EXP DBL_MIN_EXP # if HAVE_FREXP_IN_LIBC && HAVE_LDEXP_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexp # define LDEXP ldexp # endif # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int exponent; DECL_ROUNDING BEGIN_ROUNDING (); #ifdef USE_FREXP_LDEXP /* frexp and ldexp are usually faster than the loop below. */ x = FREXP (x, &exponent); x = x + x; exponent -= 1; if (exponent < MIN_EXP - 1) { x = LDEXP (x, exponent - (MIN_EXP - 1)); exponent = MIN_EXP - 1; } #else { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A nonnegative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here 1.0 <= x < 2^2^i. */ } else { /* A negative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0, exponent >= MIN_EXP - 1. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (exponent - (1 << i) < MIN_EXP - 1) break; exponent -= (1 << i); x *= pow2_i; if (x >= L_(1.0)) break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here either x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ if (x < L_(1.0)) /* Invariants: x * 2^exponent = argument, x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent. */ while (i > 0) { i--; if (exponent - (1 << i) >= MIN_EXP - 1) { exponent -= (1 << i); x *= pow2[i]; if (x >= L_(1.0)) break; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ } /* Invariants: x * 2^exponent = argument, and either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ while (i > 0) { i--; if (x >= pow2[i]) { exponent += (1 << i); x *= powh[i]; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2.0 and exponent >= MIN_EXP - 1. */ } #endif END_ROUNDING (); *expptr = exponent; return x; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dirent.in.h������������������������������������������������������������0000664�0000000�0000000�00000020170�12166360012�014211� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <dirent.h>. 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 <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_DIRENT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_DIRENT_H@ # @INCLUDE_NEXT@ @NEXT_DIRENT_H@ #endif #ifndef _@GUARD_PREFIX@_DIRENT_H #define _@GUARD_PREFIX@_DIRENT_H /* Get ino_t. Needed on some systems, including glibc 2.8. */ #include <sys/types.h> #if !@HAVE_DIRENT_H@ /* Define types DIR and 'struct dirent'. */ # if !GNULIB_defined_struct_dirent struct dirent { char d_type; char d_name[1]; }; /* Possible values for 'd_type'. */ # define DT_UNKNOWN 0 # define DT_FIFO 1 /* FIFO */ # define DT_CHR 2 /* character device */ # define DT_DIR 4 /* directory */ # define DT_BLK 6 /* block device */ # define DT_REG 8 /* regular file */ # define DT_LNK 10 /* symbolic link */ # define DT_SOCK 12 /* socket */ # define DT_WHT 14 /* whiteout */ typedef struct gl_directory DIR; # define GNULIB_defined_struct_dirent 1 # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_OPENDIR@ # if @REPLACE_OPENDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef opendir # define opendir rpl_opendir # endif _GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); # else # if !@HAVE_OPENDIR@ _GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); # endif _GL_CXXALIASWARN (opendir); #elif defined GNULIB_POSIXCHECK # undef opendir # if HAVE_RAW_DECL_OPENDIR _GL_WARN_ON_USE (opendir, "opendir is not portable - " "use gnulib module opendir for portability"); # endif #endif #if @GNULIB_READDIR@ # if !@HAVE_READDIR@ _GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp)); _GL_CXXALIASWARN (readdir); #elif defined GNULIB_POSIXCHECK # undef readdir # if HAVE_RAW_DECL_READDIR _GL_WARN_ON_USE (readdir, "readdir is not portable - " "use gnulib module readdir for portability"); # endif #endif #if @GNULIB_REWINDDIR@ # if !@HAVE_REWINDDIR@ _GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); _GL_CXXALIASWARN (rewinddir); #elif defined GNULIB_POSIXCHECK # undef rewinddir # if HAVE_RAW_DECL_REWINDDIR _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " "use gnulib module rewinddir for portability"); # endif #endif #if @GNULIB_CLOSEDIR@ # if @REPLACE_CLOSEDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef closedir # define closedir rpl_closedir # endif _GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); # else # if !@HAVE_CLOSEDIR@ _GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); # endif _GL_CXXALIASWARN (closedir); #elif defined GNULIB_POSIXCHECK # undef closedir # if HAVE_RAW_DECL_CLOSEDIR _GL_WARN_ON_USE (closedir, "closedir is not portable - " "use gnulib module closedir for portability"); # endif #endif #if @GNULIB_DIRFD@ /* Return the file descriptor associated with the given directory stream, or -1 if none exists. */ # if @REPLACE_DIRFD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef dirfd # define dirfd rpl_dirfd # endif _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (dirfd, int, (DIR *)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd /* dirfd is defined as a macro and not as a function. Turn it into a function and get rid of the macro. */ static inline int (dirfd) (DIR *dp) { return dirfd (dp); } # undef dirfd # endif # if !(@HAVE_DECL_DIRFD@ || defined dirfd) _GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (dirfd, int, (DIR *)); # endif _GL_CXXALIASWARN (dirfd); #elif defined GNULIB_POSIXCHECK # undef dirfd # if HAVE_RAW_DECL_DIRFD _GL_WARN_ON_USE (dirfd, "dirfd is unportable - " "use gnulib module dirfd for portability"); # endif #endif #if @GNULIB_FDOPENDIR@ /* Open a directory stream visiting the given directory file descriptor. Return NULL and set errno if fd is not visiting a directory. On success, this function consumes fd (it will be implicitly closed either by this function or by a subsequent closedir). */ # if @REPLACE_FDOPENDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopendir # define fdopendir rpl_fdopendir # endif _GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); _GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); # else # if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ _GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); # endif _GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); # endif _GL_CXXALIASWARN (fdopendir); #elif defined GNULIB_POSIXCHECK # undef fdopendir # if HAVE_RAW_DECL_FDOPENDIR _GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " "use gnulib module fdopendir for portability"); # endif #endif #if @GNULIB_SCANDIR@ /* Scan the directory DIR, calling FILTER on each directory entry. Entries for which FILTER returns nonzero are individually malloc'd, sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. */ # if !@HAVE_SCANDIR@ _GL_FUNCDECL_SYS (scandir, int, (const char *dir, struct dirent ***namelist, int (*filter) (const struct dirent *), int (*cmp) (const struct dirent **, const struct dirent **)) _GL_ARG_NONNULL ((1, 2, 4))); # endif /* Need to cast, because on glibc systems, the fourth parameter is int (*cmp) (const void *, const void *). */ _GL_CXXALIAS_SYS_CAST (scandir, int, (const char *dir, struct dirent ***namelist, int (*filter) (const struct dirent *), int (*cmp) (const struct dirent **, const struct dirent **))); _GL_CXXALIASWARN (scandir); #elif defined GNULIB_POSIXCHECK # undef scandir # if HAVE_RAW_DECL_SCANDIR _GL_WARN_ON_USE (scandir, "scandir is unportable - " "use gnulib module scandir for portability"); # endif #endif #if @GNULIB_ALPHASORT@ /* Compare two 'struct dirent' entries alphabetically. */ # if !@HAVE_ALPHASORT@ _GL_FUNCDECL_SYS (alphasort, int, (const struct dirent **, const struct dirent **) _GL_ARG_NONNULL ((1, 2))); # endif /* Need to cast, because on glibc systems, the parameters are (const void *, const void *). */ _GL_CXXALIAS_SYS_CAST (alphasort, int, (const struct dirent **, const struct dirent **)); _GL_CXXALIASWARN (alphasort); #elif defined GNULIB_POSIXCHECK # undef alphasort # if HAVE_RAW_DECL_ALPHASORT _GL_WARN_ON_USE (alphasort, "alphasort is unportable - " "use gnulib module alphasort for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_DIRENT_H */ #endif /* _@GUARD_PREFIX@_DIRENT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/sys_stat.in.h����������������������������������������������������������0000664�0000000�0000000�00000044375�12166360012�014612� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Provide a more complete sys/stat header file. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where <sys/stat.h> is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_SYS_STAT_H /* Get nlink_t. */ #include <sys/types.h> /* Get struct timespec. */ #include <time.h> /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _@GUARD_PREFIX@_SYS_STAT_H #define _@GUARD_PREFIX@_SYS_STAT_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in <io.h> and/or <direct.h>, not in <unistd.h>. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include <io.h> /* mingw32, mingw64 */ # include <direct.h> /* mingw64, MSVC 9 */ #endif /* Native Windows platforms declare umask() in <io.h>. */ #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include <io.h> #endif #ifndef S_IFIFO # ifdef _S_IFIFO # define S_IFIFO _S_IFIFO # endif #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif /* Macros for futimens and utimensat. */ #ifndef UTIME_NOW # define UTIME_NOW (-1) # define UTIME_OMIT (-2) #endif #if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ _GL_FUNCDECL_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag)); _GL_CXXALIASWARN (fchmodat); #elif defined GNULIB_POSIXCHECK # undef fchmodat # if HAVE_RAW_DECL_FCHMODAT _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSTAT@ # if @REPLACE_FSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstat # define fstat rpl_fstat # endif _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif _GL_CXXALIASWARN (fstat); #elif defined GNULIB_POSIXCHECK # undef fstat # if HAVE_RAW_DECL_FSTAT _GL_WARN_ON_USE (fstat, "fstat has portability problems - " "use gnulib module fstat for portability"); # endif #endif #if @GNULIB_FSTATAT@ # if @REPLACE_FSTATAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstatat # define fstatat rpl_fstatat # endif _GL_FUNCDECL_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # else # if !@HAVE_FSTATAT@ _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # endif _GL_CXXALIASWARN (fstatat); #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FUTIMENS@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens implementation relies on futimesat, which on Solaris 10 makes an invocation to futimens that is meant to invoke the libc's futimens(), not gnulib's futimens(). */ # if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef futimens # define futimens rpl_futimens # endif _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); # else # if !@HAVE_FUTIMENS@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif # if @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS _GL_WARN_ON_USE (futimens, "futimens is not portable - " "use gnulib module futimens for portability"); # endif #endif #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lchmod chmod # endif /* Need to cast, because on mingw, the second parameter of chmod is int mode. */ _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, (const char *filename, mode_t mode)); # else # if 0 /* assume already declared */ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); # endif # if @HAVE_LCHMOD@ _GL_CXXALIASWARN (lchmod); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " "use gnulib module lchmod for portability"); # endif #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); # elif @REPLACE_LSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lstat # define lstat rpl_lstat # endif _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); # else _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # endif # if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); # endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT _GL_WARN_ON_USE (lstat, "lstat is unportable - " "use gnulib module lstat for portability"); # endif #endif #if @REPLACE_MKDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkdir # define mkdir rpl_mkdir # endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, which are included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define GNULIB_defined_rpl_mkdir 1 # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif #endif _GL_CXXALIASWARN (mkdir); #if @GNULIB_MKDIRAT@ # if !@HAVE_MKDIRAT@ _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkdirat); #elif defined GNULIB_POSIXCHECK # undef mkdirat # if HAVE_RAW_DECL_MKDIRAT _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_MKFIFO@ # if @REPLACE_MKFIFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkfifo # define mkfifo rpl_mkfifo # endif _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); # else # if !@HAVE_MKFIFO@ _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); # endif _GL_CXXALIASWARN (mkfifo); #elif defined GNULIB_POSIXCHECK # undef mkfifo # if HAVE_RAW_DECL_MKFIFO _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " "use gnulib module mkfifo for portability"); # endif #endif #if @GNULIB_MKFIFOAT@ # if !@HAVE_MKFIFOAT@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkfifoat); #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_MKNOD@ # if @REPLACE_MKNOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mknod # define mknod rpl_mknod # endif _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); # else # if !@HAVE_MKNOD@ _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); # endif _GL_CXXALIASWARN (mknod); #elif defined GNULIB_POSIXCHECK # undef mknod # if HAVE_RAW_DECL_MKNOD _GL_WARN_ON_USE (mknod, "mknod is not portable - " "use gnulib module mknod for portability"); # endif #endif #if @GNULIB_MKNODAT@ # if !@HAVE_MKNODAT@ _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); _GL_CXXALIASWARN (mknodat); #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_STAT@ # if @REPLACE_STAT@ /* We can't use the object-like #define stat rpl_stat, because of struct stat. This means that rpl_stat will not be used if the user does (stat)(a,b). Oh well. */ # undef stat # ifdef _LARGE_FILES /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, so we have to replace stat64() instead of stat(). */ # define stat stat64 # undef stat64 # define stat64(name, st) rpl_stat (name, st) # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT _GL_WARN_ON_USE (stat, "stat is unportable - " "use gnulib module stat for portability"); # endif #endif #if @GNULIB_UTIMENSAT@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation to utimensat that is meant to invoke the libc's utimensat(), not gnulib's utimensat(). */ # if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef utimensat # define utimensat rpl_utimensat # endif _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # else # if !@HAVE_UTIMENSAT@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif # if @HAVE_UTIMENSAT@ _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " "use gnulib module utimensat for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dup2.c�����������������������������������������������������������������0000664�0000000�0000000�00000007032�12166360012�013166� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Duplicate an open file descriptor to a specified file descriptor. Copyright (C) 1999, 2004-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* written by Paul Eggert */ #include <config.h> /* Specification. */ #include <unistd.h> #include <errno.h> #include <fcntl.h> #if HAVE_DUP2 # undef dup2 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> # include "msvc-inval.h" /* Get _get_osfhandle. */ # include "msvc-nothrow.h" static int ms_windows_dup2 (int fd, int desired_fd) { int result; /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, dup2 (fd, fd) returns 0, but all further attempts to use fd in future dup2 calls will hang. */ if (fd == desired_fd) { if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } return fd; } /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: http://bugs.winehq.org/show_bug.cgi?id=21289 */ if (desired_fd < 0) { errno = EBADF; return -1; } TRY_MSVC_INVAL { result = dup2 (fd, desired_fd); } CATCH_MSVC_INVAL { errno = EBADF; result = -1; } DONE_MSVC_INVAL; if (result == 0) result = desired_fd; return result; } # define dup2 ms_windows_dup2 # endif int rpl_dup2 (int fd, int desired_fd) { int result; # ifdef F_GETFL /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. On Cygwin 1.5.x, dup2 (1, 1) returns 0. On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ if (fd == desired_fd) return fcntl (fd, F_GETFL) == -1 ? -1 : fd; # endif result = dup2 (fd, desired_fd); /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ if (result == -1 && errno == EMFILE) errno = EBADF; # if REPLACE_FCHDIR if (fd != desired_fd && result != -1) result = _gl_register_dup (fd, result); # endif return result; } #else /* !HAVE_DUP2 */ /* On older platforms, dup2 did not exist. */ # ifndef F_DUPFD static int dupfd (int fd, int desired_fd) { int duplicated_fd = dup (fd); if (duplicated_fd < 0 || duplicated_fd == desired_fd) return duplicated_fd; else { int r = dupfd (fd, desired_fd); int e = errno; close (duplicated_fd); errno = e; return r; } } # endif int dup2 (int fd, int desired_fd) { int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; if (result == -1 || fd == desired_fd) return result; close (desired_fd); # ifdef F_DUPFD result = fcntl (fd, F_DUPFD, desired_fd); # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif # else result = dupfd (fd, desired_fd); # endif if (result == -1 && (errno == EMFILE || errno == EINVAL)) errno = EBADF; return result; } #endif /* !HAVE_DUP2 */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/quote.h����������������������������������������������������������������0000664�0000000�0000000�00000001516�12166360012�013457� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* quote.h - prototypes for quote.c Copyright (C) 1998-2001, 2003, 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 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 <http://www.gnu.org/licenses/>. */ char const *quote_n (int n, char const *name); char const *quote (char const *name); ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbsrtowcs-state.c������������������������������������������������������0000664�0000000�0000000�00000003123�12166360012�015452� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert string to wide string. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <wchar.h> /* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */ mbstate_t _gl_mbsrtowcs_state /* The state must initially be in the "initial state"; so, zero-initialize it. On most systems, putting it into BSS is sufficient. Not so on MacOS X 10.3, see <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>. When it needs an initializer, use 0 or {0} as initializer? 0 only works when mbstate_t is a scalar type (such as when gnulib defines it, or on AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)). */ #if defined __ELF__ /* On ELF systems, variables in BSS behave well. */ #else /* Use braces, to be on the safe side. */ = { 0 } #endif ; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/isnanf-nolibm.h��������������������������������������������������������0000664�0000000�0000000�00000002265�12166360012�015060� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #if HAVE_ISNANF_IN_LIBC /* Get declaration of isnan macro or (older) isnanf function. */ # include <math.h> # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf extern int isnanf (float x); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/unistd.in.h������������������������������������������������������������0000664�0000000�0000000�00000145431�12166360012�014242� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Substitute for and wrapper around <unistd.h>. Copyright (C) 2003-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Special invocation convention: - On mingw, several headers, including <winsock2.h>, include <unistd.h>, but we need to ensure that both the system <unistd.h> and <winsock2.h> are completely included before we replace gethostname. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H /* <unistd.h> is being indirectly included for the first time from <winsock2.h>; avoid declaring any overrides. */ # if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # else # error unexpected; report this to bug-gnulib@gnu.org # endif # define _GL_WINSOCK2_H_WITNESS /* Normal invocation. */ #elif !defined _@GUARD_PREFIX@_UNISTD_H /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif /* Get all possible declarations of gethostname(). */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include <winsock2.h> # undef _GL_INCLUDING_WINSOCK2_H #endif #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _@GUARD_PREFIX@_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include <stddef.h> /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include <stdio.h> #endif /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ && ! defined __GLIBC__ # include <fcntl.h> #endif /* mingw fails to declare _exit in <unistd.h>. */ /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include <stdlib.h> #endif /* Native Windows platforms declare chdir, getcwd, rmdir in <io.h> and/or <direct.h>, not in <unistd.h>. They also declare access(), chmod(), close(), dup(), dup2(), isatty(), lseek(), read(), unlink(), write() in <io.h>. */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include <io.h> /* mingw32, mingw64 */ # include <direct.h> /* mingw64, MSVC 9 */ #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include <io.h> #endif /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ && !defined __GLIBC__ # include <netdb.h> #endif /* MSVC defines off_t in <sys/types.h>. */ #if !@HAVE_UNISTD_H@ /* Get off_t. */ # include <sys/types.h> #endif #if (@GNULIB_READ@ || @GNULIB_WRITE@ \ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include <sys/types.h> #endif /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include <getopt.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Hide some function declarations from <winsock2.h>. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including <sys/socket.h>"); _GL_WARN_ON_USE (connect, "connect() used without including <sys/socket.h>"); _GL_WARN_ON_USE (accept, "accept() used without including <sys/socket.h>"); _GL_WARN_ON_USE (bind, "bind() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getpeername, "getpeername() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getsockname, "getsockname() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including <sys/socket.h>"); _GL_WARN_ON_USE (listen, "listen() used without including <sys/socket.h>"); _GL_WARN_ON_USE (recv, "recv() used without including <sys/socket.h>"); _GL_WARN_ON_USE (send, "send() used without including <sys/socket.h>"); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including <sys/socket.h>"); _GL_WARN_ON_USE (sendto, "sendto() used without including <sys/socket.h>"); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including <sys/socket.h>"); _GL_WARN_ON_USE (shutdown, "shutdown() used without including <sys/socket.h>"); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including <sys/select.h>"); # endif # endif #endif /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #if defined GNULIB_POSIXCHECK /* The access() function is a security risk. */ _GL_WARN_ON_USE (access, "the access function is a security risk - " "use the gnulib module faccessat instead"); #endif #if @GNULIB_CHDIR@ _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir # if HAVE_RAW_DECL_CHDIR _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " "use gnulib module chdir for portability"); # endif #endif #if @GNULIB_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */ # if @REPLACE_CHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef chown # define chown rpl_chown # endif _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); # else # if !@HAVE_CHOWN@ _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); # endif _GL_CXXALIASWARN (chown); #elif defined GNULIB_POSIXCHECK # undef chown # if HAVE_RAW_DECL_CHOWN _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " "doesn't treat a uid or gid of -1 on some systems - " "use gnulib module chown for portability"); # endif #endif #if @GNULIB_CLOSE@ # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close rpl_close # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif _GL_CXXALIASWARN (close); #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); #endif #if @GNULIB_DUP@ # if @REPLACE_DUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif _GL_CXXALIASWARN (dup); #elif defined GNULIB_POSIXCHECK # undef dup # if HAVE_RAW_DECL_DUP _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif #endif #if @GNULIB_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); # else # if !@HAVE_DUP2@ _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIASWARN (dup2); #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif _GL_CXXALIASWARN (dup3); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include <crt_externs.h> # define environ (*_NSGetEnviron ()) # else # ifdef __cplusplus extern "C" { # endif extern char **environ; # ifdef __cplusplus } # endif # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON static inline char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ # if !@HAVE_EUIDACCESS@ _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); _GL_CXXALIASWARN (euidaccess); # if defined GNULIB_POSIXCHECK /* Like access(), this function is a security risk. */ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " "use the gnulib module faccessat instead"); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); # else # if !@HAVE_DECL_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); # endif # endif _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fchownat # define fchownat rpl_fchownat # endif _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # else # if !@HAVE_FCHOWNAT@ _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # endif _GL_CXXALIASWARN (fchownat); #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FDATASYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */ # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); _GL_CXXALIASWARN (fdatasync); #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " "use gnulib module fdatasync for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fsync, int, (int fd)); _GL_CXXALIASWARN (fsync); #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */ # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>. Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # if @REPLACE_GETCWD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @REPLACE_GETDOMAINNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdomainname # define getdomainname rpl_getdomainname # endif _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); # else # if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ # if @REPLACE_GETGROUPS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getgroups # define getgroups rpl_getgroups # endif _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); # else # if !@HAVE_GETGROUPS@ _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIASWARN (getgroups); #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname rpl_gethostname # endif _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); # else # if !@HAVE_GETHOSTNAME@ _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See <http://www.opengroup.org/susv3xsh/getlogin.html>. Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); _GL_CXXALIASWARN (getlogin); #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See <http://www.opengroup.org/susv3xsh/getlogin.html>. Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if @REPLACE_GETLOGIN_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getlogin_r rpl_getlogin_r # endif _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); # else # if !@HAVE_DECL_GETLOGIN_R@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 systems, the second argument is int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif _GL_CXXALIASWARN (getlogin_r); #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize # endif _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ # if !defined _gl_getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define _gl_getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined _gl_getpagesize && defined __VMS # ifdef __ALPHA # define _gl_getpagesize() 8192 # else # define _gl_getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined _gl_getpagesize && @HAVE_OS_H@ # include <OS.h> # if defined B_PAGE_SIZE # define _gl_getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined _gl_getpagesize && defined __amigaos4__ # define _gl_getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ # include <sys/param.h> # ifdef EXEC_PAGESIZE # define _gl_getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define _gl_getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define _gl_getpagesize() NBPC # endif # endif # endif # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function static inline int getpagesize () { return _gl_getpagesize (); } # define GNULIB_defined_getpagesize_function 1 # endif # endif # endif # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif # if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (getusershell, char *, (void)); # endif _GL_CXXALIAS_SYS (getusershell, char *, (void)); _GL_CXXALIASWARN (getusershell); #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Rewind to pointer that is advanced at each getusershell() call. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (setusershell, void, (void)); # endif _GL_CXXALIAS_SYS (setusershell, void, (void)); _GL_CXXALIASWARN (setusershell); #elif defined GNULIB_POSIXCHECK # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Free the pointer that is advanced at each getusershell() call and associated resources. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (endusershell, void, (void)); # endif _GL_CXXALIAS_SYS (endusershell, void, (void)); _GL_CXXALIASWARN (endusershell); #elif defined GNULIB_POSIXCHECK # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GROUP_MEMBER@ /* Determine whether group id is in calling user's group list. */ # if !@HAVE_GROUP_MEMBER@ _GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); # endif _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); _GL_CXXALIASWARN (group_member); #elif defined GNULIB_POSIXCHECK # undef group_member # if HAVE_RAW_DECL_GROUP_MEMBER _GL_WARN_ON_USE (group_member, "group_member is unportable - " "use gnulib module group-member for portability"); # endif #endif #if @GNULIB_ISATTY@ # if @REPLACE_ISATTY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef isatty # define isatty rpl_isatty # endif _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif _GL_CXXALIASWARN (isatty); #elif defined GNULIB_POSIXCHECK # undef isatty # if HAVE_RAW_DECL_ISATTY _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif #endif #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown # define lchown rpl_lchown # endif _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); # else # if !@HAVE_LCHOWN@ _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); # endif _GL_CXXALIASWARN (lchown); #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link # endif _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); # else # if !@HAVE_LINK@ _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); # endif _GL_CXXALIASWARN (link); #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if @REPLACE_LINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef linkat # define linkat rpl_linkat # endif _GL_FUNCDECL_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # else # if !@HAVE_LINKAT@ _GL_FUNCDECL_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif _GL_CXXALIASWARN (linkat); #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif _GL_CXXALIASWARN (lseek); #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE@ /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ # if !@HAVE_PIPE@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); _GL_CXXALIASWARN (pipe); #elif defined GNULIB_POSIXCHECK # undef pipe # if HAVE_RAW_DECL_PIPE _GL_WARN_ON_USE (pipe, "pipe is unportable - " "use gnulib module pipe-posix for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); # else _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif _GL_CXXALIASWARN (pipe2); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pread # define pread rpl_pread # endif _GL_FUNCDECL_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PREAD@ _GL_FUNCDECL_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pread); #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_PWRITE@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pwrite # define pwrite rpl_pwrite # endif _GL_FUNCDECL_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PWRITE@ _GL_FUNCDECL_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pwrite); #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " "use gnulib module pwrite for portability"); # endif #endif #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */ # if @REPLACE_READ@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read # define read rpl_read # endif _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink # endif _GL_FUNCDECL_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # else # if !@HAVE_READLINK@ _GL_FUNCDECL_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # endif _GL_CXXALIASWARN (readlink); #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module readlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ /* Remove the directory DIR. */ # if @REPLACE_RMDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define rmdir rpl_rmdir # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif _GL_CXXALIASWARN (rmdir); #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SETHOSTNAME@ /* Set the host name of the machine. The host name may or may not be fully qualified. Put LEN bytes of NAME into the host name. Return 0 if successful, otherwise, set errno and return -1. Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); _GL_CXXALIASWARN (sethostname); #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " "use gnulib module sethostname for portability"); # endif #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep # define sleep rpl_sleep # endif _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); # else # if !@HAVE_SLEEP@ _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIASWARN (sleep); #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink # define symlink rpl_symlink # endif _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); # else # if !@HAVE_SYMLINK@ _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); # endif _GL_CXXALIASWARN (symlink); #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ # if @REPLACE_TTYNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ttyname_r # define ttyname_r rpl_ttyname_r # endif _GL_FUNCDECL_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen)); # else # if !@HAVE_DECL_TTYNAME_R@ _GL_FUNCDECL_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif _GL_CXXALIASWARN (ttyname_r); #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " "use gnulib module ttyname_r for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink # define unlink rpl_unlink # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif _GL_CXXALIASWARN (unlink); #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlinkat # define unlinkat rpl_unlinkat # endif _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); # else # if !@HAVE_UNLINKAT@ _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); # endif _GL_CXXALIASWARN (unlinkat); #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification <http://www.opengroup.org/susv3xsh/usleep.html>. */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep # define usleep rpl_usleep # endif _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # else # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */ # if @REPLACE_WRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write # endif _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif #endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbtowc-impl.h����������������������������������������������������������0000664�0000000�0000000�00000002626�12166360012�014557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert multibyte character to wide character. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ /* We don't need a static internal state, because the encoding is not state dependent, and when mbrtowc returns (size_t)(-2). we throw the result away. */ int mbtowc (wchar_t *pwc, const char *s, size_t n) { if (s == NULL) return 0; else { mbstate_t state; wchar_t wc; size_t result; memset (&state, 0, sizeof (mbstate_t)); result = mbrtowc (&wc, s, n, &state); if (result == (size_t)-1 || result == (size_t)-2) { errno = EILSEQ; return -1; } if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : result); } } ����������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dosname.h��������������������������������������������������������������0000664�0000000�0000000�00000003733�12166360012�013753� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* File names on MS-DOS/Windows systems. Copyright (C) 2000-2001, 2004-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 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 <http://www.gnu.org/licenses/>. From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H #if (defined _WIN32 || defined __WIN32__ || \ defined __MSDOS__ || defined __CYGWIN__ || \ defined __EMX__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ <= 'z' - 'a') # define FILE_SYSTEM_PREFIX_LEN(Filename) \ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) # ifndef __CYGWIN__ # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 # endif # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 # define ISSLASH(C) ((C) == '/') #endif #ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 #endif #if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) # else # define IS_ABSOLUTE_FILE_NAME(F) \ (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) #endif #define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) #endif /* DOSNAME_H_ */ �������������������������������������id-utils-4.6+git20120811/lib/fnmatch.in.h�����������������������������������������������������������0000664�0000000�0000000�00000004733�12166360012�014353� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 /* The definition of _GL_ARG_NONNULL is copied here. */ #ifdef __cplusplus extern "C" { #endif /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in <unistd.h>. */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD /* Bits set in the FLAGS argument to 'fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match '/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading '.' is matched only explicitly. */ #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE # define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ # define FNM_LEADING_DIR (1 << 3) /* Ignore '/...' after a match. */ # define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ # define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ #endif /* Value returned by 'fnmatch' if STRING does not match PATTERN. */ #define FNM_NOMATCH 1 /* This value is returned if the implementation does not support 'fnmatch'. Since this is not the case here it will never be returned but the conformance test suites still require the symbol to be defined. */ #ifdef _XOPEN_SOURCE # define FNM_NOSYS (-1) #endif /* Match NAME against the file name pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch (const char *__pattern, const char *__name, int __flags) _GL_ARG_NONNULL ((1, 2)); #ifdef __cplusplus } #endif #endif /* fnmatch.h */ �������������������������������������id-utils-4.6+git20120811/lib/regex_internal.c�������������������������������������������������������0000664�0000000�0000000�00000136432�12166360012�015331� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extended regular expression matching and search library. Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) internal_function; /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; Idx init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, Idx len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: <mb1>(0), <mb1>(1), <mb2>(0), <mb2>(1), <sb3> Then wide character buffer will be: <wc1> , WEOF , <wc2> , WEOF , <wc3> We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; Idx byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; Idx src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (Idx, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static Idx internal_function re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; Idx rawbuf_idx; size_t mbclen; wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { wchar_t wc2; Idx remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } else wc = wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { Idx char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { Idx buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) { Idx offset; if (BE (pstr->raw_mbs_idx <= idx, 0)) offset = idx - pstr->raw_mbs_idx; else { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { Idx low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } } else { #ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { Idx wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; size_t mbclen; #if 0 /* dead code: buf is set but never used */ unsigned char buf[6]; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; } #endif /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); mbclen = __mbrtowc (&wc2, (const char *) p, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; Idx off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function __attribute ((pure)) re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { Idx off; int ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, Idx idx, int eflags) { int c; if (BE (! REG_VALID_INDEX (idx), 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; Idx wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (REG_VALID_INDEX (wc_idx)); #endif --wc_idx; if (! REG_VALID_INDEX (wc_idx)) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (Idx, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, Idx elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) --id; if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (! REG_VALID_INDEX (--i2)) break; } else { if (! REG_VALID_INDEX (--i1)) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && REG_VALID_INDEX (id)) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (Idx)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (Idx)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { Idx is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { Idx new_alloc = 2 * (src->nelem + dest->alloc); Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (REG_VALID_INDEX (is)) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, Idx elem) { Idx idx; /* In case the set is empty. */ if (set->alloc == 0) return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return true; } /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return true; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, Idx elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return true; } /* Compare two node sets SET1 and SET2. Return true if SET1 and SET2 are equivalent. */ static bool internal_function __attribute ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return false; for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) if (set1->elems[i] != set2->elems[i]) return false; return true; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx internal_function __attribute ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; if (! REG_VALID_NONZERO_INDEX (set->nelem)) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, Idx idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return REG_MISSING if an error occurred. */ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (Idx))); /* Avoid overflows. */ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) return REG_MISSING; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return REG_MISSING; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) return REG_MISSING; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N { int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; } #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static inline re_hashval_t internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { re_hashval_t hash = nodes->nelem + context; Idx i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in 'dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value indicates the error code if failed. */ static reg_errcode_t __attribute_warn_unused_result__ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) { struct re_state_table_entry *spot; reg_errcode_t err; Idx i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { Idx elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { Idx new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) { Idx i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) { Idx i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) return NULL; nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fcntl.c����������������������������������������������������������������0000664�0000000�0000000�00000022775�12166360012�013435� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Provide file descriptor control. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>. */ #include <config.h> /* Specification. */ #include <fcntl.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <unistd.h> #if !HAVE_FCNTL # define rpl_fcntl fcntl #endif #undef fcntl #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" /* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ # define OPEN_MAX_MAX 0x10000 /* Duplicate OLDFD into the first available slot of at least NEWFD, which must be positive, with FLAGS determining whether the duplicate will be inheritable. */ static int dupfd (int oldfd, int newfd, int flags) { /* Mingw has no way to create an arbitrary fd. Iterate until all file descriptors less than newfd are filled up. */ HANDLE curr_process = GetCurrentProcess (); HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; unsigned int fds_to_close_bound = 0; int result; BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; int mode; if (newfd < 0 || getdtablesize () <= newfd) { errno = EINVAL; return -1; } if (old_handle == INVALID_HANDLE_VALUE || (mode = setmode (oldfd, O_BINARY)) == -1) { /* oldfd is not open, or is an unassigned standard file descriptor. */ errno = EBADF; return -1; } setmode (oldfd, mode); flags |= mode; for (;;) { HANDLE new_handle; int duplicated_fd; unsigned int index; if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ old_handle, /* SourceHandle */ curr_process, /* TargetProcessHandle */ (PHANDLE) &new_handle, /* TargetHandle */ (DWORD) 0, /* DesiredAccess */ inherit, /* InheritHandle */ DUPLICATE_SAME_ACCESS)) /* Options */ { /* TODO: Translate GetLastError () into errno. */ errno = EMFILE; result = -1; break; } duplicated_fd = _open_osfhandle ((long) new_handle, flags); if (duplicated_fd < 0) { CloseHandle (new_handle); errno = EMFILE; result = -1; break; } if (newfd <= duplicated_fd) { result = duplicated_fd; break; } /* Set the bit duplicated_fd in fds_to_close[]. */ index = (unsigned int) duplicated_fd / CHAR_BIT; if (fds_to_close_bound <= index) { if (sizeof fds_to_close <= index) /* Need to increase OPEN_MAX_MAX. */ abort (); memset (fds_to_close + fds_to_close_bound, '\0', index + 1 - fds_to_close_bound); fds_to_close_bound = index + 1; } fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT); } /* Close the previous fds that turned out to be too small. */ { int saved_errno = errno; unsigned int duplicated_fd; for (duplicated_fd = 0; duplicated_fd < fds_to_close_bound * CHAR_BIT; duplicated_fd++) if ((fds_to_close[duplicated_fd / CHAR_BIT] >> (duplicated_fd % CHAR_BIT)) & 1) close (duplicated_fd); errno = saved_errno; } # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (oldfd, result); # endif return result; } #endif /* W32 */ /* Perform the specified ACTION on the file descriptor FD, possibly using the argument ARG further described below. This replacement handles the following actions, and forwards all others on to the native fcntl. An unrecognized ACTION returns -1 with errno set to EINVAL. F_DUPFD - duplicate FD, with int ARG being the minimum target fd. If successful, return the duplicate, which will be inheritable; otherwise return -1 and set errno. F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum target fd. If successful, return the duplicate, which will not be inheritable; otherwise return -1 and set errno. F_GETFD - ARG need not be present. If successful, return a non-negative value containing the descriptor flags of FD (only FD_CLOEXEC is portable, but other flags may be present); otherwise return -1 and set errno. */ int rpl_fcntl (int fd, int action, /* arg */...) { va_list arg; int result = -1; va_start (arg, action); switch (action) { #if !HAVE_FCNTL case F_DUPFD: { int target = va_arg (arg, int); result = dupfd (fd, target, 0); break; } #elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR case F_DUPFD: { int target = va_arg (arg, int); /* Detect invalid target; needed for cygwin 1.5.x. */ if (target < 0 || getdtablesize () <= target) errno = EINVAL; else { /* Haiku alpha 2 loses fd flags on original. */ int flags = fcntl (fd, F_GETFD); if (flags < 0) { result = -1; break; } result = fcntl (fd, action, target); if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) { int saved_errno = errno; close (result); result = -1; errno = saved_errno; } # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif } break; } /* F_DUPFD */ #endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */ case F_DUPFD_CLOEXEC: { int target = va_arg (arg, int); #if !HAVE_FCNTL result = dupfd (fd, target, O_CLOEXEC); break; #else /* HAVE_FCNTL */ /* Try the system call first, if the headers claim it exists (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we may be running with a glibc that has the macro but with an older kernel that does not support it. Cache the information on whether the system call really works, but avoid caching failure if the corresponding F_DUPFD fails for any reason. 0 = unknown, 1 = yes, -1 = no. */ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; if (0 <= have_dupfd_cloexec) { result = fcntl (fd, action, target); if (0 <= result || errno != EINVAL) { have_dupfd_cloexec = 1; # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif } else { result = rpl_fcntl (fd, F_DUPFD, target); if (result < 0) break; have_dupfd_cloexec = -1; } } else result = rpl_fcntl (fd, F_DUPFD, target); if (0 <= result && have_dupfd_cloexec == -1) { int flags = fcntl (result, F_GETFD); if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) { int saved_errno = errno; close (result); errno = saved_errno; result = -1; } } break; #endif /* HAVE_FCNTL */ } /* F_DUPFD_CLOEXEC */ #if !HAVE_FCNTL case F_GETFD: { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); DWORD flags; if (handle == INVALID_HANDLE_VALUE || GetHandleInformation (handle, &flags) == 0) errno = EBADF; else result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC; # else /* !W32 */ /* Use dup2 to reject invalid file descriptors. No way to access this information, so punt. */ if (0 <= dup2 (fd, fd)) result = 0; # endif /* !W32 */ break; } /* F_GETFD */ #endif /* !HAVE_FCNTL */ /* Implementing F_SETFD on mingw is not trivial - there is no API for changing the O_NOINHERIT bit on an fd, and merely changing the HANDLE_FLAG_INHERIT bit on the underlying handle can lead to odd state. It may be possible by duplicating the handle, using _open_osfhandle with the right flags, then using dup2 to move the duplicate onto the original, but that is not supported for now. */ default: { #if HAVE_FCNTL void *p = va_arg (arg, void *); result = fcntl (fd, action, p); #else errno = EINVAL; #endif break; } } va_end (arg); return result; } ���id-utils-4.6+git20120811/lib/fcntl.in.h�������������������������������������������������������������0000664�0000000�0000000�00000021720�12166360012�014034� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Like <fcntl.h>, 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 <http://www.gnu.org/licenses/>. */ /* written by Paul Eggert */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_fcntl_h /* Special invocation convention. */ #include <sys/types.h> /* On some systems other than glibc, <sys/stat.h> is a prerequisite of <fcntl.h>. On glibc systems, we would like to avoid namespace pollution. But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an extern "C" { ... } block, which leads to errors in C++ mode with the overridden <sys/stat.h> 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 <sys/stat.h> #endif #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_FCNTL_H #include <sys/types.h> /* On some systems other than glibc, <sys/stat.h> is a prerequisite of <fcntl.h>. On glibc systems, we would like to avoid namespace pollution. But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an extern "C" { ... } block, which leads to errors in C++ mode with the overridden <sys/stat.h> 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 <sys/stat.h> #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #ifndef _@GUARD_PREFIX@_FCNTL_H #define _@GUARD_PREFIX@_FCNTL_H #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include <unistd.h> #endif /* Native Windows platforms declare open(), creat() in <io.h>. */ #if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include <io.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_FCNTL@ # if @REPLACE_FCNTL@ # 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 !@HAVE_FCNTL@ _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 @GNULIB_OPEN@ # if @REPLACE_OPEN@ # 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 @GNULIB_OPENAT@ # if @REPLACE_OPENAT@ # 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 !@HAVE_OPENAT@ _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 @GNULIB_NONBLOCKING@ # 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 /* _@GUARD_PREFIX@_FCNTL_H */ #endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif ������������������������������������������������id-utils-4.6+git20120811/lib/stripslash.c�����������������������������������������������������������0000664�0000000�0000000�00000003041�12166360012�014504� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* stripslash.c -- remove redundant trailing slashes from a file name Copyright (C) 1990, 2001, 2003-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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" /* Remove trailing slashes from FILE. Return true if a trailing slash was removed. This is useful when using file name completion from a shell that adds a "/" after directory names (such as tcsh and bash), because on symlinks to directories, several system calls have different semantics according to whether a trailing slash is present. */ bool strip_trailing_slashes (char *file) { char *base = last_component (file); char *base_lim; bool had_slash; /* last_component returns "" for file system roots, but we need to turn "///" into "/". */ if (! *base) base = file; base_lim = base + base_len (base); had_slash = (*base_lim != '\0'); *base_lim = '\0'; return had_slash; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/regex.c����������������������������������������������������������������0000664�0000000�0000000�00000005566�12166360012�013440� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extended regular expression matching and search library. Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Make sure noone compiles this code with a C++ compiler. */ #if defined __cplusplus && defined _LIBC # error "This is C code, use a C compiler" #endif #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #endif /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before <regex.h>, which correctly #undefs RE_DUP_MAX and sets it to the right value. */ #include <limits.h> #include <strings.h> #include <regex.h> #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include <shlib-compat.h> # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif ������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf.c���������������������������������������������������������������0000664�0000000�0000000�00000002222�12166360012�013612� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to a stream. Copyright (C) 2007, 2010-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 <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif /* Specification. */ #include <stdio.h> #include <stdarg.h> /* Print formatted output to standard output. Return string length of formatted string. On error, return a negative value. */ int printf (const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stdout, format, args); va_end (args); return retval; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/c-strcase.h������������������������������������������������������������0000664�0000000�0000000�00000004125�12166360012�014205� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Case-insensitive string comparison functions in C locale. Copyright (C) 1995-1996, 2001, 2003, 2005, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_STRCASE_H #define C_STRCASE_H #include <stddef.h> /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. More precisely, one of the string arguments must be an ASCII string; the other one can also contain non-ASCII characters (but then the comparison result will be nonzero). */ #ifdef __cplusplus extern "C" { #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; /* Compare no more than N characters of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strncasecmp (const char *s1, const char *s2, size_t n) _GL_ATTRIBUTE_PURE; #ifdef __cplusplus } #endif #endif /* C_STRCASE_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/strnlen1.c�������������������������������������������������������������0000664�0000000�0000000�00000002365�12166360012�014066� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Find the length of STRING + 1, but scan at most MAXLEN bytes. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "strnlen1.h" #include <string.h> /* Find the length of STRING + 1, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many characters, return MAXLEN. */ /* This is the same as strnlen (string, maxlen - 1) + 1. */ size_t strnlen1 (const char *string, size_t maxlen) { const char *end = (const char *) memchr (string, '\0', maxlen); if (end != NULL) return end - string + 1; else return maxlen; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/ignore-value.h���������������������������������������������������������0000664�0000000�0000000�00000004516�12166360012�014722� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ignore a function return without a compiler warning Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering, Eric Blake and Pádraig Brady. */ /* Use "ignore_value" to avoid a warning when using a function declared with gcc's warn_unused_result attribute, but for which you really do want to ignore the result. Traditionally, people have used a "(void)" cast to indicate that a function's return value is deliberately unused. However, if the function is declared with __attribute__((warn_unused_result)), gcc issues a warning even with the cast. Caution: most of the time, you really should heed gcc's warning, and check the return value. However, in those exceptional cases in which you're sure you know what you're doing, use this function. For the record, here's one of the ignorable warnings: "copy.c:233: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result". */ #ifndef _GL_IGNORE_VALUE_H # define _GL_IGNORE_VALUE_H # ifndef _GL_ATTRIBUTE_DEPRECATED /* The __attribute__((__deprecated__)) feature is available in gcc versions 3.1 and newer. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) # define _GL_ATTRIBUTE_DEPRECATED /* empty */ # else # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) # endif # endif /* The __attribute__((__warn_unused_result__)) feature is available in gcc versions 3.4 and newer, while the typeof feature has been available since 2.7 at least. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) # define ignore_value(x) ((void) (x)) # else # define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) # endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mempcpy.c��������������������������������������������������������������0000664�0000000�0000000�00000002113�12166360012�013761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copy memory area and return pointer after last written byte. Copyright (C) 2003, 2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <string.h> /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ void * mempcpy (void *dest, const void *src, size_t n) { return (char *) memcpy (dest, src, n) + n; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/printf-args.c����������������������������������������������������������0000664�0000000�0000000�00000014743�12166360012�014557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007, 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include <config.h> #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } �����������������������������id-utils-4.6+git20120811/lib/printf-frexp.h���������������������������������������������������������0000664�0000000�0000000�00000002060�12166360012�014741� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= DBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern double printf_frexp (double x, int *expptr); ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/alloca.in.h������������������������������������������������������������0000664�0000000�0000000�00000003552�12166360012�014164� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Memory allocation on the stack. 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 under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include <malloc.h> # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include <stddef.h> # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/ftell.c����������������������������������������������������������������0000664�0000000�0000000�00000002155�12166360012�013423� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* An ftell() function that works around platform bugs. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdio.h> #include <errno.h> #include <limits.h> long ftell (FILE *fp) { /* Use the replacement ftello function with all its workarounds. */ off_t offset = ftello (fp); if (LONG_MIN <= offset && offset <= LONG_MAX) return /* (long) */ offset; else { errno = EOVERFLOW; return -1; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/getopt.in.h������������������������������������������������������������0000664�0000000�0000000�00000021520�12166360012�014226� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use <getopt.h>; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ # define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ # undef _GL_SYSTEM_GETOPT #endif #ifndef _@GUARD_PREFIX@_GETOPT_H #ifndef __need_getopt # define _@GUARD_PREFIX@_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file (if the system had <getopt.h>, we have already included it). Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ # include <stdlib.h> # include <stdio.h> # include <unistd.h> # endif # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # undef option # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) # define option __GETOPT_ID (option) # define _getopt_internal __GETOPT_ID (getopt_internal) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and 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', 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. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include <features.h>, but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include <ctype.h>, which will pull in <features.h> for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include <ctype.h> #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ #ifdef __cplusplus extern "C" { #endif /* 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, 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'. 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 non-option elements that the caller should itself scan. 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 for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ 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 zero. 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 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 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. */ # if !GNULIB_defined_struct_option struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; # define GNULIB_defined_struct_option 1 # endif /* Names for the values of the 'has_arg' field of 'struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. 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 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'. If a letter in OPTS is followed by two colons, its argument is 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 options. 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 the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* _@GUARD_PREFIX@_GETOPT_H */ #endif /* _@GUARD_PREFIX@_GETOPT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/signbitd.c�������������������������������������������������������������0000664�0000000�0000000�00000004066�12166360012�014123� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <math.h> #include <string.h> #include "isnand-nolibm.h" #include "float+.h" #ifdef gl_signbitd_OPTIMIZED_MACRO # undef gl_signbitd #endif int gl_signbitd (double arg) { #if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGN_IN_LIBC return copysign (1.0, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnand (arg)) return 0; if (arg < 0.0) return 1; else if (arg == 0.0) { /* Distinguish 0.0 and -0.0. */ static double plus_zero = 0.0; double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_DBL) != 0); } else return 0; #endif } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/closeout.c�������������������������������������������������������������0000664�0000000�0000000�00000010661�12166360012�014153� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Close standard output and standard error, exiting with a diagnostic on error. Copyright (C) 1998-2002, 2004, 2006, 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "closeout.h" #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <unistd.h> #include "gettext.h" #define _(msgid) gettext (msgid) #include "close-stream.h" #include "error.h" #include "exitfail.h" #include "quotearg.h" static const char *file_name; /* Set the file name to be reported in the event an error is detected by close_stdout. */ void close_stdout_set_file_name (const char *file) { file_name = file; } static bool ignore_EPIPE /* = false */; /* Specify the reaction to an EPIPE error during the closing of stdout: - If ignore = true, it shall be ignored. - If ignore = false, it shall evoke a diagnostic, along with a nonzero exit status. The default is ignore = false. This setting matters only if the SIGPIPE signal is ignored (i.e. its handler set to SIG_IGN) or blocked. Only particular programs need to temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because it was ignored or blocked in the parent process when it created the child process, it usually is a bug in the parent process: It is bad practice to have SIGPIPE ignored or blocked while creating a child process. EPIPE occurs when writing to a pipe or socket that has no readers now, when SIGPIPE is ignored or blocked. The ignore = false setting is suitable for a scenario where it is normally guaranteed that the pipe writer terminates before the pipe reader. In this case, an EPIPE is an indication of a premature termination of the pipe reader and should lead to a diagnostic and a nonzero exit status. The ignore = true setting is suitable for a scenario where you don't know ahead of time whether the pipe writer or the pipe reader will terminate first. In this case, an EPIPE is an indication that the pipe writer can stop doing useless write() calls; this is what close_stdout does anyway. EPIPE is part of the normal pipe/socket shutdown protocol in this case, and should not lead to a diagnostic message. */ void close_stdout_set_ignore_EPIPE (bool ignore) { ignore_EPIPE = ignore; } /* Close standard output. On error, issue a diagnostic and _exit with status 'exit_failure'. Also close standard error. On error, _exit with status 'exit_failure'. Since close_stdout is commonly registered via 'atexit', POSIX and the C standard both say that it should not call 'exit', because the behavior is undefined if 'exit' is called more than once. So it calls '_exit' instead of 'exit'. If close_stdout is registered via atexit before other functions are registered, the other functions can act before this _exit is invoked. Applications that use close_stdout should flush any streams other than stdout and stderr before exiting, since the call to _exit will bypass other buffer flushing. Applications should be flushing and closing other streams anyway, to check for I/O errors. Also, applications should not use tmpfile, since _exit can bypass the removal of these files. It's important to detect such failures and exit nonzero because many tools (most notably 'make' and other build-management systems) depend on being able to detect failure in other tools via their exit status. */ void close_stdout (void) { if (close_stream (stdout) != 0 && !(ignore_EPIPE && errno == EPIPE)) { char const *write_error = _("write error"); if (file_name) error (0, errno, "%s: %s", quotearg_colon (file_name), write_error); else error (0, errno, "%s", write_error); _exit (exit_failure); } if (close_stream (stderr) != 0) _exit (exit_failure); } �������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/sys_ioctl.in.h���������������������������������������������������������0000664�0000000�0000000�00000005020�12166360012�014731� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Substitute for and wrapper around <sys/ioctl.h>. Copyright (C) 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_IOCTL_H@ # @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ #endif #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H #define _@GUARD_PREFIX@_SYS_IOCTL_H /* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>, but not in <sys/ioctl.h>. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include <unistd.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_IOCTL@ # if @REPLACE_IOCTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ioctl # define ioctl rpl_ioctl # endif _GL_FUNCDECL_RPL (ioctl, int, (int fd, int request, ... /* {void *,char *} arg */)); _GL_CXXALIAS_RPL (ioctl, int, (int fd, int request, ... /* {void *,char *} arg */)); # else # if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1 _GL_FUNCDECL_SYS (ioctl, int, (int fd, int request, ... /* {void *,char *} arg */)); # endif _GL_CXXALIAS_SYS (ioctl, int, (int fd, int request, ... /* {void *,char *} arg */)); # endif _GL_CXXALIASWARN (ioctl); #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef ioctl # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl #elif defined GNULIB_POSIXCHECK # undef ioctl # if HAVE_RAW_DECL_IOCTL _GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " "use gnulib module ioctl for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ #endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/gettext.h��������������������������������������������������������������0000664�0000000�0000000�00000023424�12166360012�014010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convenience header for conditional use of GNU <libintl.h>. Copyright (C) 1995-1998, 2000-2002, 2004-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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include <libintl.h> /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <locale.h> a NOP. We don't include <libintl.h> as well because people using "gettext.h" will not include <libintl.h>, and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> is OK. */ #if defined(__sun) # include <locale.h> #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include <libintl.h>, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <libintl.h> a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include <cstdlib> # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include <libintl.h> # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include <string.h> #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include <stdlib.h> #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/dup.c������������������������������������������������������������������0000664�0000000�0000000�00000002461�12166360012�013105� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Duplicate an open file descriptor. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #include <errno.h> #include "msvc-inval.h" #undef dup #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static inline int dup_nothrow (int fd) { int result; TRY_MSVC_INVAL { result = dup (fd); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } #else # define dup_nothrow dup #endif int rpl_dup (int fd) { int result = dup_nothrow (fd); #if REPLACE_FCHDIR if (result >= 0) result = _gl_register_dup (fd, result); #endif return result; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/msvc-nothrow.h���������������������������������������������������������0000664�0000000�0000000�00000003121�12166360012�014762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MSVC_NOTHROW_H #define _MSVC_NOTHROW_H /* With MSVC runtime libraries with the "invalid parameter handler" concept, functions like fprintf(), dup2(), or close() crash when the caller passes an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) instead. This file defines wrappers that turn such an invalid parameter notification into an error code. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get original declaration of _get_osfhandle. */ # include <io.h> # if HAVE_MSVC_INVALID_PARAMETER_HANDLER /* Override _get_osfhandle. */ extern intptr_t _gl_nothrow_get_osfhandle (int fd); # define _get_osfhandle _gl_nothrow_get_osfhandle # endif #endif #endif /* _MSVC_NOTHROW_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/nl_langinfo.c����������������������������������������������������������0000664�0000000�0000000�00000015037�12166360012�014606� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* nl_langinfo() replacement: query locale dependent information. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <langinfo.h> #if REPLACE_NL_LANGINFO /* Override nl_langinfo with support for added nl_item values. */ # include <locale.h> # include <string.h> # undef nl_langinfo char * rpl_nl_langinfo (nl_item item) { switch (item) { # if GNULIB_defined_CODESET case CODESET: { const char *locale; static char buf[2 + 10 + 1]; locale = setlocale (LC_CTYPE, NULL); if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } return ""; } # endif # if GNULIB_defined_T_FMT_AMPM case T_FMT_AMPM: return "%I:%M:%S %p"; # endif # if GNULIB_defined_ERA case ERA: /* The format is not standardized. In glibc it is a sequence of strings of the form "direction:offset:start_date:end_date:era_name:era_format" with an empty string at the end. */ return ""; case ERA_D_FMT: /* The %Ex conversion in strftime behaves like %x if the locale does not have an alternative time format. */ item = D_FMT; break; case ERA_D_T_FMT: /* The %Ec conversion in strftime behaves like %c if the locale does not have an alternative time format. */ item = D_T_FMT; break; case ERA_T_FMT: /* The %EX conversion in strftime behaves like %X if the locale does not have an alternative time format. */ item = T_FMT; break; case ALT_DIGITS: /* The format is not standardized. In glibc it is a sequence of 10 strings, appended in memory. */ return "\0\0\0\0\0\0\0\0\0\0"; # endif # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS case YESEXPR: return "^[yY]"; case NOEXPR: return "^[nN]"; # endif default: break; } return nl_langinfo (item); } #else /* Provide nl_langinfo from scratch. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # include <stdio.h> # else /* An old Unix platform without locales, such as Linux libc5 or BeOS. */ # endif # include <locale.h> char * nl_langinfo (nl_item item) { switch (item) { /* nl_langinfo items of the LC_CTYPE category */ case CODESET: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { static char buf[2 + 10 + 1]; /* The Windows API has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); return buf; } # elif defined __BEOS__ return "UTF-8"; # else return "ISO-8859-1"; # endif /* nl_langinfo items of the LC_NUMERIC category */ case RADIXCHAR: return localeconv () ->decimal_point; case THOUSEP: return localeconv () ->thousands_sep; /* nl_langinfo items of the LC_TIME category. TODO: Really use the locale. */ case D_T_FMT: case ERA_D_T_FMT: return "%a %b %e %H:%M:%S %Y"; case D_FMT: case ERA_D_FMT: return "%m/%d/%y"; case T_FMT: case ERA_T_FMT: return "%H:%M:%S"; case T_FMT_AMPM: return "%I:%M:%S %p"; case AM_STR: return "AM"; case PM_STR: return "PM"; case DAY_1: return "Sunday"; case DAY_2: return "Monday"; case DAY_3: return "Tuesday"; case DAY_4: return "Wednesday"; case DAY_5: return "Thursday"; case DAY_6: return "Friday"; case DAY_7: return "Saturday"; case ABDAY_1: return "Sun"; case ABDAY_2: return "Mon"; case ABDAY_3: return "Tue"; case ABDAY_4: return "Wed"; case ABDAY_5: return "Thu"; case ABDAY_6: return "Fri"; case ABDAY_7: return "Sat"; case MON_1: return "January"; case MON_2: return "February"; case MON_3: return "March"; case MON_4: return "April"; case MON_5: return "May"; case MON_6: return "June"; case MON_7: return "July"; case MON_8: return "August"; case MON_9: return "September"; case MON_10: return "October"; case MON_11: return "November"; case MON_12: return "December"; case ABMON_1: return "Jan"; case ABMON_2: return "Feb"; case ABMON_3: return "Mar"; case ABMON_4: return "Apr"; case ABMON_5: return "May"; case ABMON_6: return "Jun"; case ABMON_7: return "Jul"; case ABMON_8: return "Aug"; case ABMON_9: return "Sep"; case ABMON_10: return "Oct"; case ABMON_11: return "Nov"; case ABMON_12: return "Dec"; case ERA: return ""; case ALT_DIGITS: return "\0\0\0\0\0\0\0\0\0\0"; /* nl_langinfo items of the LC_MONETARY category TODO: Really use the locale. */ case CRNCYSTR: return "-"; /* nl_langinfo items of the LC_MESSAGES category TODO: Really use the locale. */ case YESEXPR: return "^[yY]"; case NOEXPR: return "^[nN]"; default: return ""; } } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/wcrtomb.c��������������������������������������������������������������0000664�0000000�0000000�00000002715�12166360012�013774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert wide character to multibyte character. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #include <errno.h> #include <stdlib.h> size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) { /* This implementation of wcrtomb on top of wctomb() supports only stateless encodings. ps must be in the initial state. */ if (ps != NULL && !mbsinit (ps)) { errno = EINVAL; return (size_t)(-1); } if (s == NULL) /* We know the NUL wide character corresponds to the NUL character. */ return 1; else { int ret = wctomb (s, wc); if (ret >= 0) return ret; else { errno = EILSEQ; return (size_t)(-1); } } } ���������������������������������������������������id-utils-4.6+git20120811/lib/dirent-private.h�������������������������������������������������������0000664�0000000�0000000�00000002755�12166360012�015265� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Private details of the DIR type. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #ifndef _DIRENT_PRIVATE_H #define _DIRENT_PRIVATE_H 1 #define WIN32_LEAN_AND_MEAN #include <windows.h> struct gl_directory { /* Status, or error code to produce in next readdir() call. -2 means the end of the directory is already reached, -1 means the entry was already filled by FindFirstFile, 0 means the entry needs to be filled using FindNextFile. A positive value is an error code. */ int status; /* Handle, reading the directory, at current position. */ HANDLE current; /* Found directory entry. */ WIN32_FIND_DATA entry; /* Argument to pass to FindFirstFile. It consists of the absolutized directory name, followed by a directory separator and the wildcards. */ char dir_name_mask[1]; }; #endif /* _DIRENT_PRIVATE_H */ �������������������id-utils-4.6+git20120811/lib/fprintf.c��������������������������������������������������������������0000664�0000000�0000000�00000003364�12166360012�013770� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to a stream. Copyright (C) 2004, 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 <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif /* Specification. */ #include <stdio.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdlib.h> #include "fseterr.h" #include "vasnprintf.h" /* Print formatted output to the stream FP. Return string length of formatted string. On error, return a negative value. */ int fprintf (FILE *fp, const char *format, ...) { char buf[2000]; char *output; size_t len; size_t lenbuf = sizeof (buf); va_list args; va_start (args, format); output = vasnprintf (buf, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) { fseterr (fp); return -1; } if (fwrite (output, 1, len, fp) < len) { if (output != buf) { int saved_errno = errno; free (output); errno = saved_errno; } return -1; } if (output != buf) free (output); if (len > INT_MAX) { errno = EOVERFLOW; fseterr (fp); return -1; } return len; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/msvc-inval.h�����������������������������������������������������������0000664�0000000�0000000�00000021246�12166360012�014403� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Invalid parameter handler for MSVC runtime libraries. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MSVC_INVAL_H #define _MSVC_INVAL_H /* With MSVC runtime libraries with the "invalid parameter handler" concept, functions like fprintf(), dup2(), or close() crash when the caller passes an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) instead. This file defines macros that turn such an invalid parameter notification into a non-local exit. An error code can then be produced at the target of this exit. You can thus write code like TRY_MSVC_INVAL { <Code that can trigger an invalid parameter notification but does not do 'return', 'break', 'continue', nor 'goto'.> } CATCH_MSVC_INVAL { <Code that handles an invalid parameter notification but does not do 'return', 'break', 'continue', nor 'goto'.> } DONE_MSVC_INVAL; This entire block expands to a single statement. The handling of invalid parameters can be done in three ways: * The default way, which is reasonable for programs (not libraries): AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING]) * The way for libraries that make "hairy" calls (like close(-1), or fclose(fp) where fileno(fp) is closed, or simply getdtablesize()): AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING]) * The way for libraries that make no "hairy" calls: AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING]) */ #define DEFAULT_HANDLING 0 #define HAIRY_LIBRARY_HANDLING 1 #define SANE_LIBRARY_HANDLING 2 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) /* A native Windows platform with the "invalid parameter handler" concept, and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */ # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING /* Default handling. */ # ifdef __cplusplus extern "C" { # endif /* Ensure that the invalid parameter handler in installed that just returns. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ gl_msvc_inval_ensure_handler (); \ if (1) # define CATCH_MSVC_INVAL \ else # define DONE_MSVC_INVAL \ } \ while (0) # else /* Handling for hairy libraries. */ # include <excpt.h> /* Gnulib can define its own status codes, as described in the page "Raising Software Exceptions" on microsoft.com <http://msdn.microsoft.com/en-us/library/het71c37.aspx>. Our status codes are composed of - 0xE0000000, mandatory for all user-defined status codes, - 0x474E550, a API identifier ("GNU"), - 0, 1, 2, ..., used to distinguish different status codes from the same API. */ # define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0) # if defined _MSC_VER /* A compiler that supports __try/__except, as described in the page "try-except statement" on microsoft.com <http://msdn.microsoft.com/en-us/library/s58ftw19.aspx>. With __try/__except, we can use the multithread-safe exception handling. */ # ifdef __cplusplus extern "C" { # endif /* Ensure that the invalid parameter handler in installed that raises a software exception with code STATUS_GNULIB_INVALID_PARAMETER. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ gl_msvc_inval_ensure_handler (); \ __try # define CATCH_MSVC_INVAL \ __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \ ? EXCEPTION_EXECUTE_HANDLER \ : EXCEPTION_CONTINUE_SEARCH) # define DONE_MSVC_INVAL \ } \ while (0) # else /* Any compiler. We can only use setjmp/longjmp. */ # include <setjmp.h> # ifdef __cplusplus extern "C" { # endif struct gl_msvc_inval_per_thread { /* The restart that will resume execution at the code between CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */ jmp_buf restart; /* Tells whether the contents of restart is valid. */ int restart_valid; }; /* Ensure that the invalid parameter handler in installed that passes control to the gl_msvc_inval_restart if it is valid, or raises a software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); /* Return a pointer to the per-thread data for the current thread. */ extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ struct gl_msvc_inval_per_thread *msvc_inval_current; \ gl_msvc_inval_ensure_handler (); \ msvc_inval_current = gl_msvc_inval_current (); \ /* First, initialize gl_msvc_inval_restart. */ \ if (setjmp (msvc_inval_current->restart) == 0) \ { \ /* Then, mark it as valid. */ \ msvc_inval_current->restart_valid = 1; # define CATCH_MSVC_INVAL \ /* Execution completed. \ Mark gl_msvc_inval_restart as invalid. */ \ msvc_inval_current->restart_valid = 0; \ } \ else \ { \ /* Execution triggered an invalid parameter notification. \ Mark gl_msvc_inval_restart as invalid. */ \ msvc_inval_current->restart_valid = 0; # define DONE_MSVC_INVAL \ } \ } \ while (0) # endif # endif #else /* A platform that does not need to the invalid parameter handler, or when SANE_LIBRARY_HANDLING is desired. */ /* The braces here avoid GCC warnings like "warning: suggest explicit braces to avoid ambiguous 'else'". */ # define TRY_MSVC_INVAL \ do \ { \ if (1) # define CATCH_MSVC_INVAL \ else # define DONE_MSVC_INVAL \ } \ while (0) #endif #endif /* _MSVC_INVAL_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fd-safer.c�������������������������������������������������������������0000664�0000000�0000000�00000003002�12166360012�013774� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Return a safer copy of a file descriptor. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #include <config.h> #include "unistd-safer.h" #include <errno.h> #include <unistd.h> /* Return FD, unless FD would be a copy of standard input, output, or error; in that case, return a duplicate of FD, closing FD. On failure to duplicate, close FD, set errno, and return -1. Preserve errno if FD is negative, so that the caller can always inspect errno when the returned value is negative. This function is usefully wrapped around functions that return file descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */ int fd_safer (int fd) { if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) { int f = dup_safer (fd); int e = errno; close (fd); errno = e; fd = f; } return fd; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fpending.h�������������������������������������������������������������0000664�0000000�0000000�00000002012�12166360012�014104� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Declare __fpending. Copyright (C) 2000, 2003, 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 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 <http://www.gnu.org/licenses/>. Written by Jim Meyering. */ #include <stddef.h> #include <stdio.h> #ifndef HAVE_DECL___FPENDING "this configure-time declaration test was not run" #endif #if HAVE_DECL___FPENDING # if HAVE_STDIO_EXT_H # include <stdio_ext.h> # endif #else size_t __fpending (FILE *); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/unitypes.in.h����������������������������������������������������������0000664�0000000�0000000�00000001715�12166360012�014610� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Elementary types 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _UNITYPES_H #define _UNITYPES_H /* Get uint8_t, uint16_t, uint32_t. */ #include <stdint.h> /* Type representing a Unicode character. */ typedef uint32_t ucs4_t; #endif /* _UNITYPES_H */ ���������������������������������������������������id-utils-4.6+git20120811/lib/fstat.c����������������������������������������������������������������0000664�0000000�0000000�00000004260�12166360012�013435� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fstat() replacement. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* If the user's config.h happens to include <sys/stat.h>, let it include only the system's <sys/stat.h> here, so that orig_fstat doesn't recurse to rpl_fstat. */ #define __need_system_sys_stat_h #include <config.h> /* Get the original definition of fstat. It might be defined as a macro. */ #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h static inline int orig_fstat (int fd, struct stat *buf) { return fstat (fd, buf); } /* Specification. */ /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <sys/stat.h> above. */ #include "sys/stat.h" #include <errno.h> #include <unistd.h> #if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" #endif #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static inline int fstat_nothrow (int fd, struct stat *buf) { int result; TRY_MSVC_INVAL { result = orig_fstat (fd, buf); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } #else # define fstat_nothrow orig_fstat #endif int rpl_fstat (int fd, struct stat *buf) { #if REPLACE_FCHDIR && REPLACE_OPEN_DIRECTORY /* Handle the case when rpl_open() used a dummy file descriptor to work around an open() that can't normally visit directories. */ const char *name = _gl_directory_name (fd); if (name != NULL) return stat (name, buf); #endif return fstat_nothrow (fd, buf); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/opendir.c��������������������������������������������������������������0000664�0000000�0000000�00000006521�12166360012�013756� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Start reading the entries of a directory. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <dirent.h> #include <errno.h> #include <stddef.h> #if HAVE_OPENDIR /* Override opendir(), to keep track of the open file descriptors. Needed because there is a function dirfd(). */ #else # include <stdlib.h> # include "dirent-private.h" # include "filename.h" #endif #if REPLACE_FCHDIR # include <unistd.h> #endif DIR * opendir (const char *dir_name) { #if HAVE_OPENDIR # undef opendir DIR *dirp; dirp = opendir (dir_name); if (dirp == NULL) return NULL; #else char dir_name_mask[MAX_PATH + 1 + 1 + 1]; int status; HANDLE current; WIN32_FIND_DATA entry; struct gl_directory *dirp; if (dir_name[0] == '\0') { errno = ENOENT; return NULL; } /* Make the dir_name absolute, so that we continue reading the same directory if the current directory changed between this opendir() call and a subsequent rewinddir() call. */ if (!GetFullPathName (dir_name, MAX_PATH, dir_name_mask, NULL)) { errno = EINVAL; return NULL; } /* Append the mask. "*" and "*.*" appear to be equivalent. */ { char *p; p = dir_name_mask + strlen (dir_name_mask); if (p > dir_name_mask && !ISSLASH (p[-1])) *p++ = '\\'; *p++ = '*'; *p = '\0'; } /* Start searching the directory. */ status = -1; current = FindFirstFile (dir_name_mask, &entry); if (current == INVALID_HANDLE_VALUE) { switch (GetLastError ()) { case ERROR_FILE_NOT_FOUND: status = -2; break; case ERROR_PATH_NOT_FOUND: errno = ENOENT; return NULL; case ERROR_DIRECTORY: errno = ENOTDIR; return NULL; case ERROR_ACCESS_DENIED: errno = EACCES; return NULL; default: errno = EIO; return NULL; } } /* Allocate the result. */ dirp = (struct gl_directory *) malloc (offsetof (struct gl_directory, dir_name_mask[0]) + strlen (dir_name_mask) + 1); if (dirp == NULL) { if (current != INVALID_HANDLE_VALUE) FindClose (current); errno = ENOMEM; return NULL; } dirp->status = status; dirp->current = current; if (status == -1) memcpy (&dirp->entry, &entry, sizeof (WIN32_FIND_DATA)); strcpy (dirp->dir_name_mask, dir_name_mask); #endif #if REPLACE_FCHDIR { int fd = dirfd (dirp); if (0 <= fd && _gl_register_fd (fd, dir_name) != fd) { int saved_errno = errno; closedir (dirp); errno = saved_errno; return NULL; } } #endif return dirp; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/xsize.h����������������������������������������������������������������0000664�0000000�0000000�00000006706�12166360012�013472� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xsize.h -- Checked size_t computations. Copyright (C) 2003, 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include <stddef.h> /* Get SIZE_MAX. */ #include <limits.h> #if HAVE_STDINT_H # include <stdint.h> #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider type and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ ����������������������������������������������������������id-utils-4.6+git20120811/lib/getdtablesize.c��������������������������������������������������������0000664�0000000�0000000�00000004772�12166360012�015152� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getdtablesize() function for platforms that don't have it. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ #include <stdio.h> #include "msvc-inval.h" #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static inline int _setmaxstdio_nothrow (int newmax) { int result; TRY_MSVC_INVAL { result = _setmaxstdio (newmax); } CATCH_MSVC_INVAL { result = -1; } DONE_MSVC_INVAL; return result; } # define _setmaxstdio _setmaxstdio_nothrow #endif /* Cache for the previous getdtablesize () result. */ static int dtablesize; int getdtablesize (void) { if (dtablesize == 0) { /* We are looking for the number N such that the valid file descriptors are 0..N-1. It can be obtained through a loop as follows: { int fd; for (fd = 3; fd < 65536; fd++) if (dup2 (0, fd) == -1) break; return fd; } On Windows XP, the result is 2048. The drawback of this loop is that it allocates memory for a libc internal array that is never freed. The number N can also be obtained as the upper bound for _getmaxstdio (). _getmaxstdio () returns the maximum number of open FILE objects. The sanity check in _setmaxstdio reveals the maximum number of file descriptors. This too allocates memory, but it is freed when we call _setmaxstdio with the original value. */ int orig_max_stdio = _getmaxstdio (); unsigned int bound; for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2) ; _setmaxstdio (orig_max_stdio); dtablesize = bound; } return dtablesize; } #endif ������id-utils-4.6+git20120811/lib/getcwd-lgpl.c����������������������������������������������������������0000664�0000000�0000000�00000006042�12166360012�014525� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of gnulib. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification */ #include <unistd.h> #include <errno.h> #include <string.h> #if GNULIB_GETCWD /* Favor GPL getcwd.c if both getcwd and getcwd-lgpl modules are in use. */ typedef int dummy; #else /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Returns NULL if the directory couldn't be determined (perhaps because the absolute name was longer than PATH_MAX, or because of missing read/search permissions on parent directories) or SIZE was too small. If successful, returns BUF. If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # undef getcwd char * rpl_getcwd (char *buf, size_t size) { char *ptr; char *result; /* Handle single size operations. */ if (buf) { if (!size) { errno = EINVAL; return NULL; } return getcwd (buf, size); } if (size) { buf = malloc (size); if (!buf) { errno = ENOMEM; return NULL; } result = getcwd (buf, size); if (!result) { int saved_errno = errno; free (buf); errno = saved_errno; } return result; } /* Flexible sizing requested. Avoid over-allocation for the common case of a name that fits within a 4k page, minus some space for local variables, to be sure we don't skip over a guard page. */ { char tmp[4032]; size = sizeof tmp; ptr = getcwd (tmp, size); if (ptr) { result = strdup (ptr); if (!result) errno = ENOMEM; return result; } if (errno != ERANGE) return NULL; } /* My what a large directory name we have. */ do { size <<= 1; ptr = realloc (buf, size); if (ptr == NULL) { free (buf); errno = ENOMEM; return NULL; } buf = ptr; result = getcwd (buf, size); } while (!result && errno == ERANGE); if (!result) { int saved_errno = errno; free (buf); errno = saved_errno; } else { /* Trim to fit, if possible. */ result = realloc (buf, strlen (buf) + 1); if (!result) result = buf; } return result; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbsinit.c��������������������������������������������������������������0000664�0000000�0000000�00000003703�12166360012�013762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for initial conversion state. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #include "verify.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, 'mbstate_t' is defined as 'int'. */ int mbsinit (const mbstate_t *ps) { return ps == NULL || *ps == 0; } #else /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). We assume that - sizeof (mbstate_t) >= 4, - only stateless encodings are supported (such as UTF-8 and EUC-JP, but not ISO-2022 variants), - for each encoding, the number of bytes for a wide character is <= 4. (This maximum is attained for UTF-8, GB18030, EUC-TW.) We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ verify (sizeof (mbstate_t) >= 4); int mbsinit (const mbstate_t *ps) { const char *pstate = (const char *)ps; return pstate == NULL || pstate[0] == 0; } #endif �������������������������������������������������������������id-utils-4.6+git20120811/lib/memrchr.c��������������������������������������������������������������0000664�0000000�0000000�00000013101�12166360012�013743� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* memrchr -- find the last occurrence of a byte in a memory block Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2012 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). 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 <http://www.gnu.org/licenses/>. */ #if defined _LIBC # include <memcopy.h> #else # include <config.h> # define reg_char char #endif #include <string.h> #include <limits.h> #undef __memrchr #ifdef _LIBC # undef memrchr #endif #ifndef weak_alias # define __memrchr memrchr #endif /* Search no more than N bytes of S for C. */ void * __memrchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the last few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s + n; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n) if (*--char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *--longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) { longword_ptr++; break; } n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ while (n-- > 0) { if (*--char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memrchr, memrchr) #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/freopen.c��������������������������������������������������������������0000664�0000000�0000000�00000003333�12166360012�013752� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Open a stream to a file. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* If the user's config.h happens to include <stdio.h>, let it include only the system's <stdio.h> here, so that orig_freopen doesn't recurse to rpl_freopen. */ #define __need_FILE #include <config.h> /* Get the original definition of freopen. It might be defined as a macro. */ #include <stdio.h> #undef __need_FILE static inline FILE * orig_freopen (const char *filename, const char *mode, FILE *stream) { return freopen (filename, mode, stream); } /* Specification. */ /* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <stdio.h> above. */ #include "stdio.h" #include <string.h> FILE * rpl_freopen (const char *filename, const char *mode, FILE *stream) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (filename != NULL && strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif return orig_freopen (filename, mode, stream); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/argv-iter.c������������������������������������������������������������0000664�0000000�0000000�00000004723�12166360012�014220� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Iterate over arguments from argv or --files0-from=FILE Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "argv-iter.h" #include <stdlib.h> #include <string.h> struct argv_iterator { /* Test FP to determine whether in read-mode or argv-mode. */ /* file-mode: fp records position */ FILE *fp; size_t item_idx; char *tok; size_t buf_len; /* argv-mode: record just argv and current pointer */ char **arg_list; char **p; }; struct argv_iterator * argv_iter_init_argv (char **argv) { struct argv_iterator *ai = malloc (sizeof *ai); if (!ai) return NULL; ai->fp = NULL; ai->arg_list = argv; ai->p = argv; return ai; } /* Initialize to read from the stream, FP. The input is expected to contain a list of NUL-delimited tokens. */ struct argv_iterator * argv_iter_init_stream (FILE *fp) { struct argv_iterator *ai = malloc (sizeof *ai); if (!ai) return NULL; ai->fp = fp; ai->tok = NULL; ai->buf_len = 0; ai->item_idx = 0; ai->arg_list = NULL; return ai; } char * argv_iter (struct argv_iterator *ai, enum argv_iter_err *err) { if (ai->fp) { ssize_t len = getdelim (&ai->tok, &ai->buf_len, '\0', ai->fp); if (len < 0) { *err = feof (ai->fp) ? AI_ERR_EOF : AI_ERR_READ; return NULL; } *err = AI_ERR_OK; ai->item_idx++; return ai->tok; } else { if (*(ai->p) == NULL) { *err = AI_ERR_EOF; return NULL; } else { *err = AI_ERR_OK; return *(ai->p++); } } } size_t argv_iter_n_args (struct argv_iterator const *ai) { return ai->fp ? ai->item_idx : ai->p - ai->arg_list; } void argv_iter_free (struct argv_iterator *ai) { if (ai->fp) free (ai->tok); free (ai); } ���������������������������������������������id-utils-4.6+git20120811/lib/inttostr.c�������������������������������������������������������������0000664�0000000�0000000�00000000104�12166360012�014173� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define anytostr inttostr #define inttype int #include "anytostr.c" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/mbsrtowcs.c������������������������������������������������������������0000664�0000000�0000000�00000001756�12166360012�014346� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert string to wide string. Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #include <errno.h> #include <limits.h> #include <stdlib.h> #include "strnlen1.h" extern mbstate_t _gl_mbsrtowcs_state; #include "mbsrtowcs-impl.h" ������������������id-utils-4.6+git20120811/lib/argv-iter.h������������������������������������������������������������0000664�0000000�0000000�00000002565�12166360012�014227� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Iterate over arguments from argv or --files0-from=FILE Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <stdbool.h> /* Definition of _GL_ARG_NONNULL. */ #include "arg-nonnull.h" struct argv_iterator; enum argv_iter_err { AI_ERR_OK = 1, AI_ERR_EOF, AI_ERR_MEM, AI_ERR_READ }; struct argv_iterator *argv_iter_init_argv (char **argv) _GL_ARG_NONNULL ((1)); struct argv_iterator *argv_iter_init_stream (FILE *fp) _GL_ARG_NONNULL ((1)); char *argv_iter (struct argv_iterator *, enum argv_iter_err *) _GL_ARG_NONNULL ((1, 2)); size_t argv_iter_n_args (struct argv_iterator const *) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1)); void argv_iter_free (struct argv_iterator *) _GL_ARG_NONNULL ((1)); �������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/fchdir.c���������������������������������������������������������������0000664�0000000�0000000�00000013376�12166360012�013563� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fchdir replacement. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #include <assert.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include "dosname.h" #include "filenamecat.h" #ifndef REPLACE_OPEN_DIRECTORY # define REPLACE_OPEN_DIRECTORY 0 #endif /* This replacement assumes that a directory is not renamed while opened through a file descriptor. FIXME: On mingw, this would be possible to enforce if we were to also open a HANDLE to each directory currently visited by a file descriptor, since mingw refuses to rename any in-use file system object. */ /* Array of file descriptors opened. If REPLACE_OPEN_DIRECTORY or if it points to a directory, it stores info about this directory. */ typedef struct { char *name; /* Absolute name of the directory, or NULL. */ /* FIXME - add a DIR* member to make dirfd possible on mingw? */ } dir_info_t; static dir_info_t *dirs; static size_t dirs_allocated; /* Try to ensure dirs has enough room for a slot at index fd; free any contents already in that slot. Return false and set errno to ENOMEM on allocation failure. */ static bool ensure_dirs_slot (size_t fd) { if (fd < dirs_allocated) free (dirs[fd].name); else { size_t new_allocated; dir_info_t *new_dirs; new_allocated = 2 * dirs_allocated + 1; if (new_allocated <= fd) new_allocated = fd + 1; new_dirs = (dirs != NULL ? (dir_info_t *) realloc (dirs, new_allocated * sizeof *dirs) : (dir_info_t *) malloc (new_allocated * sizeof *dirs)); if (new_dirs == NULL) return false; memset (new_dirs + dirs_allocated, 0, (new_allocated - dirs_allocated) * sizeof *dirs); dirs = new_dirs; dirs_allocated = new_allocated; } return true; } /* Return an absolute name of DIR in malloc'd storage. */ static char * get_name (char const *dir) { char *cwd; char *result; int saved_errno; if (IS_ABSOLUTE_FILE_NAME (dir)) return strdup (dir); /* We often encounter "."; treat it as a special case. */ cwd = getcwd (NULL, 0); if (!cwd || (dir[0] == '.' && dir[1] == '\0')) return cwd; result = mfile_name_concat (cwd, dir, NULL); saved_errno = errno; free (cwd); errno = saved_errno; return result; } /* Hook into the gnulib replacements for open() and close() to keep track of the open file descriptors. */ /* Close FD, cleaning up any fd to name mapping if fd was visiting a directory. */ void _gl_unregister_fd (int fd) { if (fd >= 0 && fd < dirs_allocated) { free (dirs[fd].name); dirs[fd].name = NULL; } } /* Mark FD as visiting FILENAME. FD must be non-negative, and refer to an open file descriptor. If REPLACE_OPEN_DIRECTORY is non-zero, this should only be called if FD is visiting a directory. Close FD and return -1 if there is insufficient memory to track the directory name; otherwise return FD. */ int _gl_register_fd (int fd, const char *filename) { struct stat statbuf; assert (0 <= fd); if (REPLACE_OPEN_DIRECTORY || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))) { if (!ensure_dirs_slot (fd) || (dirs[fd].name = get_name (filename)) == NULL) { int saved_errno = errno; close (fd); errno = saved_errno; return -1; } } return fd; } /* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3, and fcntl. Both arguments must be valid and distinct file descriptors. Close NEWFD and return -1 if OLDFD is tracking a directory, but there is insufficient memory to track the same directory in NEWFD; otherwise return NEWFD. */ int _gl_register_dup (int oldfd, int newfd) { assert (0 <= oldfd && 0 <= newfd && oldfd != newfd); if (oldfd < dirs_allocated && dirs[oldfd].name) { /* Duplicated a directory; must ensure newfd is allocated. */ if (!ensure_dirs_slot (newfd) || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL) { int saved_errno = errno; close (newfd); errno = saved_errno; newfd = -1; } } else if (newfd < dirs_allocated) { /* Duplicated a non-directory; ensure newfd is cleared. */ free (dirs[newfd].name); dirs[newfd].name = NULL; } return newfd; } /* If FD is currently visiting a directory, then return the name of that directory. Otherwise, return NULL and set errno. */ const char * _gl_directory_name (int fd) { if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL) return dirs[fd].name; /* At this point, fd is either invalid, or open but not a directory. If dup2 fails, errno is correctly EBADF. */ if (0 <= fd) { if (dup2 (fd, fd) == fd) errno = ENOTDIR; } else errno = EBADF; return NULL; } /* Implement fchdir() in terms of chdir(). */ int fchdir (int fd) { const char *name = _gl_directory_name (fd); return name ? chdir (name) : -1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/stdio.in.h�������������������������������������������������������������0000664�0000000�0000000�00000140415�12207415437�014063� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <stdio.h>. Copyright (C) 2004, 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H /* Special invocation convention: - Inside glibc header files. - On OSF/1 5.1 we have a sequence of nested includes <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>. In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STDIO_H #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #undef _GL_ALREADY_INCLUDING_STDIO_H #ifndef _@GUARD_PREFIX@_STDIO_H #define _@GUARD_PREFIX@_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include <stdarg.h> #include <stddef.h> /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 and eglibc 2.11.2. */ #include <sys/types.h> /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif /* _GL_ATTRIBUTE_FORMAT_PRINTF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 and POSIX. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) #else # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) #endif /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, except that it indicates to GCC that the supported format string directives are the ones of the system printf(), rather than the ones standardized by ISO C99 and POSIX. */ #define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 and POSIX. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) #else # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) #endif /* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, except that it indicates to GCC that the supported format string directives are the ones of the system scanf(), rather than the ones standardized by ISO C99 and POSIX. */ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ && ! defined __GLIBC__ # include <unistd.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Macros for stringification. */ #define _GL_STDIO_STRINGIZE(token) #token #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); # else # if !@HAVE_DPRINTF@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); # endif _GL_CXXALIASWARN (dprintf); #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " "use gnulib module dprintf for portability"); # endif #endif #if @GNULIB_FCLOSE@ /* Close STREAM and its underlying file descriptor. */ # if @REPLACE_FCLOSE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fclose rpl_fclose # endif _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); # endif _GL_CXXALIASWARN (fclose); #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif #if @GNULIB_FDOPEN@ # if @REPLACE_FDOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); # else _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); #elif defined GNULIB_POSIXCHECK # undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); #endif #if @GNULIB_FFLUSH@ /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ # if @REPLACE_FFLUSH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fflush rpl_fflush # endif _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); # else _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fflush); #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif #if @GNULIB_FGETC@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fgetc # define fgetc rpl_fgetc # endif _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); # endif _GL_CXXALIASWARN (fgetc); #endif #if @GNULIB_FGETS@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fgets # define fgets rpl_fgets # endif _GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream) _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); # else _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); # endif _GL_CXXALIASWARN (fgets); #endif #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); # else _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); # endif _GL_CXXALIASWARN (fopen); #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); #endif #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fprintf rpl_fprintf # endif # define GNULIB_overrides_fprintf 1 # if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); # else _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); # endif _GL_CXXALIASWARN (fprintf); #endif #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_fprintf # undef fprintf # endif /* Assume fprintf is always declared. */ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "use gnulib module fprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ # if @REPLACE_FPURGE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fpurge rpl_fpurge # endif _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); # else # if !@HAVE_DECL_FPURGE@ _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fpurge); #elif defined GNULIB_POSIXCHECK # undef fpurge # if HAVE_RAW_DECL_FPURGE _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " "use gnulib module fpurge for portability"); # endif #endif #if @GNULIB_FPUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputc # define fputc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (fputc); #endif #if @GNULIB_FPUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputs # define fputs rpl_fputs # endif _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); # else _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); # endif _GL_CXXALIASWARN (fputs); #endif #if @GNULIB_FREAD@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fread # define fread rpl_fread # endif _GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((4))); _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # endif _GL_CXXALIASWARN (fread); #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freopen # define freopen rpl_freopen # endif _GL_FUNCDECL_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # else _GL_CXXALIAS_SYS (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # endif _GL_CXXALIASWARN (freopen); #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, "freopen on native Windows platforms is not POSIX compliant - " "use gnulib module freopen for portability"); #endif #if @GNULIB_FSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fscanf # define fscanf rpl_fscanf # endif _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); # else _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); # endif _GL_CXXALIASWARN (fscanf); #endif /* Set up the following warnings, based on which modules are in use. GNU Coding Standards discourage the use of fseek, since it imposes an arbitrary limitation on some 32-bit hosts. Remember that the fseek module depends on the fseeko module, so we only have three cases to consider: 1. The developer is not using either module. Issue a warning under GNULIB_POSIXCHECK for both functions, to remind them that both functions have bugs on some systems. _GL_NO_LARGE_FILES has no impact on this warning. 2. The developer is using both modules. They may be unaware of the arbitrary limitations of fseek, so issue a warning under GNULIB_POSIXCHECK. On the other hand, they may be using both modules intentionally, so the developer can define _GL_NO_LARGE_FILES in the compilation units where the use of fseek is safe, to silence the warning. 3. The developer is using the fseeko module, but not fseek. Gnulib guarantees that fseek will still work around platform bugs in that case, but we presume that the developer is aware of the pitfalls of fseek and was trying to avoid it, so issue a warning even when GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be defined to silence the warning in particular compilation units. In C++ compilations with GNULIB_NAMESPACE, in order to avoid that fseek gets defined as a macro, it is recommended that the developer uses the fseek module, even if he is not calling the fseek function. Most gnulib clients that perform stream operations should fall into category 3. */ #if @GNULIB_FSEEK@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif # if @REPLACE_FSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseek # define fseek rpl_fseek # endif _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); # else _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); # endif _GL_CXXALIASWARN (fseek); #endif #if @GNULIB_FSEEKO@ # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif # if @REPLACE_FSEEKO@ /* Provide an fseeko function that is aware of a preceding fflush(), and which detects pipes. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseeko # define fseeko rpl_fseeko # endif _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); # else # if ! @HAVE_DECL_FSEEKO@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); # endif _GL_CXXALIASWARN (fseeko); #elif defined GNULIB_POSIXCHECK # define _GL_FSEEK_WARN /* Category 1, above. */ # undef fseek # undef fseeko # if HAVE_RAW_DECL_FSEEKO _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " "use gnulib module fseeko for portability"); # endif #endif #ifdef _GL_FSEEK_WARN # undef _GL_FSEEK_WARN /* Here, either fseek is undefined (but C89 guarantees that it is declared), or it is defined as rpl_fseek (declared above). */ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " "on 32-bit platforms - " "use fseeko function for handling of large files"); #endif /* ftell, ftello. See the comments on fseek/fseeko. */ #if @GNULIB_FTELL@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell # endif # if @REPLACE_FTELL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftell # define ftell rpl_ftell # endif _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); # else _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); # endif _GL_CXXALIASWARN (ftell); #endif #if @GNULIB_FTELLO@ # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif # if @REPLACE_FTELLO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftello # define ftello rpl_ftello # endif _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); # else # if ! @HAVE_DECL_FTELLO@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); # endif _GL_CXXALIASWARN (ftello); #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell # undef ftello # if HAVE_RAW_DECL_FTELLO _GL_WARN_ON_USE (ftello, "ftello is unportable - " "use gnulib module ftello for portability"); # endif #endif #ifdef _GL_FTELL_WARN # undef _GL_FTELL_WARN /* Here, either ftell is undefined (but C89 guarantees that it is declared), or it is defined as rpl_ftell (declared above). */ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " "on 32-bit platforms - " "use ftello function for handling of large files"); #endif #if @GNULIB_FWRITE@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fwrite # define fwrite rpl_fwrite # endif _GL_FUNCDECL_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); /* Work around glibc bug 11959 <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, which sometimes causes an unwanted diagnostic for fwrite calls. This affects only function declaration attributes, so it's not needed for C++. */ # if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL static inline size_t _GL_ARG_NONNULL ((1, 4)) rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) { size_t r = fwrite (ptr, s, n, stream); (void) r; return r; } # undef fwrite # define fwrite rpl_fwrite # endif # endif _GL_CXXALIASWARN (fwrite); #endif #if @GNULIB_GETC@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getc # define getc rpl_fgetc # endif _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (getc, int, (FILE *stream)); # endif _GL_CXXALIASWARN (getc); #endif #if @GNULIB_GETCHAR@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getchar # define getchar rpl_getchar # endif _GL_FUNCDECL_RPL (getchar, int, (void)); _GL_CXXALIAS_RPL (getchar, int, (void)); # else _GL_CXXALIAS_SYS (getchar, int, (void)); # endif _GL_CXXALIASWARN (getchar); #endif #if @GNULIB_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETDELIM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdelim # define getdelim rpl_getdelim # endif _GL_FUNCDECL_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); _GL_CXXALIAS_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # else # if !@HAVE_DECL_GETDELIM@ _GL_FUNCDECL_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); # endif _GL_CXXALIAS_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # endif _GL_CXXALIASWARN (getdelim); #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " "use gnulib module getdelim for portability"); # endif #endif #if @GNULIB_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETLINE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getline # define getline rpl_getline # endif _GL_FUNCDECL_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); _GL_CXXALIAS_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # else # if !@HAVE_DECL_GETLINE@ _GL_FUNCDECL_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # endif # if @HAVE_DECL_GETLINE@ _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is unportable - " "use gnulib module getline for portability"); # endif #endif #if @GNULIB_GETS@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gets # define gets rpl_gets # endif _GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gets, char *, (char *s)); # else _GL_CXXALIAS_SYS (gets, char *, (char *s)); # undef gets # endif #endif #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_printf rpl_obstack_printf # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # endif _GL_CXXALIASWARN (obstack_printf); # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_vprintf rpl_obstack_vprintf # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # endif _GL_CXXALIASWARN (obstack_vprintf); #endif #if @GNULIB_PCLOSE@ # if !@HAVE_PCLOSE@ _GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); _GL_CXXALIASWARN (pclose); #elif defined GNULIB_POSIXCHECK # undef pclose # if HAVE_RAW_DECL_PCLOSE _GL_WARN_ON_USE (pclose, "popen is unportable - " "use gnulib module pclose for more portability"); # endif #endif #if @GNULIB_PERROR@ /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ # if @REPLACE_PERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define perror rpl_perror # endif _GL_FUNCDECL_RPL (perror, void, (const char *string)); _GL_CXXALIAS_RPL (perror, void, (const char *string)); # else _GL_CXXALIAS_SYS (perror, void, (const char *string)); # endif _GL_CXXALIASWARN (perror); #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif #if @GNULIB_POPEN@ # if @REPLACE_POPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef popen # define popen rpl_popen # endif _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else # if !@HAVE_POPEN@ _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); #elif defined GNULIB_POSIXCHECK # undef popen # if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); # endif #endif #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if defined __GNUC__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ # endif # if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # else # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define printf rpl_printf # endif _GL_FUNCDECL_RPL (printf, int, (const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); # endif # define GNULIB_overrides_printf 1 # else _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); # endif _GL_CXXALIASWARN (printf); #endif #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_printf # undef printf # endif /* Assume printf is always declared. */ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " "use gnulib module printf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_PUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putc # define putc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (putc); #endif #if @GNULIB_PUTCHAR@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putchar # define putchar rpl_putchar # endif _GL_FUNCDECL_RPL (putchar, int, (int c)); _GL_CXXALIAS_RPL (putchar, int, (int c)); # else _GL_CXXALIAS_SYS (putchar, int, (int c)); # endif _GL_CXXALIASWARN (putchar); #endif #if @GNULIB_PUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef puts # define puts rpl_puts # endif _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (puts, int, (const char *string)); # else _GL_CXXALIAS_SYS (puts, int, (const char *string)); # endif _GL_CXXALIASWARN (puts); #endif #if @GNULIB_REMOVE@ # if @REPLACE_REMOVE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remove # define remove rpl_remove # endif _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (remove, int, (const char *name)); # else _GL_CXXALIAS_SYS (remove, int, (const char *name)); # endif _GL_CXXALIASWARN (remove); #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " "use gnulib module remove for more portability"); #endif #if @GNULIB_RENAME@ # if @REPLACE_RENAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef rename # define rename rpl_rename # endif _GL_FUNCDECL_RPL (rename, int, (const char *old_filename, const char *new_filename) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (rename, int, (const char *old_filename, const char *new_filename)); # else _GL_CXXALIAS_SYS (rename, int, (const char *old_filename, const char *new_filename)); # endif _GL_CXXALIASWARN (rename); #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " "use gnulib module rename for more portability"); #endif #if @GNULIB_RENAMEAT@ # if @REPLACE_RENAMEAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef renameat # define renameat rpl_renameat # endif _GL_FUNCDECL_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # else # if !@HAVE_RENAMEAT@ _GL_FUNCDECL_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # endif _GL_CXXALIASWARN (renameat); #elif defined GNULIB_POSIXCHECK # undef renameat # if HAVE_RAW_DECL_RENAMEAT _GL_WARN_ON_USE (renameat, "renameat is not portable - " "use gnulib module renameat for portability"); # endif #endif #if @GNULIB_SCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if defined __GNUC__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ # define scanf __scanf__ # endif _GL_FUNCDECL_RPL_1 (__scanf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); # else # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf # define scanf rpl_scanf # endif _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); # endif # else _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); # endif _GL_CXXALIASWARN (scanf); #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif _GL_FUNCDECL_RPL (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *str, size_t size, const char *format, ...)); # else # if !@HAVE_DECL_SNPRINTF@ _GL_FUNCDECL_SYS (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *str, size_t size, const char *format, ...)); # endif _GL_CXXALIASWARN (snprintf); #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " "use gnulib module snprintf for portability"); # endif #endif /* Some people would argue that sprintf should be handled like gets (for example, OpenBSD issues a link warning for both functions), since both can cause security holes due to buffer overruns. However, we believe that sprintf can be used safely, and is more efficient than snprintf in those safe cases; and as proof of our belief, we use sprintf in several gnulib modules. So this header intentionally avoids adding a warning to sprintf except when GNULIB_POSIXCHECK is defined. */ #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); # else _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); # endif _GL_CXXALIASWARN (sprintf); #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "use gnulib module sprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_TMPFILE@ # if @REPLACE_TMPFILE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif _GL_CXXALIASWARN (tmpfile); #elif defined GNULIB_POSIXCHECK # undef tmpfile # if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); # endif #endif #if @GNULIB_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, (char **result, const char *format, ...)); # endif _GL_CXXALIASWARN (asprintf); # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, (char **result, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vasprintf); #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vdprintf rpl_vdprintf # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); # else # if !@HAVE_VDPRINTF@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be __va_list args. */ _GL_CXXALIAS_SYS_CAST (vdprintf, int, (int fd, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vdprintf); #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " "use gnulib module vdprintf for portability"); # endif #endif #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vfprintf rpl_vfprintf # endif # define GNULIB_overrides_vfprintf 1 # if @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vfprintf, int, (FILE *fp, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfprintf); #endif #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vfprintf # undef vfprintf # endif /* Assume vfprintf is always declared. */ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "use gnulib module vfprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VFSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef vfscanf # define vfscanf rpl_vfscanf # endif _GL_FUNCDECL_RPL (vfscanf, int, (FILE *stream, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vfscanf, int, (FILE *stream, const char *format, va_list args)); # else _GL_CXXALIAS_SYS (vfscanf, int, (FILE *stream, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfscanf); #endif #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vprintf rpl_vprintf # endif # define GNULIB_overrides_vprintf 1 # if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); # else /* Need to cast, because on Solaris, the second parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vprintf); #endif #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vprintf # undef vprintf # endif /* Assume vprintf is always declared. */ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "use gnulib module vprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef vscanf # define vscanf rpl_vscanf # endif _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vscanf); #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif _GL_FUNCDECL_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # else # if !@HAVE_DECL_VSNPRINTF@ _GL_FUNCDECL_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsnprintf); #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " "use gnulib module vsnprintf for portability"); # endif #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif _GL_FUNCDECL_RPL (vsprintf, int, (char *str, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *str, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vsprintf, int, (char *str, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsprintf); #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "use gnulib module vsprintf-posix for portable " "POSIX compliance"); #endif #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/isnanl.c���������������������������������������������������������������0000664�0000000�0000000�00000001525�12166360012�013601� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test for NaN that does not need libm. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #define USE_LONG_DOUBLE #include "isnan.c" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/alloca.c���������������������������������������������������������������0000664�0000000�0000000�00000034454�12166360012�013557� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* alloca.c -- allocate automatically reclaimed memory (Mostly) portable public-domain implementation -- D A Gwyn This implementation of the PWB library alloca function, which is used to allocate space off the run-time stack so that it is automatically reclaimed upon procedure exit, was inspired by discussions with J. Q. Johnson of Cornell. J.Otto Tennant <jot@cray.com> contributed the Cray support. There are some preprocessor constants that can be defined when compiling for your specific system, for improved efficiency; however, the defaults should be okay. The general concept of this implementation is to keep track of all alloca-allocated blocks, and reclaim any that are found to be deeper in the stack than the current invocation. This heuristic does not reclaim storage as soon as it becomes invalid, but it will do so eventually. As a special case, alloca(0) reclaims storage without allocating any. It is a good idea to use alloca(0) in your main control loop, etc. to force garbage collection. */ #include <config.h> #include <alloca.h> #include <string.h> #include <stdlib.h> #ifdef emacs # include "lisp.h" # include "blockinput.h" # ifdef EMACS_FREE # undef free # define free EMACS_FREE # endif #else # define memory_full() abort () #endif /* If compiling with GCC 2, this file's not needed. */ #if !defined (__GNUC__) || __GNUC__ < 2 /* If someone has defined alloca as a macro, there must be some other way alloca is supposed to work. */ # ifndef alloca # ifdef emacs # ifdef static /* actually, only want this if static is defined as "" -- this is for usg, in which emacs must undefine static in order to make unexec workable */ # ifndef STACK_DIRECTION you lose -- must know STACK_DIRECTION at compile-time /* Using #error here is not wise since this file should work for old and obscure compilers. */ # endif /* STACK_DIRECTION undefined */ # endif /* static */ # endif /* emacs */ /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ # if defined (CRAY) && defined (CRAY_STACKSEG_END) long i00afunc (); # define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) # else # define ADDRESS_FUNCTION(arg) &(arg) # endif /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ # ifndef STACK_DIRECTION # define STACK_DIRECTION 0 /* Direction unknown. */ # endif # if STACK_DIRECTION != 0 # define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ # else /* STACK_DIRECTION == 0; need run-time code. */ static int stack_dir; /* 1 or -1 once known. */ # define STACK_DIR stack_dir static int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } # endif /* STACK_DIRECTION == 0 */ /* An "alloca header" is used to: (a) chain together all alloca'ed blocks; (b) keep track of stack depth. It is very important that sizeof(header) agree with malloc alignment chunk size. The following default should work okay. */ # ifndef ALIGN_SIZE # define ALIGN_SIZE sizeof(double) # endif typedef union hdr { char align[ALIGN_SIZE]; /* To force sizeof(header). */ struct { union hdr *next; /* For chaining headers. */ char *deep; /* For stack depth measure. */ } h; } header; static header *last_alloca_header = NULL; /* -> last alloca header. */ /* Return a pointer to at least SIZE bytes of storage, which will be automatically reclaimed upon exit from the procedure that called alloca. Originally, this space was supposed to be taken from the current stack frame of the caller, but that method cannot be made to work for some implementations of C, for example under Gould's UTX/32. */ void * alloca (size_t size) { auto char probe; /* Probes stack depth: */ register char *depth = ADDRESS_FUNCTION (probe); # if STACK_DIRECTION == 0 if (STACK_DIR == 0) /* Unknown growth direction. */ STACK_DIR = find_stack_direction (NULL, (size & 1) + 20); # endif /* Reclaim garbage, defined as all alloca'd storage that was allocated from deeper in the stack than currently. */ { register header *hp; /* Traverses linked list. */ # ifdef emacs BLOCK_INPUT; # endif for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { register header *np = hp->h.next; free (hp); /* Collect garbage. */ hp = np; /* -> next header. */ } else break; /* Rest are not deeper. */ last_alloca_header = hp; /* -> last valid storage. */ # ifdef emacs UNBLOCK_INPUT; # endif } if (size == 0) return NULL; /* No allocation required. */ /* Allocate combined header + user data storage. */ { /* Address of header. */ register header *new; size_t combined_size = sizeof (header) + size; if (combined_size < sizeof (header)) memory_full (); new = malloc (combined_size); if (! new) memory_full (); new->h.next = last_alloca_header; new->h.deep = depth; last_alloca_header = new; /* User storage begins just after header. */ return (void *) (new + 1); } } # if defined (CRAY) && defined (CRAY_STACKSEG_END) # ifdef DEBUG_I00AFUNC # include <stdio.h> # endif # ifndef CRAY_STACK # define CRAY_STACK # ifndef CRAY2 /* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ struct stack_control_header { long shgrow:32; /* Number of times stack has grown. */ long shaseg:32; /* Size of increments to stack. */ long shhwm:32; /* High water mark of stack. */ long shsize:32; /* Current size of stack (all segments). */ }; /* The stack segment linkage control information occurs at the high-address end of a stack segment. (The stack grows from low addresses to high addresses.) The initial part of the stack segment linkage control information is 0200 (octal) words. This provides for register storage for the routine which overflows the stack. */ struct stack_segment_linkage { long ss[0200]; /* 0200 overflow words. */ long sssize:32; /* Number of words in this segment. */ long ssbase:32; /* Offset to stack base. */ long:32; long sspseg:32; /* Offset to linkage control of previous segment of stack. */ long:32; long sstcpt:32; /* Pointer to task common address block. */ long sscsnm; /* Private control structure number for microtasking. */ long ssusr1; /* Reserved for user. */ long ssusr2; /* Reserved for user. */ long sstpid; /* Process ID for pid based multi-tasking. */ long ssgvup; /* Pointer to multitasking thread giveup. */ long sscray[7]; /* Reserved for Cray Research. */ long ssa0; long ssa1; long ssa2; long ssa3; long ssa4; long ssa5; long ssa6; long ssa7; long sss0; long sss1; long sss2; long sss3; long sss4; long sss5; long sss6; long sss7; }; # else /* CRAY2 */ /* The following structure defines the vector of words returned by the STKSTAT library routine. */ struct stk_stat { long now; /* Current total stack size. */ long maxc; /* Amount of contiguous space which would be required to satisfy the maximum stack demand to date. */ long high_water; /* Stack high-water mark. */ long overflows; /* Number of stack overflow ($STKOFEN) calls. */ long hits; /* Number of internal buffer hits. */ long extends; /* Number of block extensions. */ long stko_mallocs; /* Block allocations by $STKOFEN. */ long underflows; /* Number of stack underflow calls ($STKRETN). */ long stko_free; /* Number of deallocations by $STKRETN. */ long stkm_free; /* Number of deallocations by $STKMRET. */ long segments; /* Current number of stack segments. */ long maxs; /* Maximum number of stack segments so far. */ long pad_size; /* Stack pad size. */ long current_address; /* Current stack segment address. */ long current_size; /* Current stack segment size. This number is actually corrupted by STKSTAT to include the fifteen word trailer area. */ long initial_address; /* Address of initial segment. */ long initial_size; /* Size of initial segment. */ }; /* The following structure describes the data structure which trails any stack segment. I think that the description in 'asdef' is out of date. I only describe the parts that I am sure about. */ struct stk_trailer { long this_address; /* Address of this block. */ long this_size; /* Size of this block (does not include this trailer). */ long unknown2; long unknown3; long link; /* Address of trailer block of previous segment. */ long unknown5; long unknown6; long unknown7; long unknown8; long unknown9; long unknown10; long unknown11; long unknown12; long unknown13; long unknown14; }; # endif /* CRAY2 */ # endif /* not CRAY_STACK */ # ifdef CRAY2 /* Determine a "stack measure" for an arbitrary ADDRESS. I doubt that "lint" will like this much. */ static long i00afunc (long *address) { struct stk_stat status; struct stk_trailer *trailer; long *block, size; long result = 0; /* We want to iterate through all of the segments. The first step is to get the stack status structure. We could do this more quickly and more directly, perhaps, by referencing the $LM00 common block, but I know that this works. */ STKSTAT (&status); /* Set up the iteration. */ trailer = (struct stk_trailer *) (status.current_address + status.current_size - 15); /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ if (trailer == 0) abort (); /* Discard segments that do not contain our argument address. */ while (trailer != 0) { block = (long *) trailer->this_address; size = trailer->this_size; if (block == 0 || size == 0) abort (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) break; } /* Set the result to the offset in this segment and add the sizes of all predecessor segments. */ result = address - block; if (trailer == 0) { return result; } do { if (trailer->this_size <= 0) abort (); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; } while (trailer != 0); /* We are done. Note that if you present a bogus address (one not in any segment), you will get a different number back, formed from subtracting the address of the first block. This is probably not what you want. */ return (result); } # else /* not CRAY2 */ /* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. Determine the number of the cell within the stack, given the address of the cell. The purpose of this routine is to linearize, in some sense, stack addresses for alloca. */ static long i00afunc (long address) { long stkl = 0; long size, pseg, this_segment, stack; long result = 0; struct stack_segment_linkage *ssptr; /* Register B67 contains the address of the end of the current stack segment. If you (as a subprogram) store your registers on the stack and find that you are past the contents of B67, you have overflowed the segment. B67 also points to the stack segment linkage control area, which is what we are really interested in. */ stkl = CRAY_STACKSEG_END (); ssptr = (struct stack_segment_linkage *) stkl; /* If one subtracts 'size' from the end of the segment, one has the address of the first word of the segment. If this is not the first segment, 'pseg' will be nonzero. */ pseg = ssptr->sspseg; size = ssptr->sssize; this_segment = stkl - size; /* It is possible that calling this routine itself caused a stack overflow. Discard stack segments which do not contain the target address. */ while (!(this_segment <= address && address <= stkl)) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); # endif if (pseg == 0) break; stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; this_segment = stkl - size; } result = address - this_segment; /* If you subtract pseg from the current end of the stack, you get the address of the previous stack segment's end. This seems a little convoluted to me, but I'll bet you save a cycle somewhere. */ while (pseg != 0) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o\n", pseg, size); # endif stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; result += size; } return (result); } # endif /* not CRAY2 */ # endif /* CRAY */ # endif /* no alloca */ #endif /* not GCC 2 */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/obstack.c��������������������������������������������������������������0000664�0000000�0000000�00000034051�12166360012�013743� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* obstack.c - subroutines used implicitly by object stack macros Copyright (C) 1988-1994, 1996-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 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 <http://www.gnu.org/licenses/>. */ #ifdef _LIBC # include <obstack.h> # include <shlib-compat.h> #else # include <config.h> # include "obstack.h" #endif /* NOTE BEFORE MODIFYING THIS FILE: This version number must be incremented whenever callers compiled using an old obstack.h can no longer properly call the functions in this obstack.c. */ #define OBSTACK_INTERFACE_VERSION 1 /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself, and the installed library supports the same library interface we do. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand 'configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 # include <gnu-versions.h> # if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #include <stddef.h> #ifndef ELIDE_CODE # include <stdint.h> /* Determine default alignment. */ union fooround { uintmax_t i; long double d; void *p; }; struct fooalign { char c; union fooround u; }; /* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT. But in fact it might be less smart and round addresses to as much as DEFAULT_ROUNDING. So we prepare for it to do that. */ enum { DEFAULT_ALIGNMENT = offsetof (struct fooalign, u), DEFAULT_ROUNDING = sizeof (union fooround) }; /* When we copy a long block of data, this is the unit to do it with. On some machines, copying successive ints does not work; in such a case, redefine COPYING_UNIT to 'long' (if that works) or 'char' as a last resort. */ # ifndef COPYING_UNIT # define COPYING_UNIT int # endif /* The functions allocating more room by calling 'obstack_chunk_alloc' jump to the handler pointed to by 'obstack_alloc_failed_handler'. This can be set to a user defined function which should either abort gracefully or use longjump - but shouldn't return. This variable by default points to the internal function 'print_and_abort'. */ static _Noreturn void print_and_abort (void); void (*obstack_alloc_failed_handler) (void) = print_and_abort; /* Exit value used when 'print_and_abort' is used. */ # include <stdlib.h> # ifdef _LIBC int obstack_exit_failure = EXIT_FAILURE; # else # include "exitfail.h" # define obstack_exit_failure exit_failure # endif # ifdef _LIBC # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) /* A looong time ago (before 1994, anyway; we're not sure) this global variable was used by non-GNU-C macros to avoid multiple evaluation. The GNU C library still exports it because somebody might use it. */ struct obstack *_obstack_compat; compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); # endif # endif /* Define a macro that either calls functions with the traditional malloc/free calling interface, or calls functions with the mmalloc/mfree interface (that adds an extra first argument), based on the state of use_extra_arg. For free, do not use ?:, since some compilers, like the MIPS compilers, do not allow (expr) ? void : void. */ # define CALL_CHUNKFUN(h, size) \ (((h) -> use_extra_arg) \ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size))) # define CALL_FREEFUN(h, old_chunk) \ do { \ if ((h) -> use_extra_arg) \ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ else \ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \ } while (0) /* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). Objects start on multiples of ALIGNMENT (0 means use default). CHUNKFUN is the function to use to allocate chunks, and FREEFUN the function to free them. Return nonzero if successful, calls obstack_alloc_failed_handler if allocation fails. */ int _obstack_begin (struct obstack *h, int size, int alignment, void *(*chunkfun) (long), void (*freefun) (void *)) { register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = DEFAULT_ALIGNMENT; if (size == 0) /* Default size is what GNU malloc can fit in a 4096-byte block. */ { /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. Use the values for range checking, because if range checking is off, the extra bytes won't be missed terribly, but if range checking is on and we used a larger request, a whole extra 4096 bytes would be allocated. These number are irrelevant to the new GNU malloc. I suspect it is less sensitive to the size of the request. */ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) + 4 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)); size = 4096 - extra; } h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; h->chunk_size = size; h->alignment_mask = alignment - 1; h->use_extra_arg = 0; chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); if (!chunk) (*obstack_alloc_failed_handler) (); h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size; chunk->prev = 0; /* The initial chunk now contains no empty object. */ h->maybe_empty_object = 0; h->alloc_failed = 0; return 1; } int _obstack_begin_1 (struct obstack *h, int size, int alignment, void *(*chunkfun) (void *, long), void (*freefun) (void *, void *), void *arg) { register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = DEFAULT_ALIGNMENT; if (size == 0) /* Default size is what GNU malloc can fit in a 4096-byte block. */ { /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc. Use the values for range checking, because if range checking is off, the extra bytes won't be missed terribly, but if range checking is on and we used a larger request, a whole extra 4096 bytes would be allocated. These number are irrelevant to the new GNU malloc. I suspect it is less sensitive to the size of the request. */ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)) + 4 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1)); size = 4096 - extra; } h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; h->chunk_size = size; h->alignment_mask = alignment - 1; h->extra_arg = arg; h->use_extra_arg = 1; chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); if (!chunk) (*obstack_alloc_failed_handler) (); h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size; chunk->prev = 0; /* The initial chunk now contains no empty object. */ h->maybe_empty_object = 0; h->alloc_failed = 0; return 1; } /* Allocate a new current chunk for the obstack *H on the assumption that LENGTH bytes need to be added to the current object, or a new object of length LENGTH allocated. Copies any partial object from the end of the old chunk to the beginning of the new one. */ void _obstack_newchunk (struct obstack *h, int length) { register struct _obstack_chunk *old_chunk = h->chunk; register struct _obstack_chunk *new_chunk; register long new_size; register long obj_size = h->next_free - h->object_base; register long i; long already; char *object_base; /* Compute size for new chunk. */ new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100; if (new_size < h->chunk_size) new_size = h->chunk_size; /* Allocate and initialize the new chunk. */ new_chunk = CALL_CHUNKFUN (h, new_size); if (!new_chunk) (*obstack_alloc_failed_handler) (); h->chunk = new_chunk; new_chunk->prev = old_chunk; new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; /* Compute an aligned object_base in the new chunk */ object_base = __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask); /* Move the existing object to the new chunk. Word at a time is fast and is safe if the object is sufficiently aligned. */ if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT) { for (i = obj_size / sizeof (COPYING_UNIT) - 1; i >= 0; i--) ((COPYING_UNIT *)object_base)[i] = ((COPYING_UNIT *)h->object_base)[i]; /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT, but that can cross a page boundary on a machine which does not do strict alignment for COPYING_UNITS. */ already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT); } else already = 0; /* Copy remaining bytes one by one. */ for (i = already; i < obj_size; i++) object_base[i] = h->object_base[i]; /* If the object just copied was the only data in OLD_CHUNK, free that chunk and remove it from the chain. But not if that chunk might contain an empty object. */ if (! h->maybe_empty_object && (h->object_base == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents, h->alignment_mask))) { new_chunk->prev = old_chunk->prev; CALL_FREEFUN (h, old_chunk); } h->object_base = object_base; h->next_free = h->object_base + obj_size; /* The new chunk certainly contains no empty object yet. */ h->maybe_empty_object = 0; } # ifdef _LIBC libc_hidden_def (_obstack_newchunk) # endif /* Return nonzero if object OBJ has been allocated from obstack H. This is here for debugging. If you use it in a program, you are probably losing. */ /* Suppress -Wmissing-prototypes warning. We don't want to declare this in obstack.h because it is just for debugging. */ int _obstack_allocated_p (struct obstack *h, void *obj); int _obstack_allocated_p (struct obstack *h, void *obj) { register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = (h)->chunk; /* We use >= rather than > since the object cannot be exactly at the beginning of the chunk but might be an empty object exactly at the end of an adjacent chunk. */ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj)) { plp = lp->prev; lp = plp; } return lp != 0; } /* Free objects in obstack H, including OBJ and everything allocate more recently than OBJ. If OBJ is zero, free everything in H. */ # undef obstack_free void __obstack_free (struct obstack *h, void *obj) { register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = h->chunk; /* We use >= because there cannot be an object at the beginning of a chunk. But there can be an empty object at that address at the end of another chunk. */ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj)) { plp = lp->prev; CALL_FREEFUN (h, lp); lp = plp; /* If we switch chunks, we can't tell whether the new current chunk contains an empty object, so assume that it may. */ h->maybe_empty_object = 1; } if (lp) { h->object_base = h->next_free = (char *) (obj); h->chunk_limit = lp->limit; h->chunk = lp; } else if (obj != 0) /* obj is not in any of the chunks! */ abort (); } # ifdef _LIBC /* Older versions of libc used a function _obstack_free intended to be called by non-GCC compilers. */ strong_alias (obstack_free, _obstack_free) # endif int _obstack_memory_used (struct obstack *h) { register struct _obstack_chunk* lp; register int nbytes = 0; for (lp = h->chunk; lp != 0; lp = lp->prev) { nbytes += lp->limit - (char *) lp; } return nbytes; } /* Define the error handler. */ # ifdef _LIBC # include <libintl.h> # else # include "gettext.h" # endif # ifndef _ # define _(msgid) gettext (msgid) # endif # ifdef _LIBC # include <libio/iolibio.h> # endif static _Noreturn void print_and_abort (void) { /* Don't change any of these strings. Yes, it would be possible to add the newline to the string and use fputs or so. But this must not happen because the "memory exhausted" message appears in other places like this and the translation should be reused instead of creating a very similar string which requires a separate translation. */ # ifdef _LIBC (void) __fxprintf (NULL, "%s\n", _("memory exhausted")); # else fprintf (stderr, "%s\n", _("memory exhausted")); # endif exit (obstack_exit_failure); } #endif /* !ELIDE_CODE */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lib/float+.h���������������������������������������������������������������0000664�0000000�0000000�00000013056�12166360012�013504� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Supplemental information about the floating-point formats. Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H #include <float.h> #include <limits.h> /* Number of bits in the mantissa of a floating-point number, including the "hidden bit". */ #if FLT_RADIX == 2 # define FLT_MANT_BIT FLT_MANT_DIG # define DBL_MANT_BIT DBL_MANT_DIG # define LDBL_MANT_BIT LDBL_MANT_DIG #elif FLT_RADIX == 4 # define FLT_MANT_BIT (FLT_MANT_DIG * 2) # define DBL_MANT_BIT (DBL_MANT_DIG * 2) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) #elif FLT_RADIX == 16 # define FLT_MANT_BIT (FLT_MANT_DIG * 4) # define DBL_MANT_BIT (DBL_MANT_DIG * 4) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) #endif /* Bit mask that can be used to mask the exponent, as an unsigned number. */ #define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) #define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) #define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) /* Number of bits used for the exponent of a floating-point number, including the exponent's sign. */ #define FLT_EXP_BIT \ (FLT_EXP_MASK < 0x100 ? 8 : \ FLT_EXP_MASK < 0x200 ? 9 : \ FLT_EXP_MASK < 0x400 ? 10 : \ FLT_EXP_MASK < 0x800 ? 11 : \ FLT_EXP_MASK < 0x1000 ? 12 : \ FLT_EXP_MASK < 0x2000 ? 13 : \ FLT_EXP_MASK < 0x4000 ? 14 : \ FLT_EXP_MASK < 0x8000 ? 15 : \ FLT_EXP_MASK < 0x10000 ? 16 : \ FLT_EXP_MASK < 0x20000 ? 17 : \ FLT_EXP_MASK < 0x40000 ? 18 : \ FLT_EXP_MASK < 0x80000 ? 19 : \ FLT_EXP_MASK < 0x100000 ? 20 : \ FLT_EXP_MASK < 0x200000 ? 21 : \ FLT_EXP_MASK < 0x400000 ? 22 : \ FLT_EXP_MASK < 0x800000 ? 23 : \ FLT_EXP_MASK < 0x1000000 ? 24 : \ FLT_EXP_MASK < 0x2000000 ? 25 : \ FLT_EXP_MASK < 0x4000000 ? 26 : \ FLT_EXP_MASK < 0x8000000 ? 27 : \ FLT_EXP_MASK < 0x10000000 ? 28 : \ FLT_EXP_MASK < 0x20000000 ? 29 : \ FLT_EXP_MASK < 0x40000000 ? 30 : \ FLT_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define DBL_EXP_BIT \ (DBL_EXP_MASK < 0x100 ? 8 : \ DBL_EXP_MASK < 0x200 ? 9 : \ DBL_EXP_MASK < 0x400 ? 10 : \ DBL_EXP_MASK < 0x800 ? 11 : \ DBL_EXP_MASK < 0x1000 ? 12 : \ DBL_EXP_MASK < 0x2000 ? 13 : \ DBL_EXP_MASK < 0x4000 ? 14 : \ DBL_EXP_MASK < 0x8000 ? 15 : \ DBL_EXP_MASK < 0x10000 ? 16 : \ DBL_EXP_MASK < 0x20000 ? 17 : \ DBL_EXP_MASK < 0x40000 ? 18 : \ DBL_EXP_MASK < 0x80000 ? 19 : \ DBL_EXP_MASK < 0x100000 ? 20 : \ DBL_EXP_MASK < 0x200000 ? 21 : \ DBL_EXP_MASK < 0x400000 ? 22 : \ DBL_EXP_MASK < 0x800000 ? 23 : \ DBL_EXP_MASK < 0x1000000 ? 24 : \ DBL_EXP_MASK < 0x2000000 ? 25 : \ DBL_EXP_MASK < 0x4000000 ? 26 : \ DBL_EXP_MASK < 0x8000000 ? 27 : \ DBL_EXP_MASK < 0x10000000 ? 28 : \ DBL_EXP_MASK < 0x20000000 ? 29 : \ DBL_EXP_MASK < 0x40000000 ? 30 : \ DBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define LDBL_EXP_BIT \ (LDBL_EXP_MASK < 0x100 ? 8 : \ LDBL_EXP_MASK < 0x200 ? 9 : \ LDBL_EXP_MASK < 0x400 ? 10 : \ LDBL_EXP_MASK < 0x800 ? 11 : \ LDBL_EXP_MASK < 0x1000 ? 12 : \ LDBL_EXP_MASK < 0x2000 ? 13 : \ LDBL_EXP_MASK < 0x4000 ? 14 : \ LDBL_EXP_MASK < 0x8000 ? 15 : \ LDBL_EXP_MASK < 0x10000 ? 16 : \ LDBL_EXP_MASK < 0x20000 ? 17 : \ LDBL_EXP_MASK < 0x40000 ? 18 : \ LDBL_EXP_MASK < 0x80000 ? 19 : \ LDBL_EXP_MASK < 0x100000 ? 20 : \ LDBL_EXP_MASK < 0x200000 ? 21 : \ LDBL_EXP_MASK < 0x400000 ? 22 : \ LDBL_EXP_MASK < 0x800000 ? 23 : \ LDBL_EXP_MASK < 0x1000000 ? 24 : \ LDBL_EXP_MASK < 0x2000000 ? 25 : \ LDBL_EXP_MASK < 0x4000000 ? 26 : \ LDBL_EXP_MASK < 0x8000000 ? 27 : \ LDBL_EXP_MASK < 0x10000000 ? 28 : \ LDBL_EXP_MASK < 0x20000000 ? 29 : \ LDBL_EXP_MASK < 0x40000000 ? 30 : \ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) /* Number of bits used for a floating-point number: the mantissa (not counting the "hidden bit", since it may or may not be explicit), the exponent, and the sign. */ #define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) #define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) #define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) /* Number of bytes used for a floating-point number. This can be smaller than the 'sizeof'. For example, on i386 systems, 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but sizeof (long double) = 12 or = 16. */ #define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) /* Verify that SIZEOF_FLT <= sizeof (float) etc. */ typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; #endif /* _FLOATPLUS_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/README���������������������������������������������������������������������0000664�0000000�0000000�00000002760�12166360012�012265� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is the GNU idutils package. It provides simple, fast, high-capacity, language-independent identifier database tools. Actually, the term `identifier' is too limiting--`mkid' stores tokens, be they program identifiers of any form, literal numbers, or words of human-readable text. Database queries can be issued from the command-line, or from within emacs, serving as an augmented tags facility. `mkid' was originally written by Greg McGary <gkm@gnu.ai.mit.edu> and posted to comp.sources.unix in September 1987. It was then maintained and enhanced by a loose knit group of programmers on the Internet led by Tom Horsley <Tom.Horsley@mail.hcsc.com>. Tom released `mkid2' on comp.sources.unix in March, 1991. Greg McGary resumed maintenance until 2000. See file `COPYING' for copying conditions. See file `INSTALL' for compilation and installation instructions. See file `NEWS' for a list of major changes in the current release. See file `THANKS' for a list of contributors. See file `TODO' for planned enhancements. For any copyright year range specified as YYYY-ZZZZ in this package note that the range specifies every single year in that closed interval. Mail suggestions and bug reports for these programs to <bug-idutils@gnu.org>. Please describe bugs completely: your input, what you expected, what you got, and why it is wrong. Diffs are welcome, but please include a description of the problem as well, since this is sometimes difficult to infer. Local Variables: mode: text fill-column: 75 End: ����������������id-utils-4.6+git20120811/po/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465164�012022� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/da.po�������������������������������������������������������������������0000664�0000000�0000000�00000070072�12166360012�012750� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Danish messages for idutils # Copyright (C) 2000 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Keld Simonsen <keld@keldix.com>, 2000,2011. # Christian Rose <menthos@menthos.com>, 2000. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2011-01-09 00:32+01:00\n" "Last-Translator: Keld Simonsen <keld@keldix.com>\n" "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "skrivefejl" #: lib/error.c:188 msgid "Unknown system error" msgstr "Ukeldt systemfejl" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: flaget '%s' er flertydig\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: flaget '--%s' tillader ikke et argument\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: flaget '%c%s' tillader ikke et argument\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: flaget '%s' krver et argument\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: ukendt flag '--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: ukendt flag '%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ugyldigt flag -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: flaget krver et argument -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: flaget '-W %s' er flertydig\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: flaget '-W --%s' tillader ikke et argument\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: flaget '-W %s' krver et argument\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "hukommelsen er opbrugt" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "kan ikke f fat p aktuelt katalog" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "kan ikke g tilbage til det frste arbejdskatalog" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "'" #: lib/quotearg.c:312 msgid "'" msgstr "'" #: lib/regcomp.c:131 msgid "Success" msgstr "Lykkedes" #: lib/regcomp.c:134 msgid "No match" msgstr "Ingen trffer" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Ugyldigt regulrt udtryk" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Ugyldtigt sorteringstegn" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Efterflgende baglns skrstreg" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Ugyldig tilbagereference" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Uparret [ eller [^" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Uparret ( eller \\ " #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Uparret \\{ " #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ugyldigt indhold af \\{\\}" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Ugyldig intervalafslutning" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Hukommelse opbrugt" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregende regulrt udtryk" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Uafsluttet slutning p regulrt udtryk" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Regulrt udtryk for stort" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Uparret ) eller \\)" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Intet foregende regulrt udtryk" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "ugyldig '--separator'-stil: '%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "kan ikke bestemme 'io_size' i en streng!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "kan ikke bne '%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "'%s' er ingen ID-fil! (fejlagtigt magisk nummer)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "'%s' er version %d men jeg forstr kun version %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "ikke-understttet strrelse i io_read(): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "ukendt I/O-type: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "kan ikke allokere %ld byte til hashtabel: lbet tr for hukommelse" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Udnyttelse=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Omhash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Kollisioner=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "ikke-understttet strrelse i io_write(): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "ukendt sprog: '%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "kan ikke allokere obstack for sprogargument: lbet tr for hukommelse" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "kan ikke allokere sprogargument: lbet tr for hukommelse" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "et sprognavn forventedes efter '%s' i filen '%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "kan ikke bne sprogtabelfilen '%s'" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "kan ikke finde strrelsen p tabelfilen '%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "kan ikke lse sprogtabelfilen '%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "kan ikke lse hele sprogtabelfilen '%s'" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sproget C:\n" " -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet\n" " -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet " "bort\n" " -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sproget C++:\n" " -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet\n" " -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet " "bort\n" " -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sproget Java:\n" " -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet\n" " -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet " "bort\n" " -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "affald: '%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "affald: '\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assemblersprog:\n" " -c,--comment=TEGN Ethvert af disse TEGN begynder en kommentar som " "fortstter\n" " frem til linjeslut\n" " -k,--keep=TEGN Tillad TEGN i symboler og gem resultatet\n" " -i,--ignore=TEGN Tillad TEGN i symboler og kast resultatet bort\n" " -u,--strip-underscore Fjern indledende understreg fra symboler\n" " -n,--no-cpp Behandl ikke C-prprocessorkommandoer\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Textsprog:\n" " -i,--include=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolbestandsdele\n" " -x,--exclude=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolafgrnsere\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Sproget Perl:\n" " -i,--include=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolbestandsdele\n" " -x,--exclude=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolafgrnsere\n" " -d,--dtags Inkludr dokumentationsmrker\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Sproget Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "kan ikke lse kataloget '%s' ('.' fra '%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "bemrk: '%s' var en %s, men er nu en %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "fil" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "katalog" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "advarsel: '%s' og '%s' er samme fil men giver forskellige fortolkninger!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "bemrk: fortolkningsparametrerne for '%s' ndredes" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "kan ikke blande tilvalgene --include og --exclude" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "kan ikke f fat p aktuel katalog" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "kan ikke skifte katalog til '%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "kan ikke skifte katalog til '%s' fra '%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "kan ikke tage status (lstat(2)) p '%s' fra '%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "kan ikke tage status (stat(2)) p '%s' fra '%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Prv '%s --help' for mere information.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Brug: %s [FLAG] FILNAVN [FILNAVN2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "List de identifikatorer som findes i FILNAVN eller, hvis ogs\n" "FILNAVN2 angives, de identifikatorer som findes i begge filer.\n" "\n" " -f, --file=FIL ID-databasens filnavn\n" " --help vis denne hjlpetekst og afslut\n" " --version udskriv versionsinformation og afslut\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Rapportr fejl til " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "ingen filnavnsargumenter" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "for mange filnavnsargumenter" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "kan ikke finde 'ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "'%s' er flertydig" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "kunne ikke finde '%s'" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Brug: %s [FLAG]... [MNSTER]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Udskriv navnene p de filer hvis indhold passer med MNSTER,\n" "ved at bruge jokertegn som i skallen.\n" " -f, --file=FIL ID-databasens filnavn\n" " -S, --separator=STIL STIL er en af 'braces', 'space' eller 'newline'\n" " --help vis denne hjlpetekst og afslut\n" " --version udskriv versionsinformation og afslut\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Brug: %s [FLAG]... MNSTER...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Sprg ID-databasen og rapportr resultaterne.\n" "Som standard bestr uddata af flere linjer hvor hver linje indeholder den\n" "matchede identifikator, efterfulgt af en liste med navnene p de filer i " "hvilken\n" "den forekommer.\n" "\n" " -f, --file=FIL ID-databasens filnavn\n" "\n" " -i, --ignore-case match MNSTER uden forskel p store og sm " "bogstaver\n" " -l, --literal match MNSTER som en bogstavelig streng\n" " -r, --regexp match MNSTER som et regulrt udtryk\n" " -w, --word match MNSTER som et afgrnset ord\n" " -s, --substring match MNSTER som en delstreng\n" " Bemrk: Hvis MNSTER indeholder metategn i udvidet regulrt\n" " udtryk tolkes det som en regulr udtryksstreng.\n" " Ellers betragtes det som en bogstavelig streng.\n" "\n" " -k, --key=STIL STIL er en af 'token', 'pattern' eller 'none'\n" " -R, --result=STIL STIL er en af 'filenames', 'grep', 'edit' eller " "'none'\n" " -S, --separator=STIL STIL er en af 'braces', 'space' eller 'newline' og\n" " glder kun for filnavne hvis '--result=filenames'\n" " STIL-flagene ovenfor bestemmer hvordan forsprgselsresultat " "prsenteres.\n" " Standardvrdien er --key=token --result=filenames --separator=" "%s\n" "\n" " -F, --frequency=FREK sg efter symboler som forekommer FREK gange, hvor " "FREK er\n" " et interval som angives som 'N..M'. Hvis N udelades\n" " antages det at vre 1, om M udelades antages det at " "vre\n" " MAX_USHRT\n" " -a, --ambiguous=LNGDE sg efter symboler hvis navn er tvetydigt inden for " "LNGDE tegn\n" "\n" " -x, --hex sg kun efter tal som angives heksadecimalt\n" " -d, --decimal sg kun efter tal som angives decimalt\n" " -o, --octal sg kun efter tal som angives oktalt\n" " Som standard sges efter alle tal uanset base.\n" "\n" " --help vis denne hjlpetekst og afslut\n" " --version vis versionsinformation og afslut\n" #: src/lid.c:283 msgid "braces" msgstr "parenteser" #: src/lid.c:283 msgid "space" msgstr "mellemrum" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "bemrk: brug af '-e' er forldet, brug '-r' istedet" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Alle identifikatorer er utvetydige de frste %d tegn\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "ugyldig '--key'-stil: '%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "ugyldig '--result'-stil: '%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "kan ikke tolke regulrt udtryk: lbet tr for hukommelse" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "redigr? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "kan ikke forgrene" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "kan ikke kre '%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Brug: %s [FLAG]... [FIL]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Byg en database over identifikatorer.\n" " -o, --output=UDFIL filnavn p ID-database\n" " -f, --file=UDFIL synonym for --output\n" " -i, --include=SPROG inkludr SPROG (standardvrdi: 'C C++ asm')\n" " -x, --exclude=SPROG udelad SPROG\n" " -l, --lang-option=S:FLG videresend FLG som standard for sproget S (se " "nedenfor)\n" " -m, --lang-map=TABELFIL brug TABELFIL for at associere filnavn med\n" " rette kildetekstsprog\n" " -d, --default-lang=SPROG brug SPROG som standardsprog\n" " -p, --prune=NAVN udelad de angivne filer og/eller kataloger\n" " -v, --verbose udskriv statistik for hver fil\n" " -s, --statistics udskriv statistik i slutningen af krslen\n" "\n" " --files0-from=F lav kun symboler af filerne angivet ved\n" " NUL-terminerede navne i filen F\n" "\n" " --help vis denne hjlpetekst og afslut\n" " --version vis versionsinformation og afslut\n" "\n" "FIL kan vre et filnavn eller et katalognavn (for rekursiv sgning).\n" "Hvis ingen FIL angives gennemsges det nuvrende katalog som standard.\n" "Bemrk at '--include'- og '--exclude'-flagene er gensidigt\n" "udelukkende.\n" "\n" "De flgende flag pvirker de sprogspecifikke fortolkere:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "ekstra operand %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "filoperander kan ikke kombineres med --files0-from" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "kan ikke bne %s til lsning" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: lsefejl" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "ved lsning af filnavne fra stdin tillades filnavnet %s ikke" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "ugyldigt filnavn med lngden nul" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "ingentig at lave" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "kan ikke oprette '%s' i '%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "kan ikke ndre '%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "kan ikke tage status p '%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " ny = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Navn=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Tal=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Streng=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Bogstaveligt=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Kommentar=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Filer=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Symboler=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Byte=%ld kB, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%llu+%llu Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Uddata=%ld (%ld symboler, %ld trffere)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", frekvens=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sorterer symboler...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Skriver '%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "kan ikke oprette '%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "intern begrnsning: afst p 2^32 eller mere" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "fejl ved lukning af '%s'" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "niveau %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Udskriv alle symboler fundet i en kildetekst.\n" " -i, --include=SPROG inkludr sprog i SPROG (standardvrdi: 'C C++ " "asm')\n" " -x, --exclude=SPROG udelad sprog i SPROG\n" " -l, --lang-option=S:FLG videresend FLG som standard for sproget S (se " "nedenfor)\n" " -m, --lang-map=TABELFIL brug TABELFIL for at associere filnavn med\n" " rette kildetekstsprog\n" " -d, --default-lang=SPROG brug SPROG som standardsprog\n" " -p, --prune=NAVNE udelad de angivne filer og/eller kataloger\n" "\n" " --files0-from=F lav kun symboler af filerne angivet ved\n" " NUL-terminerede navne i fil F\n" "\n" " --help vis denne hjlpetekst og afslut\n" " --version vis versionsinformation og afslut\n" "\n" "De flgende flag pvirker de sprogspecifikke fortolkere:\n" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/sv.gmo������������������������������������������������������������������0000664�0000000�0000000�00000025172�12166360012�013161� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������S��������q���L������������� ���"�����0��A���E��e����������������� ����� �� ��� �� ��� ����� ����� ����) �� ���2 �����@ �� ���V �� ���a �����n ����� ��9��d�� ���������� ���������� ���x��&�����(�����!����� �����#��������<�����M��%���_��.���������������9�����6�����.���;�����j�����~������������(���������� �������� �����,�����H�����Z��0���u������������!�����)�����(�����!���=�����_�����o�� ������������������������������!����� ����� ���&��2���4�����g�������'�����(�����3�������������%�����B�����W��"���s��#�����D�����g����W���g�� ����������8��������� ������������������������� ����������������������� �����0�� ���M�� ���X��$���b�������]�� �� ���!�����!�� ���"�����"�����"��(���"��,���#��(���F#��%���o#��*���#�����#�����#��1���#��5���$�����K$�� ���a$��7���l$��:���$��-���$����� %��*���-%�����X%�����l%��,���%�����%�����%��3���%��$��� &�����0&��1���D&��.���v&�����&�����&��&���&��.���&��*���('��%���S'�����y'��0���'�����'�����'�����'������(�����(�����(�� ���=(�� ���^(�����k(��4���{(�����(�����(��.���(��6���)��H���H)�� ���)�����)�����)�����)��&���)��'���*��K���.*��������>���������������A�������F��� ����������E���0����������%���(���H���!������8�������:�����������������G���@���)���N������J�������������"��� ���L������2��������������9�������-���*�������#���&���/���1���6���7���'���=���O������S���D������R���������� �������4���K���P�������C���5���������I����������$��� ���B�������;�������������Q�����������M���+����������������������3��� �����������<���?��������������������,���.��������� ���� Report bugs to � new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �error closing `%s'�file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: idutils 4.2 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2008-03-09 21:11+0100 Last-Translator: Christian Rose <menthos@menthos.com> Language-Team: Swedish <tp-sv@listor.tp-sv.se> Language: sv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit � Skicka synpunkter på översättningen till tp-sv@listor.tp-sv.se Rapportera fel till � ny = %d/%d�, frekvens=%ld/%ld=%.2f �Alla identifierare är otvetydiga de första %d tecknen �Assemblerspråk: -c,--comment=TECKEN Något av TECKEN påbörjar en kommentar som gäller fram till radslut -k,--keep=TECKEN Tillåt TECKEN i symboler och spara resultatet -i,--ignore=TECKEN Tillåt TECKEN i symboler och släng resultatet -u,--strip-underscore Ta bort inledande understreck från symboler -n,--no-cpp Hantera inte C-preprocessorkommandon �Byte=%ld kB, �Språket C: -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll resultatet -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng resultatet -u,--strip-underscore Ta bort inledande understreck från ensymbolssträngar �Språket C++: -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll resultatet -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng resultatet -u,--strip-underscore Ta bort inledande understreck från ensymbolssträngar �Kollisioner=%ld/%ld=%.0f%%�Kommentar=%ld �Filer=%ld, �Språket Java: -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll resultatet -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng resultatet -u,--strip-underscore Ta bort inledande understreck från ensymbolssträngar �Språket Lisp: �Lista de identifierare som finns i FILNAMN eller, om även FILNAMN2 anges, de identifierare som finns i båda filerna. -f, --file=FIL ID-databasens filnamn --help visa denna hjälp och avsluta --version skriv ut versionsinformation och avsluta �Ordagrann=%ld, �Utnyttjande=%ld/%ld=%.0f%%, �Namn=%ld, �Tal=%ld, �Utdata=%ld (%ld symbol, %ld träff) �Språket Perl: -i,--include=TECKENKLASS Behandla tecken i TECKENKLASS som symbol- beståndsdelar -x,--exclude=TECKENKLASS Behandla tecken i TECKENKLASS som symbolavgränsare -d,--dtags Inkludera dokumentationstaggar �Skriv ut namnen på de filer vars innehåll matchar MÖNSTER, genom att använda skalliknande jokertecken. -f, --file=FIL ID-databasens filnamn -S, --separator=STIL STIL är en av "braces", "space" eller "newline" --help visa denna hjälp och avsluta --version skriv ut versionsinformation och avsluta �Omhash=%d, �Sorterar symboler... �Sträng=%ld, �Textspråk: -i,--include=TECKENKLASS Behandla tecken i TECKENKLASS som symbol- beståndsdelar -x,--exclude=TECKENKLASS Behandla tecken i TECKENKLASS som symbolavgränsare �Symboler=%ld, �Prova "%s --help" för mer information. �Användning: %s [FLAGGA] FILNAMN [FILNAMN2] �Användning: %s [FLAGGA]... MÖNSTER... �Användning: %s [FLAGGA]... [FIL]... �Användning: %s [FLAGGA]... [MÖNSTER]... �Skriver "%s"... �"%s" är tvetydig�"%s" är ingen ID-fil! (felaktigt magiskt nummer)�"%s" är version %d men jag förstår bara version %d�kunde inte hitta "%s"�parenteser�kan inte allokera %ld byte till hashtabell: minnet slut�kan inte allokera obstack för språkargument: minnet slut�kan inte allokera språkargument: minnet slut�kan inte byta katalog till "%s"�kan inte byta katalog till "%s" från "%s"�kan inte skapa "%s"�kan inte skapa "%s" i "%s"�kan inte bestämma "io_size" hos en sträng!�kan inte köra "%s"�kan inte grena�kan inte ta reda på storleken hos tabellfilen "%s"�kan inte ta reda på aktuell katalog�kan inte hitta "ID"�kan inte ta status (lstat(2)) på "%s" från "%s"�kan inte tolka reguljärt uttryck: minnet slut�kan inte modifiera "%s"�kan inte öppna "%s"�kan inte öppna språktabellfilen "%s"�kan inte läsa katalogen "%s" ("." från "%s")�kan inte läsa hela språktabellfilen "%s"�kan inte läsa språktabellfilen "%s"�kan inte ta status på "%s"�kan inte ta status (stat(2)) på "%s" från "%s"�katalog�redigera? [y1-9^S/nq] �fel vid stängning av "%s"�fil�ogiltig "--key"-stil: "%s"�ogiltig "--result"-stil: "%s"�ogiltig "--separator"-stil: "%s"�skräp: "%c"�skräp: "\%03o"�ett språknamn förväntades efter "%s" i filen "%s"�nivå %d: %ld/%ld = %.0f%% �inga filnamnsargument�anmärkning: "%s" var en %s, men är nu en %s!�anmärkning: läsningsparametrarna för "%s" ändrades�anmärkning: användning av "-e" är föråldrat, använd "-r" istället�blanksteg�för många filnamnsargument�okänd I/O-typ: %d�okänt språk: "%s"�ej understödd storlek i io_read(): %d�ej understödd storlek i io_write(): %d�varning: "%s" och "%s" är samma fil men genererade olika läsningsavtryck!�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ru.po�������������������������������������������������������������������0000664�0000000�0000000�00000105505�12166360012�013012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# translation of idutils-4.5.ru.po to Russian # Перевод id-utils # Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # # Denis Perchine <dyp@perchine.com>, 2000. # Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010. msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-06-18 18:24+0400\n" "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" "Language-Team: Russian <gnu@mx.ru>\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/closeout.c:112 msgid "write error" msgstr "ошибка записи" #: lib/error.c:188 msgid "Unknown system error" msgstr "Неизвестная системная ошибка" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: ключ %s неоднозначен\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: ключу --%s не требуется аргумент\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: ключу %c%s не требуется аргумент\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: ключу --%s требуется аргумент\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: неизвестный ключ --%s\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: неизвестный ключ %c%s\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: неверный ключ -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: ключу требуется аргумент -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: ключ -W%s неоднозначен\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: ключу -W%s не требуется аргумент\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: ключу -W%s требуется аргумент\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "исчерпана память" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "не удалось запомнить текущий рабочий каталог" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "не удалось вернуть начальный рабочий каталог" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "«" #: lib/quotearg.c:312 msgid "'" msgstr "»" #: lib/regcomp.c:131 msgid "Success" msgstr "Успешно" #: lib/regcomp.c:134 msgid "No match" msgstr "Нет соответствия" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Неправильное регулярное выражение" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Недопустимый символ сравнения" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Недопустимое имя для класса символа" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Завершающая обратная косая черта" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Недопустимая обратная ссылка" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Непарный символ [ или [^" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Непарный символ ( или \\(" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Непарный символ \\{" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Недопустимое содержимое в \\{\\}" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Недопустимое окончание диапазона" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Память исчерпана" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Недопустимое предшествующее регулярное выражение" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Преждевременное окончание регулярного выражения" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Регулярное выражение слишком большое" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Непарный символ ) или \\)" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Нет предыдущего регулярного выражения" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "неверный стиль --separator: %s" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "не удалось определить io_size строки!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "не удалось открыть `%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' не является файлом ID! (неверный префикс #)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' версии %d: возможна работа только с версией %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "не поддерживаемый размер в io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "неизвестный тип ввода/вывода: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "не удалось выделить %ld байт для хэш-таблицы: закончилась память" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Загружено=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Повторных вызовов хэш-функции=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Коллизий=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "не поддерживаемый размер в io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "неизвестный язык: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" "не удалось выделить память под obstack аргументов языка: закончилась память" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "не удалось выделить память под аргументы языка: закончилась память" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "имя языка `%s' ожидалось в файле `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "не удалось открыть файл соотношения языков `%s'" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "не удалось получить размер файла соотношения `%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "не удалось прочитать файл соотношения языков `%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "не удалось прочитать файл соотношения языков `%s' полностью" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Язык C:\n" " -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить\n" " результат\n" " -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть\n" " результат\n" " -u,--strip-underscore Удалять подчёркивание в начале строк-лексем\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Язык C++:\n" " -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить\n" " результат\n" " -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть\n" " результат\n" " -u,--strip-underscore Удалять подчёркивание в начале строк-лексем\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Язык Java:\n" " -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить\n" " результат\n" " -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть\n" " результат\n" " -u,--strip-underscore Удалять подчёркивание в начале строк-лексем\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "мусор: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "мусор: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Язык ассемблера:\n" " -c,--comment=CHARS Любой из знаков CHARS начинает комментарий до\n" " конца строки\n" " -k,--keep=CHARS Разрешить CHARS в лексемах, сохранить результат\n" " -i,--ignore=CHARS Разрешить CHARS в лексемах, выкинуть результат\n" " -u,--strip-underscore Удалять подчёркивание в начале строк-лексем\n" " -n,--no-cpp Не обрабатывать директивы препроцессора C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Текстовый язык:\n" " -i,--include=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как\n" " составляющие лексем\n" " -x,--exclude=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как\n" " разделители лексем\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Язык Perl:\n" " -i,--include=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как\n" " составляющие лексем\n" " -x,--exclude=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как\n" " разделители лексем\n" " -d,--dtags Включать теги документации\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Язык Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "не удалось прочитать каталог `%s' (`.' из `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "замечание: `%s' был %s, а сейчас %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "файл" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "каталог" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "внимание: `%s' и `%s' тот же самый файл, но выдает различные результаты " "сканирования" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "замечание: параметры сканирования изменены для `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "нельзя смешивать ключи --include и --exclude" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "не удалось получить рабочий каталог" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "не удалось перейти в `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "не удалось перейти в `%s' из `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "не удалось выполнить lstat `%s' из `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "не удалось выполнить stat `%s' из `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Подробная справка по команде `%s --help'.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Использование: %s [КЛЮЧ] ИМЯ_ФАЙЛА [ИМЯ_ФАЙЛА2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Выводит список идентификаторов, которые встречаются в ИМЯ_ФАЙЛА, или если\n" "есть ИМЯ_ФАЙЛА2, то выводит список идентификаторов в обоих файлах.\n" "\n" " -f, --file=ФАЙЛ имя файла базы данных ID\n" " --help показать справку и выйти\n" " --version вывести информацию о версии и выйти\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Сообщения об ошибках направляйте на " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "нет аргументов имён файлов" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "слишком много аргументов имён файлов" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "не удалось найти файл `ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' неоднозначен" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "`%s' не найден" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Использование: %s [OPTION]... [PATTERN]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Печатает содержащиеся имена файлов, подходящие под шаблон PATTERN.\n" " -f, --file=FILE имя файла базы данных ID\n" " -S, --separator=STYLE STYLE может быть одним из `braces' (фигурные " "скобки),\n" " `space' (пробел) или `newline' (новая строка)\n" " --help показать справку и выйти\n" " --version вывести информацию о версии и выйти\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Использование: %s [OPTION]... [PATTERN]...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Производит поиск в базе данных ID и выдает результат.\n" "По умолчанию вывод состоит из нескольких строк, содержащих совпадающие\n" "идентификаторы с последующим списков имён файлов, в которых они " "встречаются.\n" "\n" " -f, --file=FILE имя файла базы данных ID\n" "\n" " -i, --ignore-case совпадение с PATTERN не зависит от регистра\n" " -l, --literal буквальное совпадение с PATTERN\n" " -r, --regexp совпадение с PATTERN по регулярному выражению\n" " -w, --word совпадение с PATTERN как разделяющее слово\n" " -s, --substring совпадение с PATTERN по подстроке\n" " Замечание: если PATTERN содержит мета-символы расширенного\n" " регулярного выражения, он рассматривается как подстрока\n" " регулярного выражения, иначе PATTERN рассматривается как слово.\n" "\n" " -k, --key=STYLE STYLE может быть одним из `token' (лексема),\n" " `pattern' (шаблон) или `none' (нет)\n" " -R, --result=STYLE STYLE может быть одним из `filenames' (имена " "файлов),\n" " `grep' (поиск), `edit' (редактировать)\n" " или `none' (ничего)\n" " -S, --separator=STYLE STYLE может быть одним из `braces' (фигурные " "скобки),\n" " `space' (пробел) или `newline' (новая строка);\n" " применяется только к именам файлов когда\n" " `--result=filenames'\n" " Эти ключи управляют представлением результатов запроса.\n" " Умолчания: --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ искать лексемы, которые появляются FREQ раз, где\n" " FREQ -- это диапазон, представленный как 'N..M'.\n" " Если N опущено, то по умолчанию равно 1.\n" " Если M опущено, то по умолчанию равно MAX_USHRT\n" " -a, --ambiguous=LEN искать лексемы, которые неоднозначны при длине LEN\n" "\n" " -x, --hex искать только шестнадцатеричные числа\n" " -d, --decimal искать только десятичные числа\n" " -o, --octal искать только восьмеричные числа\n" " По умолчанию по поиску находятся числа с любым основанием.\n" "\n" " --help показать справку и выйти\n" " --version вывести информацию о версии и выйти\n" #: src/lid.c:283 msgid "braces" msgstr "фигурные скобки" #: src/lid.c:283 msgid "space" msgstr "пробел" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "замечание: использование `-e' не рекомендуется, используйте `-r'" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Все идентификаторы однозначны по первым %d знакам\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "неверный стиль `--key': `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "неверный стиль `--result': `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "не удалось сопоставить регулярное выражение: не хватает памяти" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "редактировать? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "не удалось запустить новый процесс" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "не удалось выполнить exec `%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Использование: %s [OPTION]... [FILE]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Создает базу данных идентификаторов (ID).\n" " -o, --output=OUTFILE имя файла базы данных ID результата\n" " -f, --file=OUTFILE синоним для --output\n" " -i, --include=LANGS включить языки LANGS (по умолчанию: \"C C++ asm" "\")\n" " -x, --exclude=LANGS исключить языки LANGS\n" " -l, --lang-option=L:OPT передать OPT как умолчание для языка L (см. ниже)\n" " -m, --lang-map=MAPFILE использовать MAPFILE для сопоставления\n" " файлов с языками\n" " -d, --default-lang=LANG сделать LANG языком по умолчанию\n" " -p, --prune=NAMES исключить файлы/каталоги NAMES\n" " -v, --verbose выводить статистику для каждого файла\n" " -s, --statistics выводить статистику в конце\n" "\n" " --files0-from=F извлекать лексемы только у файлов, указанных\n" " в именах с NUL на конце из файла F\n" "\n" " --help показать справку и выйти\n" " --version вывести информацию о версии и выйти\n" "\n" "FILE может быть именем файла или каталога (для рекурсивного поиска).\n" "Если FILE не задан, используется текущий каталог.\n" "Заметим, что ключи `--include' и `--exclude' взаимно исключающие.\n" "\n" "Следующие аргументы специфичны для сканеров различных языков:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "дополнительный аргумент %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "файловые аргументы нельзя указывать одновременно с --files0-from" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "не удалось открыть %s для чтения" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: ошибка чтения" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "при чтении имён файлов из stdin, имя файла для %s указывать запрещено" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "недопустимое имя файла нулевой длины" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "нечего выполнять" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "не удалось создать `%s' в `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "не удалось изменить `%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "не удалось выполнить stat для `%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " новых = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Имён=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Чисел=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Строк=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Знаков=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Комментариев=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Файлов=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Лексем=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Байт=%ld Кб, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Куча=%llu+%llu Кб, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Результат=%ld (%ld лексем, %ld попаданий)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Частота=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Выполняется сортировка лексем...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Выполняется запись `%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "не удалось создать `%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "внутреннее ограничение: смещение равно 2^32 или больше" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "ошибка закрытия `%s'" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "уровень %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Выводит все лексемы, найденные в исходных файлах.\n" " -i, --include=LANGS включить языки LANGS (по умолчанию: \"C C++ asm" "\")\n" " -x, --exclude=LANGS исключить языки LANGS\n" " -l, --lang-option=L:OPT передать OPT как умолчание для языка L (см. ниже)\n" " -m, --lang-map=MAPFILE использовать MAPFILE для сопоставления\n" " файлов с языками\n" " -d, --default-lang=LANG сделать LANG языком по умолчанию\n" " -p, --prune=NAMES исключить файлы/каталоги NAMES\n" "\n" " --files0-from=F извлекать лексемы только у файлов, указанных\n" " в именах с NUL на конце из файла F\n" "\n" " --help показать справку и выйти\n" " --version вывести информацию о версии и выйти\n" "\n" "Следующие аргументы специфичны для сканеров различных языков:\n" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/de.gmo������������������������������������������������������������������0000664�0000000�0000000�00000052300�12166360012�013112� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������k������t����������� �����! �� ���2 �����@ ��,���\ ��,��� ��'��� ��-��� �� ��� ��(���- ��(���V ����� ����� ����� ����� ��A��� ��e�� ����~ ����������&������������ ���0�� ���=�����I�����]�����x�����r������ ���������� ���������� �������������������9����?���� ���;"�����G"�� ���Z"�����g"�����o"�� ���#��&���*#�����Q#��(���f#��!���#�� ���#��#���#�����#�����$����� $��%���$��.���A$�����p$�����$��9���$��6���$��.���$�����&%�����:%�����X%�����j%��(���%�����%�� ���%�����%�����%�����&�����&��0���1&�����b&�����t&��!���&��)���&��(���&��!���&�����'�����+'�� ���E'�����O'�����b'��-���u'�����'�����'�����'��!���'�� ���(�� ���(��2���(�����Q(�����m(�����~(��'���(��(���(��3���(�����)����� )��*���=)�����h)�����})��"���)��#���)��D���)�� ���%*����1*�����+�� ���@,��#���N,��.���r,��.���,��+���,��/���,��&���,-��.���S-��/���-��%���-��%���-�����-�����.��D���.��l��\.����/�� ���4����4����Q6�����7�����7�� ���8�����8�����/8����O8�����9��<��9�� ���(;�����6;�� ���P;�����[;�� ���r;�����};�����;��>��x<����?����oA����� J�����J�����/J�����BJ�����IJ�� ���J��,���J�����K��+���0K��!���\K��"���~K��#���K�����K�����K�����K��0���K��9���(L�����bL�����zL��G���L��J���L��=���M�����RM��2���rM�����M��)���M��:���M�����(N�����GN��B���cN��1���N�����N��6���N��:���*O�� ���eO�����O��4���O��<���O��<���P��2���QP��!���P��5���P�� ���P�����P��#���Q��7���%Q�����]Q��&���eQ��)���Q��,���Q�����Q�����Q��7���R�����>R�����ZR�����qR��2���R��;���R��^���R�����YS�����_S��6���|S�����S�����S��3���S��4���T��]���TT�� ���T�����B���0���&���/���8�������)���`���$���(���V���L������d�����������%���N���G���+������U�������H���Z���D���������P��� ���^���b������=�������S�������������W���!������������j���:���c��� ���E�������O��������������?����������������������'���M���]������� ���F���1���C�������3���>���T������_���g������ ���[���A���;��� �����������-������������������5���Y���f���e�������k��� ������I������������������J���i���"�������#���������*�������������������,���.���4�������X����������h������������������2���a����������������������R������������������6���9���\������K������@�������7���Q���<���� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �No match�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Unknown system error�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �error closing `%s'�failed to return to initial working directory�file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-06-20 21:15+0100 Last-Translator: Michael Piefel <piefel@informatik.hu-berlin.de> Language-Team: German <translation-team-de@lists.sourceforge.net> Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8-bit � Melden Sie Übersetzungsfehler an <translation-team-de@lists.sourceforge.net>, Programmfehler dagegen (auf Englisch, mit LC_ALL=C) an �, neu = %d/%d�%s: ungültige Option – „%c“ �%s: Option „%c%s“ erlaubt keine Argumente �%s: Option „--%s“ erlaubt keine Argumente �%s: Option „%s“ erfordert ein Argument �%s: Option „-W %s“ erlaubt keine Argumente �%s: Option „-W %s“ ist mehrdeutig �%s: Option „-W %s“ erfordert ein Argument �%s: Option erfordert ein Argument – „%c“ �%s: nicht erkannte Option „%c%s“ �%s: nicht erkannte Option „--%s“ �“�, Freq=%ld/%ld=%.2f �Alle Bezeichner sind verschieden hinsichtlich der ersten %d Zeichen �Assembler: -c,--comment=ZEICHEN jedes der ZEICHEN beginnt Kommentar bis Zeilenende -k,--keep=ZEICHEN ZEICHEN in Token erlauben, Ergebnis behalten -i,--ignore=ZEICHEN ZEICHEN in Token erlauben, Ergebnis wegwerfen -u,--strip-underscore führende Unterstriche aus Token entfernen -n,--no-cpp C-Präprozessor-Direktiven nicht behandeln �Eine Bezeichner-Datenbank aufbauen. -o, --output=OUTFILE Dateiname der ID-Datenbank -f, --file=OUTFILE Synonym für --output -i, --include=SPRACHEN SPRACHEN einschließen (Voreinst.: „C C++ asm“) -x, --exclude=SPRACHEN SPRACHEN ausschließen -l, --lang-option=S:OPT OPT als Voreinst. für Sprache S übergeben (s. u.) -m, --lang-map=ABBDATEI ABBDATEI benutzen für Zuordnung Endung->Sprache -d, --default-lang=SPRACHE Standardsprache sei SPRACHE -p, --prune=NAMEN Angegebene Dateien/Verzeichnisse auslassen -v, --verbose Statistik pro Datei ausgeben -s, --statistics Statistik am Ende ausgeben --files0-from=D nur die Dateien bearbeiten, die sich in der Datei D finden, und zwar mit NULL getrennt --help diese Hilfe anzeigen und beenden --version Versionsinformationen anzeigen und beenden DATEI kann ein Dateiname sein oder ein Verzeichnisname für rekursive Suche. Ist keine DATEI gegeben, wird das aktuelle Verzeichnis durchsucht. Beachten Sie, dass sich „--include“ und „--exclude“ gegenseitig ausschließen. Die folgenden Argumente gehören zu den sprachspezifischen Scannern: �Byte=%ld KB, �Sprache C: -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis behalten -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis wegwerfen -u,--strip-underscore führende Unterstriche aus Zeichenketten aus einzelnen Token entfernen �Sprache C++: -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis behalten -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis wegwerfen -u,--strip-underscore führende Unterstriche aus Zeichenketten aus einzelnen Token entfernen �Kollisionen=%ld/%ld=%.0f%%�Kommentar=%ld �Dateien=%ld, �„Heap“=%llu+%llu KB, �Ungültiger regulärer Ausdruck�Sprache Java: -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis behalten -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token erlauben, das Ergebnis wegwerfen -u,--strip-underscore führende Unterstriche aus Zeichenketten aus einzelnen Token entfernen �Sprache Lisp: �Bezeichner aufführen, die in DATEINAME auftreten, oder, wenn DATEINAME2 ebenfalls gegeben ist, Bezeichner aufführen, die in beiden Dateien auftreten. -f, --file=DATEI Dateiname der ID-Datenbank --help diese Hilfe anzeigen und beenden --version Versionsinformationen anzeigen und beenden �Zeichen=%ld, �„Load“=%ld/%ld=%.2f, �Name=%ld, �Keine Übereinstimmung�Zahl=%ld, �Ausgabe=%ld (%ld tok, %ld hit) �Sprache Perl: -i,--include=KLASSE Zeichen in KLASSE als Tokenbestandteil behandeln -x,--exclude=KLASSE Zeichen in KLASSE als Tokentrenner behandeln -d,--dtags Dokumentations-Tags mit einschließen �Alle Token, die in einer Quelldatei gefunden werden, ausgeben -i, --include=SPRACHEN SPRACHEN einschließen (Voreinst.: C C++ asm) -x, --exclude=SPRACHEN SPRACHEN ausschließen -l, --lang-option=S:OPT OPT als Voreinst. für Sprache S übergeben (s. u.) -m, --lang-map=ABBDATEI ABBDATEI benutzen für Zuordnung Endung->Sprache -d, --default-lang=SPRACHE Standardsprache sei SPRACHE -p, --prune=NAMEN Angegebene Dateien/Verzeichnisse auslassen --files0-from=D nur die Dateien bearbeiten, die sich in der Datei D finden, und zwar mit NULL getrennt --help diese Hilfe anzeigen und beenden --version Versionsinformationen anzeigen und beenden Die folgenden Argumente gehören zu den sprachspezifischen Scannern: �Zeige Dateinamen aus der Datenbank, die auf MUSTER passen, unter Benutzung von Jokerzeichen der Shell. -f, --file=DATEI Dateiname der ID-Datenbank -S, --separator=STIL Seperator-STIL ist „braces“ (Klammern), „space“ (Leerzeichen) oder „newline“ (Zeilenvorschub) --help diese Hilfe anzeigen und beenden --version Versionsinformationen anzeigen und beenden �ID-Datenbank abfragen und Ergebnisse melden. Per Voreinstellung besteht die Ausgabe aus mehreren Zeilen, wobei jede Zeile den gefundenen Bezeichner gefolgt von der Liste der Dateien, in denen er auftritt, enthält. -f, --file=DATEI Dateiname der ID-Datenbank -i, --ignore-case nach MUSTER suchen ohne Groß-/Kleinschreibung -l, --literal nach MUSTER als wortwörtliche Zeichenkette suchen -r, --regexp nach MUSTER als regulären Ausdruck suchen -w, --word nach MUSTER als abgetrenntes Wort suchen -s, --substring nach MUSTER als Subzeichenkette suchen Bemerkung: Wenn MUSTER Metazeichen für erweiterte reguläre Ausdrücke enthält, wird es als Subzeichenkette mit regulärem Ausdruck angesehen, ansonsten als genaues Wort. -k, --key=STIL STIL für Schlüssel; eins aus „token“, „pattern“ oder „none“ -R, --result=STIL STIL für Ergebnis; eins aus „filenames“, „grep“, „edit“ oder „none“ -S, --separator=STIL STIL für Trenner; eins aus „braces“, „space“ oder „newline“; gilt nur dann für Dateinamen, wenn „--result=filenames“ Die obigen STIL-Optionen steuern die Präsentation der Abfragen. Voreinstellung ist --key=token --result=filenames --separator=%s -F, --frequency=FREQ Token finden, die FREQ mal auftauchen,wobei FREQ ein Bereich der Form „N..M“ ist. Wird N weggelassen, wird es mit 1 angenommen, wird M weggelassen, wird es mit MAX_USHRT angenommen -a, --ambiguous=LÄN Token finden, deren Namen mehrdeutig für LÄN Zeichen sind -x, --hex nur hexadezimal ausgedrückte Zahlen finden -d, --decimal nur dezimal ausgedrückte Zahlen finden -o, --octal nur oktal ausgedrückte Zahlen finden Standardmäßig wird nach Zahlen beliebiger Basis gesucht. --help diese Hilfe anzeigen und beenden --version Versionsinformationen anzeigen und beenden �„Rehash“=%d, �Sortiere Token… �Zeichenkette=%ld, �Erfolg�Text: -i,--include=KLASSE Zeichen in KLASSE als Tokenbestandteil behandeln -x,--exclude=KLASSE Zeichen in KLASSE als Tokentrenner behandeln �Token=%ld, �„%s --help“ gibt weitere Informationen. �Unbekannter Systemfehler�Aufruf: %s [OPTION] DATEINAME [DATEINAME2] �Aufruf: %s [OPTION]… MUSTER… �Aufruf: %s [OPTION]… [DATEI]… �Aufruf: %s [OPTION]… [MUSTER]… �Schreibe „%s“… �„�„%s“ ist mehrdeutig�„%s“ ist keine ID-Datei! (falsche Kennung #)�„%s“ ist Version %d, aber ich verstehe nur Version %d�„%s“ nicht gefunden�braces�kann keine %ld Byte für Hashtabelle bereitstellen: Speicher erschöpft�kann obstack für Sprachargumente nicht bereitstellen: Speicher erschöpft�kann Sprachargumente nicht bereitstellen: Speicher erschöpft�kann nicht in „%s“ wechseln�kann nicht aus „%2$s“ nach „%1$s“ wechseln�kann „%s“ nicht erstellen�kann „%s“ nicht in „%s“ erstellen�kann die „io_size“ einer Zeichenkette nicht bestimmen!�kann „%s“ nicht ausführen�kann kein fork durchführen�kann Größe der Beschreibungsdatei nicht „%s“ nicht bestimmen�Name des Arbeitsverzeichnisses nicht zu erreichen�kann „ID“ nicht finden�kann kein lstat von „%s“ auf „%s“ durchführen�kann regulären Ausdruck nicht finden: Speicher erschöpft�kann „%s“ nicht modifizieren�kann „%s“ nicht öffnen�kann Sprachbeschreibungsdatei „%s“ nicht öffnen�kann Verzeichnis „%s“ nicht lesen („.“ von „%s“)�kann nicht die ganze Sprachbeschreibungsdatei „%s“ lesen�kann Sprachbeschreibungsdatei „%s“ nicht lesen�kann nicht auf „%s“ zugreifen�kann kein stat von „%s“ auf „%s“ durchführen� Verzeichnis�Editieren? [y1-9^S/nq] �Fehler beim Schließen von „%s“�Kann Namen des Arbeitsverzeichnisses nicht zurückgeben�e Datei�ungültiger „--key“-Stil: „%s“�ungültiger „--result“-Stil: „%s“�ungültiger „--separator“-Stil: „%s“�Müll: „%c“�Müll: „\%03o“�in Datei „%2$s“ nach „%1$s“ Sprachname erwartet�Level %d: %ld/%ld = %.0f%% �Speicher ausgeschöpft�keine Dateinamenargumente�Bemerkung: „%s“ war ein%s, ist nun aber ein%s!�Bemerkung: Scanparameter haben sich für „%s“ geändert�Bemerkung: Benutzung von „-e“ wird nicht mehr empfohlen, benutzen Sie stattdessen „-r“�space�zu viele Dateinamenargumente�Kann Namen des Arbeitsverzeichnisses nicht aufzeichnen�unbekannter E/A-Typ: %d�Sprache nicht erkannt: „%s“�nicht unterstützte Größe in „io_read ()“: %d�nicht unterstützte Größe in „io_write ()“: %d�Warnung: „%s“ und „%s“ sind dieselbe Datei, ergeben aber verschiedene Scanergebnisse!�Schreibfehler���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/en@quot.header����������������������������������������������������������0000664�0000000�0000000�00000002263�10623104751�014610� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/de.po�������������������������������������������������������������������0000664�0000000�0000000�00000072563�12166360012�012763� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# German messages for GNU idutils. # Copyright © 1996, 2001, 2002, 2007 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Karl Eichwalder <ke@suse.de>, 1996. # Michael Piefel <piefel@informatik.hu-berlin.de>, 2001, 2002, 2007, 2010. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-06-20 21:15+0100\n" "Last-Translator: Michael Piefel <piefel@informatik.hu-berlin.de>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "Schreibfehler" #: lib/error.c:188 msgid "Unknown system error" msgstr "Unbekannter Systemfehler" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: Option „%s“ ist mehrdeutig\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: Option „--%s“ erlaubt keine Argumente\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: Option „%c%s“ erlaubt keine Argumente\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: Option „%s“ erfordert ein Argument\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: nicht erkannte Option „--%s“\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: nicht erkannte Option „%c%s“\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ungültige Option – „%c“\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: Option erfordert ein Argument – „%c“\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: Option „-W %s“ ist mehrdeutig\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: Option „-W %s“ erlaubt keine Argumente\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: Option „-W %s“ erfordert ein Argument\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "Speicher ausgeschöpft" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "Kann Namen des Arbeitsverzeichnisses nicht aufzeichnen" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "Kann Namen des Arbeitsverzeichnisses nicht zurückgeben" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "„" #: lib/quotearg.c:312 msgid "'" msgstr "“" #: lib/regcomp.c:131 msgid "Success" msgstr "Erfolg" #: lib/regcomp.c:134 msgid "No match" msgstr "Keine Übereinstimmung" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Ungültiger regulärer Ausdruck" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "ungültiger „--separator“-Stil: „%s“" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "kann die „io_size“ einer Zeichenkette nicht bestimmen!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "kann „%s“ nicht öffnen" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "„%s“ ist keine ID-Datei! (falsche Kennung #)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "„%s“ ist Version %d, aber ich verstehe nur Version %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "nicht unterstützte Größe in „io_read ()“: %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "unbekannter E/A-Typ: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "kann keine %ld Byte für Hashtabelle bereitstellen: Speicher erschöpft" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "„Load“=%ld/%ld=%.2f, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "„Rehash“=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Kollisionen=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "nicht unterstützte Größe in „io_write ()“: %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "Sprache nicht erkannt: „%s“" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" "kann obstack für Sprachargumente nicht bereitstellen: Speicher erschöpft" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "kann Sprachargumente nicht bereitstellen: Speicher erschöpft" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "in Datei „%2$s“ nach „%1$s“ Sprachname erwartet" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "kann Sprachbeschreibungsdatei „%s“ nicht öffnen" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "kann Größe der Beschreibungsdatei nicht „%s“ nicht bestimmen" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "kann Sprachbeschreibungsdatei „%s“ nicht lesen" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "kann nicht die ganze Sprachbeschreibungsdatei „%s“ lesen" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sprache C:\n" " -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis behalten\n" " -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis wegwerfen\n" " -u,--strip-underscore führende Unterstriche aus Zeichenketten aus\n" " einzelnen Token entfernen\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sprache C++:\n" " -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis behalten\n" " -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis wegwerfen\n" " -u,--strip-underscore führende Unterstriche aus Zeichenketten aus\n" " einzelnen Token entfernen\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Sprache Java:\n" " -k,--keep=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis behalten\n" " -i,--ignore=ZEICHEN ZEICHEN in Zeichenketten aus einzelnen Token " "erlauben,\n" " das Ergebnis wegwerfen\n" " -u,--strip-underscore führende Unterstriche aus Zeichenketten aus\n" " einzelnen Token entfernen\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "Müll: „%c“" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "Müll: „\\%03o“" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assembler:\n" " -c,--comment=ZEICHEN jedes der ZEICHEN beginnt Kommentar bis Zeilenende\n" " -k,--keep=ZEICHEN ZEICHEN in Token erlauben, Ergebnis behalten\n" " -i,--ignore=ZEICHEN ZEICHEN in Token erlauben, Ergebnis wegwerfen\n" " -u,--strip-underscore führende Unterstriche aus Token entfernen\n" " -n,--no-cpp C-Präprozessor-Direktiven nicht behandeln\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Text:\n" " -i,--include=KLASSE Zeichen in KLASSE als Tokenbestandteil behandeln\n" " -x,--exclude=KLASSE Zeichen in KLASSE als Tokentrenner behandeln\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Sprache Perl:\n" " -i,--include=KLASSE Zeichen in KLASSE als Tokenbestandteil behandeln\n" " -x,--exclude=KLASSE Zeichen in KLASSE als Tokentrenner behandeln\n" " -d,--dtags Dokumentations-Tags mit einschließen\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Sprache Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "kann Verzeichnis „%s“ nicht lesen („.“ von „%s“)" # constructed sentence ahead #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "Bemerkung: „%s“ war ein%s, ist nun aber ein%s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "e Datei" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr " Verzeichnis" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "Warnung: „%s“ und „%s“ sind dieselbe Datei, ergeben aber verschiedene " "Scanergebnisse!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "Bemerkung: Scanparameter haben sich für „%s“ geändert" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "Name des Arbeitsverzeichnisses nicht zu erreichen" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "kann nicht in „%s“ wechseln" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "kann nicht aus „%2$s“ nach „%1$s“ wechseln" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "kann kein lstat von „%s“ auf „%s“ durchführen" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "kann kein stat von „%s“ auf „%s“ durchführen" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "„%s --help“ gibt weitere Informationen.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Aufruf: %s [OPTION] DATEINAME [DATEINAME2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Bezeichner aufführen, die in DATEINAME auftreten, oder, wenn DATEINAME2\n" "ebenfalls gegeben ist, Bezeichner aufführen, die in beiden Dateien " "auftreten.\n" "\n" " -f, --file=DATEI Dateiname der ID-Datenbank\n" " --help diese Hilfe anzeigen und beenden\n" " --version Versionsinformationen anzeigen und beenden\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Melden Sie Übersetzungsfehler an <translation-team-de@lists.sourceforge." "net>,\n" "Programmfehler dagegen (auf Englisch, mit LC_ALL=C) an " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "keine Dateinamenargumente" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "zu viele Dateinamenargumente" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "kann „ID“ nicht finden" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "„%s“ ist mehrdeutig" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "„%s“ nicht gefunden" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Aufruf: %s [OPTION]… [MUSTER]…\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Zeige Dateinamen aus der Datenbank, die auf MUSTER passen,\n" "unter Benutzung von Jokerzeichen der Shell.\n" " -f, --file=DATEI Dateiname der ID-Datenbank\n" " -S, --separator=STIL Seperator-STIL ist „braces“ (Klammern), „space“\n" " (Leerzeichen) oder „newline“ (Zeilenvorschub)\n" " --help diese Hilfe anzeigen und beenden\n" " --version Versionsinformationen anzeigen und beenden\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Aufruf: %s [OPTION]… MUSTER…\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "ID-Datenbank abfragen und Ergebnisse melden.\n" "Per Voreinstellung besteht die Ausgabe aus mehreren Zeilen, wobei jede " "Zeile\n" "den gefundenen Bezeichner gefolgt von der Liste der Dateien, in denen er\n" "auftritt, enthält.\n" "\n" " -f, --file=DATEI Dateiname der ID-Datenbank\n" "\n" " -i, --ignore-case nach MUSTER suchen ohne Groß-/Kleinschreibung\n" " -l, --literal nach MUSTER als wortwörtliche Zeichenkette suchen\n" " -r, --regexp nach MUSTER als regulären Ausdruck suchen\n" " -w, --word nach MUSTER als abgetrenntes Wort suchen\n" " -s, --substring nach MUSTER als Subzeichenkette suchen\n" " Bemerkung: Wenn MUSTER Metazeichen für erweiterte reguläre\n" " Ausdrücke enthält, wird es als Subzeichenkette mit regulärem\n" " Ausdruck angesehen, ansonsten als genaues Wort.\n" "\n" " -k, --key=STIL STIL für Schlüssel; eins aus „token“, „pattern“\n" " oder „none“\n" " -R, --result=STIL STIL für Ergebnis; eins aus „filenames“, „grep“, " "„edit“\n" " oder „none“\n" " -S, --separator=STIL STIL für Trenner; eins aus „braces“, „space“ oder\n" " „newline“; gilt nur dann für Dateinamen,\n" " wenn „--result=filenames“\n" " Die obigen STIL-Optionen steuern die Präsentation der Abfragen.\n" " Voreinstellung ist --key=token --result=filenames --separator=" "%s\n" "\n" " -F, --frequency=FREQ Token finden, die FREQ mal auftauchen,wobei FREQ " "ein\n" " Bereich der Form „N..M“ ist. Wird N weggelassen, " "wird\n" " es mit 1 angenommen, wird M weggelassen, wird es " "mit\n" " MAX_USHRT angenommen\n" " -a, --ambiguous=LÄN Token finden, deren Namen mehrdeutig für LÄN Zeichen " "sind\n" "\n" " -x, --hex nur hexadezimal ausgedrückte Zahlen finden\n" " -d, --decimal nur dezimal ausgedrückte Zahlen finden\n" " -o, --octal nur oktal ausgedrückte Zahlen finden\n" " Standardmäßig wird nach Zahlen beliebiger Basis gesucht.\n" "\n" " --help diese Hilfe anzeigen und beenden\n" " --version Versionsinformationen anzeigen und beenden\n" #: src/lid.c:283 msgid "braces" msgstr "braces" #: src/lid.c:283 msgid "space" msgstr "space" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "" "Bemerkung: Benutzung von „-e“ wird nicht mehr empfohlen, benutzen Sie " "stattdessen „-r“" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Alle Bezeichner sind verschieden hinsichtlich der ersten %d Zeichen\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "ungültiger „--key“-Stil: „%s“" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "ungültiger „--result“-Stil: „%s“" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "kann regulären Ausdruck nicht finden: Speicher erschöpft" # Muss hier auf `_j_ … / nq' umgestellt werden???? #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "Editieren? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "kann kein fork durchführen" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "kann „%s“ nicht ausführen" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Aufruf: %s [OPTION]… [DATEI]…\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Eine Bezeichner-Datenbank aufbauen.\n" " -o, --output=OUTFILE Dateiname der ID-Datenbank\n" " -f, --file=OUTFILE Synonym für --output\n" " -i, --include=SPRACHEN SPRACHEN einschließen (Voreinst.: „C C++ asm“)\n" " -x, --exclude=SPRACHEN SPRACHEN ausschließen\n" " -l, --lang-option=S:OPT OPT als Voreinst. für Sprache S übergeben (s. " "u.)\n" " -m, --lang-map=ABBDATEI ABBDATEI benutzen für Zuordnung Endung-" ">Sprache\n" " -d, --default-lang=SPRACHE Standardsprache sei SPRACHE\n" " -p, --prune=NAMEN Angegebene Dateien/Verzeichnisse auslassen\n" " -v, --verbose Statistik pro Datei ausgeben\n" " -s, --statistics Statistik am Ende ausgeben\n" "\n" " --files0-from=D nur die Dateien bearbeiten, die sich in der\n" " Datei D finden, und zwar mit NULL getrennt\n" "\n" " --help diese Hilfe anzeigen und beenden\n" " --version Versionsinformationen anzeigen und beenden\n" "\n" "DATEI kann ein Dateiname sein oder ein Verzeichnisname für rekursive Suche.\n" "Ist keine DATEI gegeben, wird das aktuelle Verzeichnis durchsucht.\n" "Beachten Sie, dass sich „--include“ und „--exclude“ gegenseitig " "ausschließen.\n" "\n" "Die folgenden Argumente gehören zu den sprachspezifischen Scannern:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "kann „%s“ nicht in „%s“ erstellen" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "kann „%s“ nicht modifizieren" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "kann nicht auf „%s“ zugreifen" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr ", neu = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Name=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Zahl=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Zeichenkette=%ld, " # ist das gemeint? ### #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Zeichen=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Kommentar=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Dateien=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Token=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Byte=%ld KB, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "„Heap“=%llu+%llu KB, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Ausgabe=%ld (%ld tok, %ld hit)\n" # Frequenz übersetzen? ke # Ob Freq nun frequency oder Frequenz ist, sollte wurscht sein. MPi #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Freq=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sortiere Token…\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Schreibe „%s“…\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "kann „%s“ nicht erstellen" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "Fehler beim Schließen von „%s“" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "Level %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Alle Token, die in einer Quelldatei gefunden werden, ausgeben\n" " -i, --include=SPRACHEN SPRACHEN einschließen (Voreinst.: C C++ asm)\n" " -x, --exclude=SPRACHEN SPRACHEN ausschließen\n" " -l, --lang-option=S:OPT OPT als Voreinst. für Sprache S übergeben (s. " "u.)\n" " -m, --lang-map=ABBDATEI ABBDATEI benutzen für Zuordnung Endung-" ">Sprache\n" " -d, --default-lang=SPRACHE Standardsprache sei SPRACHE\n" " -p, --prune=NAMEN Angegebene Dateien/Verzeichnisse auslassen\n" "\n" " --files0-from=D nur die Dateien bearbeiten, die sich in der\n" " Datei D finden, und zwar mit NULL getrennt\n" "\n" " --help diese Hilfe anzeigen und beenden\n" " --version Versionsinformationen anzeigen und beenden\n" "\n" "Die folgenden Argumente gehören zu den sprachspezifischen Scannern:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: unzulässige Option -- %c\n" ���������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/tr.po�������������������������������������������������������������������0000664�0000000�0000000�00000070046�12166360012�013012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Id-utils Turkish Translation. # Copyright (C) 2002 Free Software Foundation, Inc. # Deniz Akkus Kanca <deniz@arayan.com>, 2002. # msgid "" msgstr "" "Project-Id-Version: id-utils 3.2d\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2002-06-27 13:00+0200\n" "Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n" "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: `%s' seçeneği belirsiz\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: `--%s' seçeneği argüman almaz\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: `%c%s' seçeneği argüman almaz\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: `%s' seçeneği argüman gerektirir\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: bilinmeyen seçenek `--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: bilinmeyen seçenek %c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: hatalı seçenek -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: seçenek argüman gerektirir -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: `%s' seçeneği belirsiz\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: `--%s' seçeneği argüman almaz\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: `%s' seçeneği argüman gerektirir\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "çalışma dizini bulunamıyor" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "çalışma dizini bulunamıyor" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, fuzzy, c-format msgid "invalid `--separator' style: `%s'" msgstr "geçersiz `--key' türü: `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "bir dizgenin io_size'ı bulunamadı!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "`%s' açılamadı" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' bir kimlik dosyası değil! (hatalı sihir no)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' sürüm %d, fakat yalnız %d sürümü anlaşılıyor" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "io_read() içinde desteklenmeyen boy: %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "bilinmeyen I/O türü: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "hash tablosu için %ld bayt ayrılamadı: bellek tükendi" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Yük=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Yeniden hash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Çakışmalar=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "io_write() içinde desteklenmeyen boy: %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "bilinmeyen dil: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "dil argüman ob-yığıtı ayrılamadı: bellek tükendi" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "dil argümanları ayrılamadı: bellek tükendi" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "`%2$s' dosyasında `%1$s' sonrasında dil adı beklendi" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "dil eşleşme dosyası `%s' açılamadı" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "`%s' eşleşme dosyasının büyüklüğü belirlenmiyor" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "dil eşleşme dosyası `%s' okunamadı" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "dil eşleşme dosyası `%s'nın tamamı okunamadı" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C dili:\n" " -k,--keep=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "tutar\n" " -i,--ignore=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "atar\n" " -u,--strip-underscore Tek anahtarlı dizgelerin başından alt-tireyi soyar\n" #: libidu/scanners.c:460 #, fuzzy, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C dili:\n" " -k,--keep=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "tutar\n" " -i,--ignore=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "atar\n" " -u,--strip-underscore Tek anahtarlı dizgelerin başından alt-tireyi soyar\n" #: libidu/scanners.c:471 #, fuzzy, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C dili:\n" " -k,--keep=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "tutar\n" " -i,--ignore=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu " "atar\n" " -u,--strip-underscore Tek anahtarlı dizgelerin başından alt-tireyi soyar\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "bozuk: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "bozuk: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Makina dili: (assembly)\n" " -c,--comment=KRKTR KRKTR'lerin her biri satırsonuna kadar açıklamayı " "başlatır\n" " -k,--keep=KRKTR Anahtarlarda KRKTR'e izin verir, sonucu tutar\n" " -i,--ignore=KRKTR Anahtarlarda KRKTR'e izin verir, sonucu atar\n" " -u,--strip-underscore Anahtarların başından alt-tireyi soyar\n" " -n,--no-cpp C ön-işleyici yönergelerini işlemez\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Metin dili:\n" " -i,--include=KSINIF KSINIF'a ait karakterleri anahtar öğesi olarak " "kabul eder\n" " -x,--exclude=KSINIF KSINIF'a ait karakterleri anahtar sonlayıcısı " "olarak kabul eder\n" #: libidu/scanners.c:1334 #, fuzzy, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Metin dili:\n" " -i,--include=KSINIF KSINIF'a ait karakterleri anahtar öğesi olarak " "kabul eder\n" " -x,--exclude=KSINIF KSINIF'a ait karakterleri anahtar sonlayıcısı " "olarak kabul eder\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "`%s' dizini okunamadı (`%s'den `.')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "bildirim: `%s', %s idi, fakat şimdi %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "dosya" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "dizin" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "uyarı: `%s' ve `%s' aynı dosya fakat farklı tarama sonuçları veriyor!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "bildirim: `%s' için tarama parametreleri değişti" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "çalışma dizini bulunamıyor" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "`%s' dizinine geçilemedi" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "`%2$s'den `%1$s' dizinine geçilemedi" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "`%2$s'den `%1$s'e `lstat' yapılamadı" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "`%2$s'den `%1$s' durumlanamadı" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Daha fazla bilgi için `%s --help' yazın.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Kullanım: %s [SEÇENEK] DOSYA [DOSYA2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "DOSYA'daki tanımlayıcıları gösterir. Eğer DOSYA2 de verilmişse,\n" "her iki dosyada da bulunan tanımlayıcıları gösterir.\n" "\n" " -f, --file=FDOS kimlik veritabanının dosya adı\n" " --help bu yardımı gösterir ve çıkar\n" " --version bu sürümü gösterir ve çıkar\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "dosya adı argümanı yok" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "çok fazla dosya adı argümanı var" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "kimlik bulunamadı" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' belirsiz" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "`%s' bulunamadı" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Kullanım: %s [SEÇENEK]... [KALIP]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "KALIP'a uyan öğe dosya adlarını kabuk tarzı genel arama\n" "karakterleri kullanarak listeler.\n" " -f, --file=DOSYA kimlik veritabanının dosya adı\n" " -S, --separator=AYRAÇ AYRAÇ, `braces' ({}), `space' (boşluk)\n" " veya `newline' (yenisatır) olabilir\n" " --help bu yardımı gösterir ve çıkar\n" " --version sürüm bilgilerini gösterir ve çıkar\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Kullanım: %s [SEÇENEK]... KALIP...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Kimlik veritabanını sorgular ve sonuçları bildirir.\n" "Öntanımlı olarak çıktı, her bir satırında eşleştirilen\n" "tanımlayıcı ve tanımlayıcının bulunduğu dosya isimlerinin\n" "listesi bulunan birden fazla satırdan oluşur.\n" "\n" " -f, --file=DOSYA kimlik veritabanının dosya adı\n" "\n" " -i, --ignore-case büyük/küçük harf ayırdetmeksizin KALIP'ı arar\n" " -l, --literal KALIP'ı sabit dizge kabul ederek arama yapar\n" " -r, --regexp KALIP'ı düzenli ifade kabul ederek arama yapar\n" " -w, --word KALIP'ı sonlandırılmış sözcük kabul ederek arama " "yapar\n" " -s, --substring KALIP'ı altdizge kabul ederek arama yapar\n" " Not: Eğer KALIP genişletilmiş düzenli ifade meta-karakterler\n" " içerirse, düzenli ifade altdizgesi olarak kabul edilir.\n" " Aksi takdirde, sabit sözcük olarak kabul edilir.\n" "\n" " -k, --key=TÜR Anahtar türü: TÜR, `token' (anahtar), \n" " `pattern' (kalıp) veya `none' (hiçbiri) olabilir\n" " -R, --result=TÜR Sonuç türü: TÜR, `filenames' (dosyaadları), `grep'\n" " (grep komutu), `edit' (düzenleme) veya `none'\n" " (hiçbiri) olabilir.\n" " -S, --separator=TÜR Ayraç türü: TÜR, `braces' ({}), `space' (boşluk)\n" " veya `newline' (yenisatır) olabilir ve yalnızca\n" " `--result=filenames' seçeneği var ise dosya " "isimlerine\n" " uygulanır.\n" " Yukarıdaki TÜR seçenekleri sorgu sonuçlarının nasıl " "gösterildiğini\n" " kontrol eder.\n" " Öntanımlı değerler: --key=token --result=filenames --separator=" "%s\n" "\n" " -F, --frequency=FREK FREK defa geçen anahtarları bulur. FREK, `N..M' " "arası\n" " aralıkta olan bir sayıdır. Eğer N'nin öntanımlı\n" " değeri 1, M'nin ise MAX_USHRT'dır.\n" " -a, --ambiguous=UZU UZU harf boyunca adı belirsiz olan anahtarları " "bulur\n" "\n" " -x, --hex yalnızca 16lık düzende belirtilen sayıları bulur\n" " -d, --decimal yalnızca onluk düzende belirtilen sayıları bulur\n" " -o, --octal yalnızca 8lik düzende belirtilen sayıları bulur\n" " Öntanımlı olarak sorgular herhangi bir sayı düzenindeki " "sayılarla eşleşir.\n" "\n" " --help bu yardımı gösterir ve çıkar\n" " --version bu sürüm bilgisini gösterir ve çıkar\n" #: src/lid.c:283 msgid "braces" msgstr "braces" #: src/lid.c:283 msgid "space" msgstr "space" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "bildirim: `-e' kullanımdan kalkmak üzere, `-r' kullanın" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Bütün tanımlayıcıların ilk %d harfleri belirli\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "geçersiz `--key' türü: `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "geçersiz `--result' türü: `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "düzenli ifade eşleştirilemedi: bellek tükendi" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "düzenle? [e1-9^S/hq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "çatal açılamadı" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "`%s' çalıştırılamadı" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Kullanım: %s [SEÇENEK]... [DOSYA]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Tanımlayıcı veritabanı oluşturur.\n" " -o, --output=ÇIKDOSYA kimlik veritabanı çıktısı için dosya adı\n" " -f, --file=ÇIKDOSYA --output ile aynı\n" " -i, --include=DİLLER DİLLER'de belirtilen dilleri içerir (öntanımlı: " "\"C C++ asm\")\n" " -x, --exclude=DİLLER DİLLER'de belirtilen dilleri içermez\n" " -l, --lang-option=D:SEÇ D diline SEÇ seçeneğini öntanımlı olarak geçirir, " "daha fazla\n" " bilgi için aşağıya bakın.\n" " -m, --lang-map=EŞDOS dosya adlarını kaynak diline eşleştirmek için " "EŞDOS\n" " dosyasını kullanır.\n" " -d, --default-lang=DİL öntanımlı kaynak dilini DİL olarak belirler.\n" " -p, --prune=İSİM İSİM'de yer alan dosya ve dizinleri işlem dışı " "tutar.\n" " -v, --verbose her dosya için istatistik üretir\n" " -s, --statistics işlem sonunda istatistik üretir\n" "\n" " --help bu yardımı gösterir ve çıkar\n" " --version sürüm bilgilerini gösterir ve çıkar\n" "\n" "DOSYA, dosya adı veya çevrimli olarak aranacak dizin adı olabilir.\n" "Eğer DOSYA verilmezse, öntanımlı olarak mevcut dizin aranır.\n" "--include ve --exclude seçeneklerinin aynı anda kullanılamayacağına dikkat\n" "edin.\n" "\n" "Aşağıdaki argümanlar dile özgü tarayıcılar için geçerlidir.\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "`%2$s' içinde `%1$s' oluşturulamadı" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "`%s' değiştirilemedi" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "`%s' durumlanamadı" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " yeni = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "İsim=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Sayı=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Dizge=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Sabit=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Açıklama=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Dosyalar=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Anahtarlar=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bayt=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Yığın=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Çıktı=%ld (%ld anah, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Frek=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Anahtarlar sıralanıyor...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "`%s' yazılıyor...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "`%s' oluşturulamadı" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "seviye %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Bir kaynak dosyasında bulunan bütün anahtarları gösterir.\n" " -i, --include=DİLLER DİLLER'de belirtilen dilleri içerir (öntanımlı: " "\"C C++ asm\")\n" " -x, --exclude=DİLLER DİLLER'de belirtilen dilleri içermez\n" " -l, --lang-option=D:SEÇ D diline SEÇ seçeneğini öntanımlı olarak geçirir, " "daha fazla\n" " bilgi için aşağıya bakın.\n" " -m, --lang-map=EŞDOS dosya adlarını kaynak diline eşleştirmek için " "EŞDOS\n" " dosyasını kullanır.\n" " -d, --default-lang=DİL öntanımlı kaynak dilini DİL olarak belirler.\n" " -p, --prune=İSİM İSİM'de yer alan dosya ve dizinleri işlem dışı " "tutar.\n" " --help bu yardımı gösterir ve çıkar\n" " --version sürüm bilgilerini gösterir ve çıkar\n" "\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: geçersiz seçenek -- %c\n" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/id.po�������������������������������������������������������������������0000664�0000000�0000000�00000066521�12166360012�012764� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# id-utils-3.2d (Indonesian) # Copyright (C) 2003 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Tedi Heriyanto <tedi_h@gmx.net>, 2003 # Andhika Padmawan <andhika.padmawan@gmail.com>, 2008 # msgid "" msgstr "" "Project-Id-Version: idutils 4.2\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2008-08-17 19:57+0700\n" "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n" "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.6\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: option `%s' rancu\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: option `--%s' tidak membolehkan sebuah argumen\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: option `%c%s' tidak membolehkan sebuah argumen\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: option `%s' membutuhkan sebuah argumen\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: option tidak dikenal `--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: option tidak dikenal `%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: option tidak valid -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: option membutuhkan sebuah argumen -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: option `-W %s' rancu\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: option `-W %s' tidak membolehkan sebuah argumen\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: option `%s' membutuhkan sebuah argumen\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "Tidak dapat mengambil direktori kerja" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "Tidak dapat mengambil direktori kerja" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "gaya `--separator' tidak valid: `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "tidak dapat menentukan io_size sebuah string!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "tidak dapat membuka `%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' bukanlah file ID! (# ajaib jelek)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' adalah versi %d, namun saya hanya grok versi %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "ukuran tidak didukung dalam io_read(): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "tipe I/O tidak dikenal: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "tidak dapat mengalokasikan %ld byte untuk tabel hash: memori habis" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Beban=%ld/%ld=%.0f%%," #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Rehash=%d," #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Tabrakan==%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "ukuran tidak didukung dalam io_write(): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "bahasa tidak dikenal: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "tidak dapat mengalokasikan obstack args bahasa: memori habis" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "tidak dapat mengalokasikan args bahasa: memori habis" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "mengharapkan nama bahasa setelah `%s' dalam file `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "tidak dapat membuka file `%s' map bahasa" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "tidak dapat memperoleh ukuran file map `%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "tidak dapat membaca file map bahasa `%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "tidak dapat membaca semua file map bahasa `%s'" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C language:\n" " -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan " "hasilnya\n" " -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus " "hasilnya\n" " -u,--strip-underscore hilangkan garis bawah awal dari string token " "tunggal\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C++ language:\n" " -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan " "hasilnya\n" " -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus " "hasilnya\n" " -u,--strip-underscore hilangkan garis bawah awal dari string token " "tunggal\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Java language:\n" " -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan " "hasilnya\n" " -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus " "hasilnya\n" " -u,--strip-underscore hilangkan garis bawah awal dari string token " "tunggal\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "sampah: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "sampah: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Perl language:\n" " -i,--include=CHAR-CLASS Perlakukan karakter CHAR-CLASS sebagai pengganti " "token\n" " -x,--exclude=CHAR-CLASS Perlakukan karakter CHAR-CLASS sebagai penghapus " "token\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Bahasa Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "tidak dapat membaca direktori `%s' (`.' dari `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "perhatikan: `%s' adalah sebuah %s, namun sekarang sebuah %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "file" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "direktori" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "peringatan: `%s' dan `%s' adalah file yang sama, namun menghasilkan scan " "berbeda!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "perhatikan: parameter scan berubah untuk `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "Tidak dapat mengambil direktori kerja" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "tidak dapat chdir ke `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "tidak dapat chdir ke `%s' dari `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "tidak dapat lstat `%s' dari `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "tidak dapat stat `%s' dari `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Coba `%s --help' untuk informasi lebih lanjut.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Pemakaian: %s [OPTION]... FILE1 FILE2\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Daftar identifier yang ada dalam FILENAME, atau bila FILENAME2\n" "juga diberikan daftar identifier yang ada di kedua file.\n" "\n" " -f, --file=FILE nama file database ID\n" " --help menampilkan help ini dan keluar\n" " --version menampilkan informasi versi dan keluar\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Laporkan kutu ke " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "tidak ada argumen nama file" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "terlalu banyak argumen nama file" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "tidak dapat menemukan `ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' rancu" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "`%s' tidak ditemukan" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Pemakaian: %s [OPTION]... [POLA]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Cetak nama file konstituen yang cocok dengan PATTERN,\n" "menggunakan wildcard bergaya-shell.\n" "\n" " -f, --file=FILE nama file database ID\n" " -S, --separator=STYLE STYLE adalah salah satu dari `braces', `spaces', " "atau `newline'\n" " -h, --help tampilkan bantuan ini dan keluar\n" " --version tampilkan informasi versi dan keluar\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Pemakaian: %s [OPTION]... [POLA]...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Query database ID dan laporkan hasilnya.\n" "Secara baku, output terdiri dari banyak baris, setiap baris berisikan \n" "identifier kecocokan yang diikuti oleh daftar nama file terjadinya.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" #: src/lid.c:283 msgid "braces" msgstr "kurung" #: src/lid.c:283 msgid "space" msgstr "space" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "perhatikan: penggunaan `-e' sudah tidak didukung, gunakanlah `-r'" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Semua identifier adalah non-ambigu dalam %d karakter pertama\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "gaya `--key' tidak valid: `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "gaya `--result' tidak valid: `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "tidak dapat mencocokan ekspresi reguler: memori habis" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "edit? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "tidak dapat mem-fork" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "tidak dapat mengeksekusi `%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Pemakaian: %s [OPTION]... [FILE]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Buat database identifier.\n" " -o, --output=OUTFILE nama file output database ID\n" " -f, --file=OUTFILE sinonim dengan --output\n" " -i, --include=LANGS sertakan bahasa dalam LANGS (bakunya: \"C C++ asm" "\")\n" " -x, --exclude=LANGS kecualikan bahasa di LANGS\n" " -l, --lang-option=L:OPT lewatkan OPT sebagai baku untuk bahaa L (lihat di " "bawah)\n" " -m, --lang-map=MAPFILE gunakan file MAPFILE untuk memetakan namafile ke " "bahasa sumber\n" " -d, --default-lang=LANG jadikan LANG sebagai bahasa sumber baku\n" " -p, --prune=NAMES kecualikan nama file dan/atau direktori\n" " -v, --verbose laporkan statistik per file\n" " -s, --statistics laporkan statistik di akhir run\n" "\n" " --help tampilkan bantuan dan keluar\n" " --version tampilkan informasi versi dan keluar\n" "\n" "FILE dapat berupa file name, atau nama direktori untuk dicari secara " "rekursif.\n" "Jika tidak diberikan FILE, pencarian dilakukan terhadap direktori saat ini.\n" "Perhatikan bahwa opsi `--include' dan `--exclude' adalah mutually-" "exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "tidak dapat membuat `%s' dalam `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "tidak dapat memodifikasi `%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "tidak dapat menstat `%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " baru = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Name=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Number=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "String=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Literal=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Comment=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Files=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Tokens=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bytes=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Output=%ld (%ld tok, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Frek=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Mensorting token...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Menulis `%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "tidak dapat membuat `%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "galat menutup `%s'" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "level %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Cetak semua token yang ada dalam file source.\n" " -i, --include=LANGS termasuk bahasa dalam LANGS (baku: \"C C++ asm\")\n" " -x, --exclude=LANGS kecuali bahasa dalam LANGS\n" " -l, --lang-option=L:OPT lewatkan OPT sebagai baku untuk bahasa L (lihat di " "bawah)\n" " -m, --lang-map=MAPFILE gunakan MAPFILE untuk memetakan nama file ke " "bahasa sumber\n" " -d, --default-lang=LANG jadikan LANG bahasa sumber baku\n" " -p, --prune=NAMES kecualikan nama file atau direktori\n" " --help tampilkan bantuan ini dan keluar\n" " --version tampilkan versi informasi dan keluar\n" "\n" "Argumen berikut dapat digunakan untuk scanner bahasa-khusus:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: option ilegal -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/vi.po�������������������������������������������������������������������0000664�0000000�0000000�00000077401�12166360012�013005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Vietnamese Translation for ID Utils. # Copyright © 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Clytie Siddall <clytie@riverland.net.au>, 2005-2010. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-10-03 23:10+1030\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: LocFactoryEditor 1.8\n" #: lib/closeout.c:112 msgid "write error" msgstr "lỗi ghi" #: lib/error.c:188 msgid "Unknown system error" msgstr "Không rõ lỗi hệ thống" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: tùy chọn « %s » vẫn mơ hồ\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: tùy chọn « --%s » không cho phép đối số\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: tùy chọn « %c%s » không cho phép đối số\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: tùy chọn « --%s » yêu cầu một đối số\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: không nhận ra tuỳ chọn « --%s »\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: không nhận ra tuỳ chọn « %c%s »\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: tùy chọn không hợp lệ -- « %c »\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: tùy chọn yêu cầu một đối số -- « %c »\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: tùy chọn « -W %s » vẫn mơ hồ\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: tùy chọn « -W %s » không cho phép đối số\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: tùy chọn « %s » yêu cầu một đối số\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "cạn bộ nhớ" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "không thể ghi lưu thư mục hoạt động hiện thời" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "không trở được về thư mục hoạt động đầu tiên" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "« " #: lib/quotearg.c:312 msgid "'" msgstr " »" #: lib/regcomp.c:131 msgid "Success" msgstr "Thành công" #: lib/regcomp.c:134 msgid "No match" msgstr "Không khớp" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Biểu thức chính quy không hợp lệ" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Ký tự đối chiếu không hợp lệ" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Tên hạng ký tự không hợp lệ" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Dấu chéo ngược theo sau" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Tham chiếu ngược không hợp lệ" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Có một ký tự « [ » hay « [^ » riêng lẻ" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Có một ký tự « ( » hay « \\( » riêng lẻ" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Có một ký tự « \\{ » riêng lẻ" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Nội dụng « \\{\\} » không hợp lệ" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Sai kết thúc phạm vi" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Cạn bộ nhớ" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Sai đặt biểu thức chính quy đi trước" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Kết thúc sớm biểu thức chính quy" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Biểu thức chính quy quá lớn" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Có một ký tự « ) » hay « \\) » riêng lẻ" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Không có biểu thức chính quy đi trước" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "kiểu dáng phân cách « --separator » không hợp lệ: `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "không thể quyết định kích cỡ VR (io_size) của một chuỗi." #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "không thể mở « %s »" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "« %s » không phải là một tập tin mã số (con số ma thuật sai)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "" "« %s » là phiên bản %d, nhưng chương trình này chỉ chấp nhận phiên bản %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "kích cỡ không được hỗ trợ trong io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "không nhận ra kiểu V/R: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "không thể phân cấp %ld byte cho bảng băm: hết bộ nhớ hoàn toàn" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Trọng tải=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Băm lại=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Xung đột=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "kích cỡ không được hỗ trợ trong io_write () (ghi VR): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "không nhận ra ngôn ngữ : « %s »" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" "không thể phân cấp đống đối tượng các đối số ngôn ngữ : hết bộ nhớ hoàn toàn" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "không thể phân cấp các đối số ngôn ngữ : hết bộ nhớ hoàn toàn" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "mong đợi tên ngôn ngữ nằm sau « %s » trong tập tin « %s »" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "không thể mở tập tin sơ đồ ngôn ngữ « %s »" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "không thể lấy kích cỡ của tập tin sơ đồ « %s »" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "không thể đọc tập tin sơ đồ ngôn ngữ « %s »" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "không thể đọc toàn bộ tập tin sơ đồ ngôn ngữ « %s »" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Ngôn ngữ C:\n" " -k,--keep=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết " "quả\n" " -i,--ignore=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết " "quả\n" " -u,--strip-underscore\t\tBỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Ngôn ngữ C++:\n" " -k,--keep=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết " "quả\n" " -i,--ignore=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết " "quả\n" " -u,--strip-underscore\t\tBỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Ngôn ngữ Java:\n" " -k,--keep=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết " "quả\n" " -i,--ignore=KÝ_TỰ\tCho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết " "quả\n" " -u,--strip-underscore\t\tBỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "rác: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "rác: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Ngôn ngữ tổ hợp:\n" " -c,--comment=KÝ_TỰ Ký tự nào trong các ký tự này sẽ bắt đầu ghi chú\n" "\t\t\t\t\t\tđến kết thúc dòng\n" " -k,--keep=KÝ_TỰ\tCho phép các ký tự này trong hiệu bài, giữ kết quả\n" " -i,--ignore=KÝ_TỰ\tCho phép các ký tự này trong hiệu bài, bỏ kết quả\n" " -u,--strip-underscore\t\tBỏ dấu gạch dưới ở đầu khỏi hiệu bài\n" " -n,--no-cpp \tĐừng xử lý chỉ thị tiền xử lý C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Ngôn ngữ văn bản:\n" " -i,--include=HẠNG-KÝ_TỰ\n" "\t\t\tXử lý các ký tự của hạng này như là phần tử của hiệu bài\n" " -x,--exclude=HẠNG-KÝ_TỰ\n" "\t\t\tXử lý các ký tự của hạng này như là dấu định giới hiệu bài\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Ngôn ngữ Perl:\n" " -i,--include=HẠNG-KÝ_TỰ\n" "\t\t\tXử lý các ký tự của hạng này như là phần tử của hiệu bài\n" " -x,--exclude=HẠNG-KÝ_TỰ\n" "\t\t\tXử lý các ký tự của hạng này như là dấu định giới hiệu bài\n" " -d,--dtags \tGồm có các thẻ tài liệu hướng dẫn\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Ngôn ngữ Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "không thể đọc thư mục « %s » (« . » từ « %s »)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "thông báo : « %s » đã là %s, còn bây giờ là %s." #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "tập tin" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "thư mục" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "cảnh báo : « %s » và « %s » là cùng tập tin, còn cho bản quét khác nhau." #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "thông báo : các tham số quét bị thay đổi đối với « %s »" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" "không thể kết hợp hai tuỳ chọn « --include » (bao gồm) và « --exclude " "» (loại trừ )" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "không thể lấy thư mục hoạt động" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "không thể chuyển đổi thư mục sang « %s »" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "không thể chuyển đổi thư mục sang « %s » từ « %s »" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "" "không thể lấy trạng thái liên kết tượng trưng (lstat) về « %s » từ « %s »" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "không thể lấy trạng thái tập tin (stat) về « %s » từ « %s »" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Thử lệnh trợ giúp « %s --help » để tìm thêm thông tin.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Cách sử dụng: %s [TÙY_CHỌN] TẬP_TIN [TẬP_TIN2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Liệt kê các bộ nhận diện nằm trong tập tin,\n" "hoặc nếu cũng đưa ra tập tin thứ hai, liệt kê\n" "các bộ nhận diện nằm trong cả hai tập tin.\n" "\n" " -f, --file=TẬP_TIN\ttên tập tin của cơ sở dữ liệu ID\n" " --help \t\thiển thị trợ giúp này rồi thoát\n" " --version \t\txuất ra thông tin phiên bản rồi thoát\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Hãy thông báo lỗi nào cho " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "không có đối số kiểu tên tập tin" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "có quá nhiều đối số kiểu tên tập tin" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "không tìm thấy « ID »" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "« %s » vẫn mơ hồ" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "Không tìm thấy « %s »" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Sử dụng: %s [TÙY_CHỌN]... [MẪU]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "In ra các tên tập tin phần tử mà khớp với mẫu này,\n" "dùng ký tự đại diện kiểu trình bao.\n" "\n" " -f, --file=TẬP_TIN\ttên tập tin của cơ sở dữ liệu ID\n" " -S, --separator=KIỂU kiểu dáng này là một của:\n" "\t\t• braces\t\tdấu ngoặc móc\n" "\t\t• space\t\tdấu cách\n" "\t\t• newline\t\tdòng mới\n" " --help \t\thiển thị trợ giúp này rồi thoát\n" " --version \t\txuất ra thông tin phiên bản rồi thoát\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Sử dụng: %s [TÙY_CHỌN]... MẪU...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Hỏi cơ sở dữ liệu ID và thông báo kết quả.\n" "Mặc định là kết xuất đa dòng, mỗi dòng chứa bộ nhận diện tương ứng\n" "và sau đó danh sách các tên tập tin chứa nó.\n" "\n" " -f, --file=TỆP\ttên tập tin của cơ sở dữ liệu ID\n" "\n" " -i, --ignore-case\t\tkhớp MẪU mà không phân biệt chữ hoa/thường\n" " -l, --literal\t\t\tkhớp MẪU như là một chuỗi nghĩa chữ\n" " -r, --regexp\t\t\tkhớp MẪU như là một biểu thức chính quy\n" " -w, --word\t\t\tkhớp MẪU như là một từ đã định giới\n" " -s, --substring\t\tkhớp MẪU như là một chuỗi phụ\n" "\t\tGhi chú : nếu MẪU chứa siêu ký tự kiểu biểu thức chính quy đã mở rộng,\n" "\t\tnó được giải thích như là một chuỗi phụ kiểu biểu thức chính quy.\n" "\t\tKhông thì MẪU được giải thích như là một từ nghĩa chữ.\n" "\n" " -k, --key=KIỂU\t\tkiểu dáng này là một của:\n" "\t\t• token\t\thiệu bài\n" "\t\t• pattern\t\tmẫu\n" "\t\t• none\t\tkhông có\n" " -R, --result=KIỂU\tkiểu dáng này là một của:\n" "\t\t• filenames\tcác tên tập tin\n" "\t\t• grep\n" "\t\t• edit\t\tsửa\n" "\t\t• grep\n" "\t\t• none\t\tkhông có\n" " -S, --separator=KIỂU \tkiểu dáng này là một của:\n" "\t\t• braces\t\tdấu ngoặc móc\n" "\t\t• space\t\tdấu cách\n" "\t\t• newline\t\tdòng mới\n" "\t\tvà chỉ áp dụng cho các tên tập tin khi « --result=các_tên_tệp »\n" "\t\tNhững tùy chọn KIỂU bên trên thì điều khiển cách hiển thị kết quả hỏi.\n" "\t\tMặc định là: --key=hiệu_bài --result=các_tên_tệp --separator=%s\n" "\n" " -F, --frequency=SỐ\ttìm các hiệu bài xảy ra số lần này,\n" "\t\t\t\t\tmà số này là một phạm vi được đại diện như « N..M ».\n" "\t\t\t\t\tBỏ N thì mặc định là 1, còn bỏ M thì mặc định là MAX_USHRT\n" " -a, --ambiguous=SỐ\ttìm các hiệu bài có tên mờ hồ trong số ký tự này\n" "\n" " -x, --hex\t\tchỉ tìm các con số dạng thập lục\n" " -d, --decimal\tchỉ tìm các con số dạng thập phân\n" " -o, --octal\t\tchỉ tìm các con số dạng bát phân\n" "\t\tMặc định là tiến trình tìm tương ứng với con số có bất cứ cơ số nào.\n" "\n" " --help \t\thiển thị trợ giúp này rồi thoát\n" " --version \t\txuất ra thông tin phiên bản rồi thoát\n" #: src/lid.c:283 msgid "braces" msgstr "dấu ngoặc móc" #: src/lid.c:283 msgid "space" msgstr "dấu cách" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "thông báo : dùng « -e » bị phản đối: nên dùng « -r »" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Mọi bộ nhận diện không phải mơ hồ trong %d ký tự đầu\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "kiểu dáng « --key » không hợp lệ: « %s »" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "kiểu dáng « --result » không hợp lệ: « %s »" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "không thể khớp với biểu thức chính quy: hết bộ nhớ hoàn toàn" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "sửa ? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "không thể tạo tiến trình con" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "không thể thực hiện « %s »" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Sử dụng: %s [TÙY_CHỌN]... [TẬP_TIN]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Xây dựng cơ sở dữ liệu nhận diện.\n" " -o, --output=TỆP_RA\t\ttên của tập tin được xuất ra cơ sở dữ liệu ID.\n" " -f, --file=TỆP_RA\t\t\tcùng nghĩa với « --output »\n" " -i, --include=NGÔN_NGỮ\t\tgồm có các ngôn ngữ này\n" "\t\t(mặc định: « C C++ asm »)\n" " -x, --exclude=NGÔN_NGỮ\t\tloại trừ các ngôn ngữ này\n" " -l, --lang-option=L:TÙY_CHỌN\t\tgửi tùy chọn này làm mặc định\n" "\t\tcho ngôn ngữ L (xem dưới)\n" " -m, --lang-map=TỆP\t\tdùng tập tin này để ánh xạ tên tập tin\n" "\t\tvới ngôn ngữ nguồn\n" " -d, --default-lang=NGÔN_NGỮ\t\tđặt ngôn ngữ này là ngôn ngữ nguồn mặc " "định\n" " -p, --prune=TÊN\t\tloại trừ các tập tin/thư mục này\n" " -v, --verbose\t\tthông báo thống kê cho mỗi tập tin\n" " -s, --statistics\t\tthông báo thống kê một khi chạy xong\n" "\n" " --files0-from=F làm hiệu bài chỉ những tập tin được ghi rõ\n" " bằng tên chấm dứt NUL trong tập " "tin F\n" "\n" " --help \t\thiển thị trợ giúp này rồi thoát\n" " --version \t\txuất ra thông tin phiên bản rồi thoát\n" "\n" "TỆP có thể là một tên tập tin, hoặc một tên thư mục trong đó cần tìm kiếm đệ " "quy.\n" "Không đưa ra tập tin thì thư tìm kiếm trong mục hiện thời theo mặc định.\n" "Ghi chú rằng hai tùy chọn « --include » (bao gồm) và « --exclude » (loại " "trừ)\n" "loại từ lẫn nhau.\n" "\n" "Các đối số theo đây áp dụng cho những bộ quét đặc trưng cho ngôn ngữ :\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "gặp một toán hạng thừa %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "không thể kết hợp toán hạng tập tin với « --files0-from »" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "không thể mở %s để đọc" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: lỗi đọc" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" "khi đọc tên tập tin từ đầu vào tiêu chuẩn, không cho phép tên tập tin của %s" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "gặp tên tập tin không hợp lệ (có chiều dài số không)" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "không có gì cần làm" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "không thể tạo « %s » trong « %s »" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "không thể sửa đổi « %s »" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "không thể lấy trạng thái về « %s »" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " mới = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Tên=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Số=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Chuỗi=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Nghĩa chữ=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Ghi chú=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Tập tin=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Hiệu bài=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Byte=%ld Kb, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Miền nhớ=%llu+%llu Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Kết xuất=%ld (%ld hiệu bài, %ld lần)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Tần số=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Đang sắp xếp các hiệu bài...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Đang ghi « %s »...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "không thể tạo « %s »" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "giới hạn bên trong: hiệu số hơn 2^32" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "gặp lỗi khi đóng « %s »" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "cấp %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "In ra tất cả các hiệu bài được tìm trong một tập tin nguồn nào đó.\n" " -i, --include=NGÔN_NGỮ\t\tgồm có các ngôn ngữ này\n" "\t\t(mặc định: « C C++ asm »)\n" " -x, --exclude=NGÔN_NGỮ\t\tloại trừ các ngôn ngữ này\n" " -l, --lang-option=L:TÙY_CHỌN\t\tgửi tùy chọn này làm mặc định\n" "\t\tcho ngôn ngữ L (xem dưới)\n" " -m, --lang-map=TẬP_TIN\t\tdùng tập tin này để ánh xạ tên tập tin\n" "\t\tvới ngôn ngữ nguồn\n" " -d, --default-lang=NGÔN_NGỮ\t\tđặt ngôn ngữ này là ngôn ngữ nguồn mặc " "định\n" " -p, --prune=TÊN\t\tloại trừ các tập tin/thư mục này\n" "\n" " --files0-from=F làm hiệu bài chỉ những tập tin được ghi rõ\n" " bằng tên chấm dứt NUL trong tập " "tin F\n" "\n" " --help \t\thiển thị trợ giúp này rồi thoát\n" " --version \t\txuất ra thông tin phiên bản rồi thoát\n" "\n" "Các đối số theo đây áp dụng cho những bộ quét đặc trưng cho ngôn ngữ :\n" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/da.gmo������������������������������������������������������������������0000664�0000000�0000000�00000052667�12166360012�013126� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.��h��.�����(0�� ���=0�����J0��,���c0��,���0��#���0��/���0�� ���1��&���21��$���Y1�� ���~1�����1�����1�����1�����1��5���1���� 2����3�� ���m8�����{8�����i9�����Y:�����t:�� ���:�����:�����:�����:�����:�����:��#���;�����*;�����E;�����^;�����O<����^<�����r=�����=�����=�� ���=�� ���=�� ���=�� ���=��(���=�����!>��&���>��%��?��S��?B����C�����AK�� ���[K�����gK�� ���}K�����K�����K�����5L�����DL��'���dL�����L�����L�����L�����L�� ���L��#���L�����M�����&M�� ���CM�����dM�����uM�����wM��0���M��1���M�����M�� ���N��B��� N��E���PN��9���N�� ���N��)���N�����O�����1O��(���NO�����wO�����O��,���O��!���O�����O��0���O��8���0P��1���iP�����P�����P��"���P��+���P��'���Q��"���9Q�����\Q��/���yQ�����Q�����Q�����Q�����Q�����Q��1���R�����AR��2���ER��,���xR�����R�����R�� ���R�� ���R�� ��� S�����-S��0���=S�����nS�����S�����S�����S��(���S��2���S��3���(T�� ���\T�����fT��"���T�����T�����T��+���T��,���T��H���&U��<���oU�� ���U�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2011-01-09 00:32+01:00 Last-Translator: Keld Simonsen <keld@keldix.com> Language-Team: Danish <dansk@dansk-gruppen.dk> Language: da MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit � Rapportr fejl til � ny = %d/%d�%s: ugyldigt flag -- %c �%s: flaget '%c%s' tillader ikke et argument �%s: flaget '--%s' tillader ikke et argument �%s: flaget '%s' krver et argument �%s: flaget '-W --%s' tillader ikke et argument �%s: flaget '-W %s' er flertydig �%s: flaget '-W %s' krver et argument �%s: flaget krver et argument -- %c �%s: lsefejl�%s: ukendt flag '%c%s' �%s: ukendt flag '--%s' �'�, frekvens=%ld/%ld=%.2f �Alle identifikatorer er utvetydige de frste %d tegn �Assemblersprog: -c,--comment=TEGN Ethvert af disse TEGN begynder en kommentar som fortstter frem til linjeslut -k,--keep=TEGN Tillad TEGN i symboler og gem resultatet -i,--ignore=TEGN Tillad TEGN i symboler og kast resultatet bort -u,--strip-underscore Fjern indledende understreg fra symboler -n,--no-cpp Behandl ikke C-prprocessorkommandoer �Byg en database over identifikatorer. -o, --output=UDFIL filnavn p ID-database -f, --file=UDFIL synonym for --output -i, --include=SPROG inkludr SPROG (standardvrdi: 'C C++ asm') -x, --exclude=SPROG udelad SPROG -l, --lang-option=S:FLG videresend FLG som standard for sproget S (se nedenfor) -m, --lang-map=TABELFIL brug TABELFIL for at associere filnavn med rette kildetekstsprog -d, --default-lang=SPROG brug SPROG som standardsprog -p, --prune=NAVN udelad de angivne filer og/eller kataloger -v, --verbose udskriv statistik for hver fil -s, --statistics udskriv statistik i slutningen af krslen --files0-from=F lav kun symboler af filerne angivet ved NUL-terminerede navne i filen F --help vis denne hjlpetekst og afslut --version vis versionsinformation og afslut FIL kan vre et filnavn eller et katalognavn (for rekursiv sgning). Hvis ingen FIL angives gennemsges det nuvrende katalog som standard. Bemrk at '--include'- og '--exclude'-flagene er gensidigt udelukkende. De flgende flag pvirker de sprogspecifikke fortolkere: �Byte=%ld kB, �Sproget C: -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet bort -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng �Sproget C++: -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet bort -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng �Kollisioner=%ld/%ld=%.0f%%�Kommentar=%ld �Filer=%ld, �Heap=%llu+%llu Kb, �Ugyldig tilbagereference�Ugyldigt tegnklassenavn�Ugyldtigt sorteringstegn�Ugyldigt indhold af \{\}�Ugyldigt foregende regulrt udtryk�Ugyldig intervalafslutning�Ugyldigt regulrt udtryk�Sproget Java: -k,--keep=TEGN Tillad TEGN i tsymbol-strenge, behold resultatet -i,--ignore=TEGN Tillad TEGN i tsymbol-strenge, kast resultatet bort -u,--strip-underscore Fjern indledende understreg fra tsymbol-streng �Sproget Lisp: �List de identifikatorer som findes i FILNAVN eller, hvis ogs FILNAVN2 angives, de identifikatorer som findes i begge filer. -f, --file=FIL ID-databasens filnavn --help vis denne hjlpetekst og afslut --version udskriv versionsinformation og afslut �Bogstaveligt=%ld, �Udnyttelse=%ld/%ld=%.0f%%, �Hukommelse opbrugt�Navn=%ld, �Ingen trffer�Intet foregende regulrt udtryk�Tal=%ld, �Uddata=%ld (%ld symboler, %ld trffere) �Sproget Perl: -i,--include=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolbestandsdele -x,--exclude=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolafgrnsere -d,--dtags Inkludr dokumentationsmrker �Uafsluttet slutning p regulrt udtryk�Udskriv alle symboler fundet i en kildetekst. -i, --include=SPROG inkludr sprog i SPROG (standardvrdi: 'C C++ asm') -x, --exclude=SPROG udelad sprog i SPROG -l, --lang-option=S:FLG videresend FLG som standard for sproget S (se nedenfor) -m, --lang-map=TABELFIL brug TABELFIL for at associere filnavn med rette kildetekstsprog -d, --default-lang=SPROG brug SPROG som standardsprog -p, --prune=NAVNE udelad de angivne filer og/eller kataloger --files0-from=F lav kun symboler af filerne angivet ved NUL-terminerede navne i fil F --help vis denne hjlpetekst og afslut --version vis versionsinformation og afslut De flgende flag pvirker de sprogspecifikke fortolkere: �Udskriv navnene p de filer hvis indhold passer med MNSTER, ved at bruge jokertegn som i skallen. -f, --file=FIL ID-databasens filnavn -S, --separator=STIL STIL er en af 'braces', 'space' eller 'newline' --help vis denne hjlpetekst og afslut --version udskriv versionsinformation og afslut �Sprg ID-databasen og rapportr resultaterne. Som standard bestr uddata af flere linjer hvor hver linje indeholder den matchede identifikator, efterfulgt af en liste med navnene p de filer i hvilken den forekommer. -f, --file=FIL ID-databasens filnavn -i, --ignore-case match MNSTER uden forskel p store og sm bogstaver -l, --literal match MNSTER som en bogstavelig streng -r, --regexp match MNSTER som et regulrt udtryk -w, --word match MNSTER som et afgrnset ord -s, --substring match MNSTER som en delstreng Bemrk: Hvis MNSTER indeholder metategn i udvidet regulrt udtryk tolkes det som en regulr udtryksstreng. Ellers betragtes det som en bogstavelig streng. -k, --key=STIL STIL er en af 'token', 'pattern' eller 'none' -R, --result=STIL STIL er en af 'filenames', 'grep', 'edit' eller 'none' -S, --separator=STIL STIL er en af 'braces', 'space' eller 'newline' og glder kun for filnavne hvis '--result=filenames' STIL-flagene ovenfor bestemmer hvordan forsprgselsresultat prsenteres. Standardvrdien er --key=token --result=filenames --separator=%s -F, --frequency=FREK sg efter symboler som forekommer FREK gange, hvor FREK er et interval som angives som 'N..M'. Hvis N udelades antages det at vre 1, om M udelades antages det at vre MAX_USHRT -a, --ambiguous=LNGDE sg efter symboler hvis navn er tvetydigt inden for LNGDE tegn -x, --hex sg kun efter tal som angives heksadecimalt -d, --decimal sg kun efter tal som angives decimalt -o, --octal sg kun efter tal som angives oktalt Som standard sges efter alle tal uanset base. --help vis denne hjlpetekst og afslut --version vis versionsinformation og afslut �Regulrt udtryk for stort�Omhash=%d, �Sorterer symboler... �Streng=%ld, �Lykkedes�Textsprog: -i,--include=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolbestandsdele -x,--exclude=TEGNKLASSE Behandl tegn i TEGNKLASSE som symbolafgrnsere �Symboler=%ld, �Efterflgende baglns skrstreg�Prv '%s --help' for mere information. �Ukeldt systemfejl�Uparret ( eller \ �Uparret ) eller \)�Uparret [ eller [^�Uparret \{ �Brug: %s [FLAG] FILNAVN [FILNAVN2] �Brug: %s [FLAG]... MNSTER... �Brug: %s [FLAG]... [FIL]... �Brug: %s [FLAG]... [MNSTER]... �Skriver '%s'... �'�'%s' er flertydig�'%s' er ingen ID-fil! (fejlagtigt magisk nummer)�'%s' er version %d men jeg forstr kun version %d�kunne ikke finde '%s'�parenteser�kan ikke allokere %ld byte til hashtabel: lbet tr for hukommelse�kan ikke allokere obstack for sprogargument: lbet tr for hukommelse�kan ikke allokere sprogargument: lbet tr for hukommelse�kan ikke skifte katalog til '%s'�kan ikke skifte katalog til '%s' fra '%s'�kan ikke oprette '%s'�kan ikke oprette '%s' i '%s'�kan ikke bestemme 'io_size' i en streng!�kan ikke kre '%s'�kan ikke forgrene�kan ikke finde strrelsen p tabelfilen '%s'�kan ikke f fat p aktuel katalog�kan ikke finde 'ID'�kan ikke tage status (lstat(2)) p '%s' fra '%s'�kan ikke tolke regulrt udtryk: lbet tr for hukommelse�kan ikke blande tilvalgene --include og --exclude�kan ikke ndre '%s'�kan ikke bne '%s'�kan ikke bne sprogtabelfilen '%s'�kan ikke lse kataloget '%s' ('.' fra '%s')�kan ikke lse hele sprogtabelfilen '%s'�kan ikke lse sprogtabelfilen '%s'�kan ikke tage status p '%s'�kan ikke tage status (stat(2)) p '%s' fra '%s'�kan ikke bne %s til lsning�katalog�redigr? [y1-9^S/nq] �fejl ved lukning af '%s'�ekstra operand %s�kan ikke g tilbage til det frste arbejdskatalog�fil�filoperander kan ikke kombineres med --files0-from�intern begrnsning: afst p 2^32 eller mere�ugyldig '--key'-stil: '%s'�ugyldig '--result'-stil: '%s'�ugyldig '--separator'-stil: '%s'�ugyldigt filnavn med lngden nul�affald: '%c'�affald: '\%03o'�et sprognavn forventedes efter '%s' i filen '%s'�niveau %d: %ld/%ld = %.0f%% �hukommelsen er opbrugt�ingen filnavnsargumenter�ingentig at lave�bemrk: '%s' var en %s, men er nu en %s!�bemrk: fortolkningsparametrerne for '%s' ndredes�bemrk: brug af '-e' er forldet, brug '-r' istedet�mellemrum�for mange filnavnsargumenter�kan ikke f fat p aktuelt katalog�ukendt I/O-type: %d�ukendt sprog: '%s'�ikke-understttet strrelse i io_read(): %d�ikke-understttet strrelse i io_write(): %d�advarsel: '%s' og '%s' er samme fil men giver forskellige fortolkninger!�ved lsning af filnavne fra stdin tillades filnavnet %s ikke�skrivefejl��������������������������������������������������������������������������id-utils-4.6+git20120811/po/sv.po�������������������������������������������������������������������0000664�0000000�0000000�00000070223�12166360012�013012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Swedish messages for idutils. # Copyright (C) 2000, 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Christian Rose <menthos@menthos.com>, 2000, 2008. # msgid "" msgstr "" "Project-Id-Version: idutils 4.2\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2008-03-09 21:11+0100\n" "Last-Translator: Christian Rose <menthos@menthos.com>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: flaggan \"%s\" är tvetydig\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: flaggan \"--%s\" tar inget argument\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: flaggan \"%c%s\" tar inget argument\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: flaggan \"%s\" kräver ett argument\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: okänd flagga \"--%s\"\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: okänd flagga \"%c%s\"\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ogiltig flagga -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: flaggan kräver ett argument -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: flaggan \"-W %s\" är tvetydig\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tar inget argument\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: flaggan \"%s\" kräver ett argument\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "kan inte ta reda på aktuell katalog" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "kan inte ta reda på aktuell katalog" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "ogiltig \"--separator\"-stil: \"%s\"" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "kan inte bestämma \"io_size\" hos en sträng!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "kan inte öppna \"%s\"" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "\"%s\" är ingen ID-fil! (felaktigt magiskt nummer)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "\"%s\" är version %d men jag förstår bara version %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "ej understödd storlek i io_read(): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "okänd I/O-typ: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "kan inte allokera %ld byte till hashtabell: minnet slut" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Utnyttjande=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Omhash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Kollisioner=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "ej understödd storlek i io_write(): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "okänt språk: \"%s\"" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "kan inte allokera obstack för språkargument: minnet slut" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "kan inte allokera språkargument: minnet slut" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "ett språknamn förväntades efter \"%s\" i filen \"%s\"" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "kan inte öppna språktabellfilen \"%s\"" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "kan inte ta reda på storleken hos tabellfilen \"%s\"" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "kan inte läsa språktabellfilen \"%s\"" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "kan inte läsa hela språktabellfilen \"%s\"" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Språket C:\n" " -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll " "resultatet\n" " -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng " "resultatet\n" " -u,--strip-underscore Ta bort inledande understreck från " "ensymbolssträngar\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Språket C++:\n" " -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll " "resultatet\n" " -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng " "resultatet\n" " -u,--strip-underscore Ta bort inledande understreck från " "ensymbolssträngar\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Språket Java:\n" " -k,--keep=TECKEN Tillåt TECKEN i ensymbolssträngar, behåll " "resultatet\n" " -i,--ignore=TECKEN Tillåt TECKEN i ensymbolssträngar, släng " "resultatet\n" " -u,--strip-underscore Ta bort inledande understreck från " "ensymbolssträngar\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "skräp: \"%c\"" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "skräp: \"\\%03o\"" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assemblerspråk:\n" " -c,--comment=TECKEN Något av TECKEN påbörjar en kommentar som gäller\n" " fram till radslut\n" " -k,--keep=TECKEN Tillåt TECKEN i symboler och spara resultatet\n" " -i,--ignore=TECKEN Tillåt TECKEN i symboler och släng resultatet\n" " -u,--strip-underscore Ta bort inledande understreck från symboler\n" " -n,--no-cpp Hantera inte C-preprocessorkommandon\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Textspråk:\n" " -i,--include=TECKENKLASS Behandla tecken i TECKENKLASS som symbol-\n" " beståndsdelar\n" " -x,--exclude=TECKENKLASS Behandla tecken i TECKENKLASS som " "symbolavgränsare\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Språket Perl:\n" " -i,--include=TECKENKLASS Behandla tecken i TECKENKLASS som symbol-\n" " beståndsdelar\n" " -x,--exclude=TECKENKLASS Behandla tecken i TECKENKLASS som " "symbolavgränsare\n" " -d,--dtags Inkludera dokumentationstaggar\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Språket Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "kan inte läsa katalogen \"%s\" (\".\" från \"%s\")" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "anmärkning: \"%s\" var en %s, men är nu en %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "fil" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "katalog" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "varning: \"%s\" och \"%s\" är samma fil men genererade olika läsningsavtryck!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "anmärkning: läsningsparametrarna för \"%s\" ändrades" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "kan inte ta reda på aktuell katalog" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "kan inte byta katalog till \"%s\"" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "kan inte byta katalog till \"%s\" från \"%s\"" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "kan inte ta status (lstat(2)) på \"%s\" från \"%s\"" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "kan inte ta status (stat(2)) på \"%s\" från \"%s\"" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Prova \"%s --help\" för mer information.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Användning: %s [FLAGGA] FILNAMN [FILNAMN2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Lista de identifierare som finns i FILNAMN eller, om även\n" "FILNAMN2 anges, de identifierare som finns i båda filerna.\n" "\n" " -f, --file=FIL ID-databasens filnamn\n" " --help visa denna hjälp och avsluta\n" " --version skriv ut versionsinformation och avsluta\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Skicka synpunkter på översättningen till tp-sv@listor.tp-sv.se\n" "Rapportera fel till " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "inga filnamnsargument" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "för många filnamnsargument" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "kan inte hitta \"ID\"" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "\"%s\" är tvetydig" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "kunde inte hitta \"%s\"" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Användning: %s [FLAGGA]... [MÖNSTER]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Skriv ut namnen på de filer vars innehåll matchar MÖNSTER,\n" "genom att använda skalliknande jokertecken.\n" " -f, --file=FIL ID-databasens filnamn\n" " -S, --separator=STIL STIL är en av \"braces\", \"space\" eller \"newline" "\"\n" " --help visa denna hjälp och avsluta\n" " --version skriv ut versionsinformation och avsluta\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Användning: %s [FLAGGA]... MÖNSTER...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Fråga ID-databasen och rapportera resultat.\n" "Som standard består utdatan av flera rader där varje rad innehåller den\n" "matchade identifieraren, åtföljd av en lista med namnen på de filer i " "vilken\n" "den förekommer.\n" "\n" " -f, --file=FIL ID-databasens filnamn\n" "\n" " -i, --ignore-case matcha MÖNSTER utan skillnad på versaler och " "gemener\n" " -l, --literal matcha MÖNSTER som en ordagrann sträng\n" " -r, --regexp matcha MÖNSTER som ett reguljärt uttryck\n" " -w, --word matcha MÖNSTER som ett avgränsat ord\n" " -s, --substring matcha MÖNSTER som en sträng\n" " Observera: Om MÖNSTER innehåller metatecken i utökade reguljära\n" " uttryck tolkas det som en reguljär uttryckssträng.\n" " Annars betraktas det som en ordagrann sträng.\n" "\n" " -k, --key=STIL STIL är en av \"token\", \"pattern\" eller \"none\"\n" " -R, --result=STIL STIL är en av \"filenames\", \"grep\", \"edit\" " "eller \"none\"\n" " -S, --separator=STIL STIL är en av \"braces\", \"space\" eller \"newline" "\" och\n" " gäller endast för filnamn om \"--result=filenames\"\n" " STIL-flaggorna ovan bestämmer hur frågeresultat presenteras.\n" " Standardvärden är --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREK sök symboler som förekommer FREK gånger, där FREK " "är\n" " ett intervall som anges som \"N..M\". Om N " "utelämnas\n" " antas det vara 1, om M utelämnas antas det vara\n" " MAX_USHRT\n" " -a, --ambiguous=LÄNGD sök symboler vars namn är tvetydiga LÄNGD tecken\n" "\n" " -x, --hex sök endast tal som anges hexadecimalt\n" " -d, --decimal sök endast tal som anges decimalt\n" " -o, --octal sök endast tal som anges oktalt\n" " Som standard söks alla tal oavsett bas.\n" "\n" " --help visa denna hjälp och avsluta\n" " --version visa versionsinformation och avsluta\n" #: src/lid.c:283 msgid "braces" msgstr "parenteser" #: src/lid.c:283 msgid "space" msgstr "blanksteg" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "anmärkning: användning av \"-e\" är föråldrat, använd \"-r\" istället" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Alla identifierare är otvetydiga de första %d tecknen\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "ogiltig \"--key\"-stil: \"%s\"" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "ogiltig \"--result\"-stil: \"%s\"" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "kan inte tolka reguljärt uttryck: minnet slut" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "redigera? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "kan inte grena" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "kan inte köra \"%s\"" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Användning: %s [FLAGGA]... [FIL]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Bygg en databas över identifierare.\n" " -o, --output=UTFIL filnamn på ID-databas\n" " -f, --file=UTFIL synonym för --output\n" " -i, --include=SPRÅK inkludera SPRÅK (standardvärde: \"C C++ asm\")\n" " -x, --exclude=SPRÅK utelämna SPRÅK\n" " -l, --lang-option=S:FLG skicka FLG som standard för språket S (se nedan)\n" " -m, --lang-map=TABELLFIL använd TABELLFIL för att associera filnamn med\n" " rätt källkodsspråk\n" " -d, --default-lang=SPRÅK använd SPRÅK som standardspråk\n" " -p, --prune=NAMN utelämna de angivna filerna och/eller " "katalogerna\n" " -v, --verbose skriv ut statistik för enskilda filer\n" " -s, --statistics skriv ut statistik i slutet av körningen\n" "\n" " --help visa denna hjälp och avsluta\n" " --version visa versionsinformation och avsluta\n" "\n" "FIL kan vara ett filnamn eller ett katalognamn (för rekursiv sökning).\n" "Om ingen FIL anges söks som standard den nuvarande katalogen igenom.\n" "Observera att \"--include\"- och \"--exclude\"-flaggorna är ömsesidigt\n" "uteslutande.\n" "\n" "De följande flaggorna påverkar de språkspecifika läsarna:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "kan inte skapa \"%s\" i \"%s\"" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "kan inte modifiera \"%s\"" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "kan inte ta status på \"%s\"" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " ny = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Namn=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Tal=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Sträng=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Ordagrann=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Kommentar=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Filer=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Symboler=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Byte=%ld kB, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%d+%d kB, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Utdata=%ld (%ld symbol, %ld träff)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", frekvens=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sorterar symboler...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Skriver \"%s\"...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "kan inte skapa \"%s\"" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "fel vid stängning av \"%s\"" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "nivå %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Skriv ut alla symboler som hittas i en källfil.\n" " -i, --include=SPRÅK inkludera SPRÅK (standardvärde: \"C C++ asm\")\n" " -x, --exclude=SPRÅK utelämna SPRÅK\n" " -l, --lang-option=S:FLG skicka FLG som standard för språket S (se nedan)\n" " -m, --lang-map=TABELLFIL använd TABELLFIL för att associera filnamn med\n" " rätt källkodsspråk\n" " -d, --default-lang=SPRÅK använd SPRÅK som standardspråk\n" " -p, --prune=NAMN utelämna de angivna filerna och/eller " "katalogerna\n" " --help visa denna hjälp och avsluta\n" " --version visa versionsinformation och avsluta\n" "\n" "De följande flaggorna påverkar de språkspecifika läsarna:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: otillåten flagga -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" #~ msgid "invalid `--%s' style: `%s'" #~ msgstr "ogiltig \"--%s\"-stil: \"%s\"" #~ msgid "invalid `%s' style: `%s'" #~ msgstr "ogiltig \"%s\"-stil: \"%s\"" #~ msgid "%s: option `-%s' is ambiguous\n" #~ msgstr "%s: flaggan \"-%s\" är tvetydig\n" #~ msgid "%s: option `-%s' doesn't allow an argument\n" #~ msgstr "%s: flaggan \"-%s\" tar inget argument\n" #~ msgid "%s: option `--%s' is ambiguous\n" #~ msgstr "%s: flaggan \"--%s\" är tvetydig\n" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/quot.sed����������������������������������������������������������������0000664�0000000�0000000�00000000231�10623104751�013501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/remove-potcdate.sin�����������������������������������������������������0000664�0000000�0000000�00000000660�10623104751�015633� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ��������������������������������������������������������������������������������id-utils-4.6+git20120811/po/boldquot.sed������������������������������������������������������������0000664�0000000�0000000�00000000331�10623104751�014343� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/hu.gmo������������������������������������������������������������������0000664�0000000�0000000�00000020654�12166360012�013145� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������J������l��e���������P�� ���Q�����_��A���t��e������������+�����" �� ���< �� ���I ����U �� ���^ �����l �� ��� �� ��� ����� ��9�� �� ��� ����� �� ��� �� ��� ��&���, ��(���S ��!���| �� ��� ��#��� ����� ����� ��%��� ��.���, �����[ �����j ��9���q ��6��� ��.��� ����������%�����C�����U��(���o������� �������������������������0��������M�����_��!���o��)�����(�����!��������������� ���0�����:�����M�����R�����n�� ����� �����2���������������'��� ��(���4��3���]�����������������"�����#�����D���&����k�� ����������?���,����l�� ����� ������������'�� ���7�����D�� ���E�����S�� ���m�� ���w�������o������������$�� ���8�� ���F�����Q��(���l��#�����&�����#���������������"���%��4���H�� ���}�� �����C�����B�����9�����$���Y��-���~�������'�����-�������������2��/���E�����u�������&�����2���������������,���7��3���d��6�����*�����)�����&���$�����K�����T�����l�����q�� ����� ����� �����)������������� ��(���) ��8���R ��>��� ����� ����� ����� ��%���!��&���:!��J���a!��������>������:���3���������������D����������(���8���,���-��������������/��� ����������E����������6���9���#���������� ���A���@���H������ ���'�������������%����������G���������4���F���=���)���0���.���*���+������;�������J������� �������!�����������$���<���"����������?��� ��������������2������� �������5�������7�������������1���������I���������������������&�������������B������C���� new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: id-utils 3.2d Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2002-05-22 08:50GMT Last-Translator: Gbor Istvn <stive@mezobereny.hu> Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net> Language: hu MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-Generator: KBabel 0.9.5 � j = %d/%d�, ismtls=%ld/%ld=%.2f �Az sszes azonost nem egyrtelm az els %d karakteren bell �Assembly nyelv: -c,--comment=CHARS Az sszes CHARS-al kezdd sor megjegyzsnek minsl -k,--keep=CHARS Engedlyezi a CHARS-t a jelekben s az eredmnyt megtartja -i,--ignore=CHARS Engedlyezi a CHARS-t a jelekben s az eredmnyt elhagyja -u,--strip-underscore Leszedi a kezdeti alhzst a jelekrl -n,--no-cpp Nem kezeli a C pre-processor direktvkat �Bjt=%ld KB �C nyelv -k,--keep=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az eredmny megtartja -i,--ignore=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az eredmny eldobja -u,--strip-underscore Leszedi a kezdeti alhzst a nll jelekrl �tkzsek=%ld/%ld=%.0f%%�Megjegyzs=%ld �Fjlok =%ld,�Lista azonost elfordulhat a FJLNVBEN vagy ha megadja a FJLNV2-t akkor a mindkt fjlban. -f, --file=FJL az ID adatbzis fjl neve --help megjelenti ezt a segtsget s kilp --version kirja a verzi informcit s kilp �sztring =%ld,�Betlts=%ld/%ld=%.0f%%, �Nv=%ld, �Szm =%ld,�Output=%ld (%ld tok, %ld hit) �Kirja azokat a fjlokat melynek nevei illeszkednek a MINTRA hasznlhatja a shell-stlus keressei karaktereket(*,?) -f, --file=FJL az ID adatbzis fjl neve -S, --separator=STLUS A STLUS lehet braces', `space' vagy `newline' --help megjelenti ezt a segtsget s kilp --version kirja a verzi informcit s kilp �jra hash-els=%d,�Jelek rendezse... �Sztring =%ld,�Jelek=%ld,�Prbld a `%s --help'-et. �Hasznlat: %s [OPCI] FJLNV [FJLNV] �Hasznlat: %s [OPCI]...[MINTA]... �Hasznlat: %s [KAPCSOL]... [FJL]... �Hasznlat: %s[OPCIK]...[MINTA]... �A %s rsa... �%s nem egyrtelm�%s nem ID fjl(rossz mgikus szm)�a %s az %d verzij, de n csak a %d verzit ismerem�%s nincs meg�sszekapcsol�nem lehet %ld bjtot lefoglalni a hash tblnak:a memria elfogyott�nem lehet lefoglalni a nyelv args obstack-jt: a memria elfogyott�nem lehet lefoglalni a nyelv args-jt:a memria elfogyott�nem lehet knyvtrat vltani a %s-re�nem lehet knyvtrat vltani a %s-re a %s-rl�nem lehet ltrehozni a %s-t�nem lehet ltrehozni a `%s' -ben `%s'-t�nem lehet meghatrozni az io_size sztringet!�a %s nem futtathat�nem lehet elgazni�nem lehet meghatrozni a %s trkp fjl mrett�nem rem el a munka knyvtrat�nem tallom az ID-t�nem lehet megvizsglni a %s-bl a %s-t�nem azonos regulris kifelyezs: memria elfogyott�nem lehet mdostani a %s-t�nem lehet megnyitni a %s�nem lehet megnyitni a %s nyelvi trkp fjlt�nem lehet olvasni a `%s' knyvtrat (`.' `%s'-bl)�nem lehet olvasni a %s nyelvi trkp fjl bejegyzseit�nem lehet olvasni a %s nyelvi trkp fjlt�nem lehet statisztikt kszteni a %s-rl�nem lehet megvizsglni a %s-bl a %s-t�knyvtr�szerkeszt? [y1-9^S/nq] �fjl�rvnytelen '--key' stlus %s�rvnytelen '--result' stlus %s�szemt: %c�szemt: \%03o�a nyelv nevt a %s-nl a %s fjlban vrja�szint %d: %ld/%ld = %.0f%% �nem fjl nv az paramter�Megjegyzs: a %s az %s volt, de most %s!�megjegyzs: az ellenrzs paramterei megvltoztak %s-re�megjegyzs:a '-e' elavult, hasznlja helyette a '-r' kapcsolt�tl sok fjl nv paramter�ismeretlen I/O tpus: %d�ismeretlen a %s nyelv�nem tmogatott mret io_read (): %d�nem tmogatott mret io_write (): %d�figyelem: a %s s a %s ugyanaz a fjl, de a vizsglat eredmnye klnbz!�������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/Makevars����������������������������������������������������������������0000664�0000000�0000000�00000004144�12166360012�013515� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \ \ --flag=_:1:pass-c-format\ --flag=N_:1:pass-c-format\ --flag=error:3:c-format --flag=error_at_line:5:c-format\ \ --from-code=UTF-8\ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\ --flag=wrapf:1:c-format\ $${end_of_xgettext_options+} # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = bug-idutils@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/en@boldquot.header������������������������������������������������������0000664�0000000�0000000�00000002471�10623104751�015452� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ru.gmo������������������������������������������������������������������0000664�0000000�0000000�00000070123�12166360012�013153� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.��D���0�����0��$���1��=���'1��=���e1��8���1��=���1��+���2��8���F2��9���2�����2��)���2��)���3�����+3�����.3��[���M3��c��3���� 6�����<����=����>�����G@�����g@�����@�����@��6���@��B���@��8���,A��5���eA��]���A��>���A��@���8B����yB�����D����,D�����F��#���F�����>F�����^F�����mF��G���F�����F��B���F����)G��[���H��}��I��#��M�� ��O��E���n\��<���\��<���\�����.]�����?]��I��N]�����^��=���^��C���^��6���-_��)���d_��)���_��)���_�� ���_��Q���`��8���U`��5���`��8���`��,���`�����*a�����-a��O���Ka��U���a�����a�����b��s���&b�����b��{��� c��*���c��4���c��'���c��/���$d��>���Td��0���d��@���d��X���e��B���^e��,���e��;���e��t��� f��A���f��)���f��'���f��T���g��J���hg��k���g��X���h��7���xh��:���h��9���h�����%i��(���4i��"���]i��0���i��S���i�����j��m���j��a���|j��)���j��,���k��+���5k��D���ak�����k�����k��<���k��$���l�����-l��1���Ml�����l��7���l��\���l��p���4m�� ���m��D���m��S���m��9���Kn��%���n��@���n��A���n�����.o��w���o�����9p�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-06-18 18:24+0400 Last-Translator: Yuri Kozlov <yuray@komyakino.ru> Language-Team: Russian <gnu@mx.ru> Language: ru MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.11.4 Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); � Сообщения об ошибках направляйте на � новых = %d/%d�%s: неверный ключ -- %c �%s: ключу %c%s не требуется аргумент �%s: ключу --%s не требуется аргумент �%s: ключу --%s требуется аргумент �%s: ключу -W%s не требуется аргумент �%s: ключ -W%s неоднозначен �%s: ключу -W%s требуется аргумент �%s: ключу требуется аргумент -- %c �%s: ошибка чтения�%s: неизвестный ключ %c%s �%s: неизвестный ключ --%s �»�, Частота=%ld/%ld=%.2f �Все идентификаторы однозначны по первым %d знакам �Язык ассемблера: -c,--comment=CHARS Любой из знаков CHARS начинает комментарий до конца строки -k,--keep=CHARS Разрешить CHARS в лексемах, сохранить результат -i,--ignore=CHARS Разрешить CHARS в лексемах, выкинуть результат -u,--strip-underscore Удалять подчёркивание в начале строк-лексем -n,--no-cpp Не обрабатывать директивы препроцессора C �Создает базу данных идентификаторов (ID). -o, --output=OUTFILE имя файла базы данных ID результата -f, --file=OUTFILE синоним для --output -i, --include=LANGS включить языки LANGS (по умолчанию: "C C++ asm") -x, --exclude=LANGS исключить языки LANGS -l, --lang-option=L:OPT передать OPT как умолчание для языка L (см. ниже) -m, --lang-map=MAPFILE использовать MAPFILE для сопоставления файлов с языками -d, --default-lang=LANG сделать LANG языком по умолчанию -p, --prune=NAMES исключить файлы/каталоги NAMES -v, --verbose выводить статистику для каждого файла -s, --statistics выводить статистику в конце --files0-from=F извлекать лексемы только у файлов, указанных в именах с NUL на конце из файла F --help показать справку и выйти --version вывести информацию о версии и выйти FILE может быть именем файла или каталога (для рекурсивного поиска). Если FILE не задан, используется текущий каталог. Заметим, что ключи `--include' и `--exclude' взаимно исключающие. Следующие аргументы специфичны для сканеров различных языков: �Байт=%ld Кб, �Язык C: -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить результат -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть результат -u,--strip-underscore Удалять подчёркивание в начале строк-лексем �Язык C++: -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить результат -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть результат -u,--strip-underscore Удалять подчёркивание в начале строк-лексем �Коллизий=%ld/%ld=%.0f%%�Комментариев=%ld �Файлов=%ld, �Куча=%llu+%llu Кб, �Недопустимая обратная ссылка�Недопустимое имя для класса символа�Недопустимый символ сравнения�Недопустимое содержимое в \{\}�Недопустимое предшествующее регулярное выражение�Недопустимое окончание диапазона�Неправильное регулярное выражение�Язык Java: -k,--keep=CHARS Разрешить CHARS в строках-лексемах, сохранить результат -i,--ignore=CHARS Разрешить CHARS в строках-лексемах, выкинуть результат -u,--strip-underscore Удалять подчёркивание в начале строк-лексем �Язык Lisp: �Выводит список идентификаторов, которые встречаются в ИМЯ_ФАЙЛА, или если есть ИМЯ_ФАЙЛА2, то выводит список идентификаторов в обоих файлах. -f, --file=ФАЙЛ имя файла базы данных ID --help показать справку и выйти --version вывести информацию о версии и выйти �Знаков=%ld, �Загружено=%ld/%ld=%.0f%%, �Память исчерпана�Имён=%ld, �Нет соответствия�Нет предыдущего регулярного выражения�Чисел=%ld, �Результат=%ld (%ld лексем, %ld попаданий) �Язык Perl: -i,--include=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как составляющие лексем -x,--exclude=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как разделители лексем -d,--dtags Включать теги документации �Преждевременное окончание регулярного выражения�Выводит все лексемы, найденные в исходных файлах. -i, --include=LANGS включить языки LANGS (по умолчанию: "C C++ asm") -x, --exclude=LANGS исключить языки LANGS -l, --lang-option=L:OPT передать OPT как умолчание для языка L (см. ниже) -m, --lang-map=MAPFILE использовать MAPFILE для сопоставления файлов с языками -d, --default-lang=LANG сделать LANG языком по умолчанию -p, --prune=NAMES исключить файлы/каталоги NAMES --files0-from=F извлекать лексемы только у файлов, указанных в именах с NUL на конце из файла F --help показать справку и выйти --version вывести информацию о версии и выйти Следующие аргументы специфичны для сканеров различных языков: �Печатает содержащиеся имена файлов, подходящие под шаблон PATTERN. -f, --file=FILE имя файла базы данных ID -S, --separator=STYLE STYLE может быть одним из `braces' (фигурные скобки), `space' (пробел) или `newline' (новая строка) --help показать справку и выйти --version вывести информацию о версии и выйти �Производит поиск в базе данных ID и выдает результат. По умолчанию вывод состоит из нескольких строк, содержащих совпадающие идентификаторы с последующим списков имён файлов, в которых они встречаются. -f, --file=FILE имя файла базы данных ID -i, --ignore-case совпадение с PATTERN не зависит от регистра -l, --literal буквальное совпадение с PATTERN -r, --regexp совпадение с PATTERN по регулярному выражению -w, --word совпадение с PATTERN как разделяющее слово -s, --substring совпадение с PATTERN по подстроке Замечание: если PATTERN содержит мета-символы расширенного регулярного выражения, он рассматривается как подстрока регулярного выражения, иначе PATTERN рассматривается как слово. -k, --key=STYLE STYLE может быть одним из `token' (лексема), `pattern' (шаблон) или `none' (нет) -R, --result=STYLE STYLE может быть одним из `filenames' (имена файлов), `grep' (поиск), `edit' (редактировать) или `none' (ничего) -S, --separator=STYLE STYLE может быть одним из `braces' (фигурные скобки), `space' (пробел) или `newline' (новая строка); применяется только к именам файлов когда `--result=filenames' Эти ключи управляют представлением результатов запроса. Умолчания: --key=token --result=filenames --separator=%s -F, --frequency=FREQ искать лексемы, которые появляются FREQ раз, где FREQ -- это диапазон, представленный как 'N..M'. Если N опущено, то по умолчанию равно 1. Если M опущено, то по умолчанию равно MAX_USHRT -a, --ambiguous=LEN искать лексемы, которые неоднозначны при длине LEN -x, --hex искать только шестнадцатеричные числа -d, --decimal искать только десятичные числа -o, --octal искать только восьмеричные числа По умолчанию по поиску находятся числа с любым основанием. --help показать справку и выйти --version вывести информацию о версии и выйти �Регулярное выражение слишком большое�Повторных вызовов хэш-функции=%d, �Выполняется сортировка лексем... �Строк=%ld, �Успешно�Текстовый язык: -i,--include=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как составляющие лексем -x,--exclude=CHAR-CLASS Воспринимать знаки из CHAR-CLASS как разделители лексем �Лексем=%ld, �Завершающая обратная косая черта�Подробная справка по команде `%s --help'. �Неизвестная системная ошибка�Непарный символ ( или \(�Непарный символ ) или \)�Непарный символ [ или [^�Непарный символ \{�Использование: %s [КЛЮЧ] ИМЯ_ФАЙЛА [ИМЯ_ФАЙЛА2] �Использование: %s [OPTION]... [PATTERN]... �Использование: %s [OPTION]... [FILE]... �Использование: %s [OPTION]... [PATTERN]... �Выполняется запись `%s'... �«�`%s' неоднозначен�`%s' не является файлом ID! (неверный префикс #)�`%s' версии %d: возможна работа только с версией %d�`%s' не найден�фигурные скобки�не удалось выделить %ld байт для хэш-таблицы: закончилась память�не удалось выделить память под obstack аргументов языка: закончилась память�не удалось выделить память под аргументы языка: закончилась память�не удалось перейти в `%s'�не удалось перейти в `%s' из `%s'�не удалось создать `%s'�не удалось создать `%s' в `%s'�не удалось определить io_size строки!�не удалось выполнить exec `%s'�не удалось запустить новый процесс�не удалось получить размер файла соотношения `%s'�не удалось получить рабочий каталог�не удалось найти файл `ID'�не удалось выполнить lstat `%s' из `%s'�не удалось сопоставить регулярное выражение: не хватает памяти�нельзя смешивать ключи --include и --exclude�не удалось изменить `%s'�не удалось открыть `%s'�не удалось открыть файл соотношения языков `%s'�не удалось прочитать каталог `%s' (`.' из `%s')�не удалось прочитать файл соотношения языков `%s' полностью�не удалось прочитать файл соотношения языков `%s'�не удалось выполнить stat для `%s'�не удалось выполнить stat `%s' из `%s'�не удалось открыть %s для чтения�каталог�редактировать? [y1-9^S/nq] �ошибка закрытия `%s'�дополнительный аргумент %s�не удалось вернуть начальный рабочий каталог�файл�файловые аргументы нельзя указывать одновременно с --files0-from�внутреннее ограничение: смещение равно 2^32 или больше�неверный стиль `--key': `%s'�неверный стиль `--result': `%s'�неверный стиль --separator: %s�недопустимое имя файла нулевой длины�мусор: `%c'�мусор: `\%03o'�имя языка `%s' ожидалось в файле `%s'�уровень %d: %ld/%ld = %.0f%% �исчерпана память�нет аргументов имён файлов�нечего выполнять�замечание: `%s' был %s, а сейчас %s!�замечание: параметры сканирования изменены для `%s'�замечание: использование `-e' не рекомендуется, используйте `-r'�пробел�слишком много аргументов имён файлов�не удалось запомнить текущий рабочий каталог�неизвестный тип ввода/вывода: %d�неизвестный язык: `%s'�не поддерживаемый размер в io_read (): %d�не поддерживаемый размер в io_write (): %d�внимание: `%s' и `%s' тот же самый файл, но выдает различные результаты сканирования�при чтении имён файлов из stdin, имя файла для %s указывать запрещено�ошибка записи����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ga.gmo������������������������������������������������������������������0000664�0000000�0000000�00000026656�12166360012�013130� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������S��������q���L������������� ���"�����0��A���E��e����������������� ����� �� ��� �� ��� ����� ����� ����) �� ���2 �����@ �� ���V �� ���a �����n ����� ��9��d�� ���������� ���������� ���x��&�����(�����!����� �����#��������<�����M��%���_��.���������������9�����6�����.���;�����j�����~������������(���������� �������� �����,�����H�����Z��0���u������������!�����)�����(�����!���=�����_�����o�� ������������������������������!����� ����� ���&��2���4�����g�������'�����(�����3�������������%�����B�����W��"���s��#�����D�����y���� ���y�� ����������O���������������� ������#���R�� ���v�� ��������� ���4 ��,��B �����o!�����!�� ���!�� ���!��)���!��8��!��c��#�����{$��"���$�����$����$�����%��:���%��+���&�����D&��!���d&��!���&�����&�����&��-���&��2���&�����0'�����@'��F���S'��K���'��5���'�����(�����3(�����Q(�����j(��(���(�����(�����(��,���(��"���)�����3)�����K)��=���k)�����)�����)��+���)��.��� *��4���9*��)���n*�����*�����*�� ���*�����*�����*�����+�����+��!���6+��$���X+�� ���}+�����+��<���+�����+��"���+��*���,��9���F,��5���,�����,��(���,�����,�����,��#���-��$���8-��P���]-��������>���������������A�������F��� ����������E���0����������%���(���H���!������8�������:�����������������G���@���)���N������J�������������"��� ���L������2��������������9�������-���*�������#���&���/���1���6���7���'���=���O������S���D������R���������� �������4���K���P�������C���5���������I����������$��� ���B�������;�������������Q�����������M���+����������������������3��� �����������<���?��������������������,���.��������� ���� Report bugs to � new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �error closing `%s'�file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: idutils 4.2 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2007-07-21 18:36-0500 Last-Translator: Kevin Scannell <kscanne@gmail.com> Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net> Language: ga MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit � Seol tuairisc fabhtanna chuig � nua = %d/%d�, Minic=%ld/%ld=%.2f �Is aonchiallach iad na haitheantir uile, taobh istigh den chad %d carachtar �Teanga dholama: -c,--comment=CARACHTAIR Tosaonn aon cheann de na CARACHTAIR nta trchta, go dt deireadh na lne -k,--keep=CARACHTAIR Ceadaithe i dteaghrin chomhartha; coimed an toradh -i,--ignore=CARACHTAIR Ceadaithe i dteaghrin chomhartha; caith an toradh i dtraipis -u,--strip-underscore Struipeil fostroc thosaigh theaghrin chomhartha -n,--no-cpp N limhseil treoracha ramhphrisela C �Bearta=%ld Kb, �Teanga C: -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; coimed an toradh -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; caith an toradh i dtraipis -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon chomhartha amhin �Teanga C++: -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; coimed an toradh -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; caith an toradh i dtraipis -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon chomhartha amhin �Tuairteanna haisela=%ld/%ld=%.0f%%�Nta=%ld �Comhaid=%ld, �Teanga Java: -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; coimed an toradh -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon teaghrn comhartha amhin; caith an toradh i dtraipis -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon chomhartha amhin �Teanga Lisp: �Taispein na haitheantir at i gCOMHADAINM, n m t COMHADAINM2 ann freisin, taispein na haitheantir at i ngach comhad. -f, --file=COMHAD comhadainm an bhunachair sonra ID --help taispein an chabhair seo agus scoir --version taispein eolas faoin leagan agus scoir �Teaghrn Litriil=%ld, �Ld=%ld/%ld=%.0f%%, �Ainm=%ld, �Uimhir=%ld, �Aschur=%ld (%ld comhartha, %ld aimsithe) �Teanga Perl: -i,--include=AICME Is pirt de theaghrin chomhartha iad na carachtair in AICME -x,--exclude=AICME Is teormharcir idir teaghrin chomhartha iad na carachtair in AICME -d,--dtags Cuir clibeanna doicimadaithe san ireamh �Taispein ainmneacha de chomh-chomhaid at comhoirinach le PATRN, le saorga de chinel na blaoisce. -f, --file=COMHAD comhadainm an bhunachair sonra ID -S, --separator=STL ceann de `braces', `space' n `newline' --help taispein an chabhair seo agus scoir --version taispein eolas faoin leagan agus scoir �Ath-haiseil=%d, �Teaghrin chomhartha srtil... �Teaghrn=%ld, �Teanga thacs: -i,--include=AICME Is pirt de theaghrin chomhartha iad na carachtair in AICME -x,--exclude=AICME Is teormharcir idir teaghrin chomhartha iad na carachtair in AICME �Teaghrin Chomhartha=%ld, �Bain triail as `%s --help' chun tuilleadh eolais a fhil. �sid: %s [ROGHA] COMHADAINM [COMHADAINM2] �sid: %s [ROGHA]... PATRN... �sid: %s [ROGHA]... [COMHAD]... �sid: %s [ROGHA]... [PATRN]... �`%s' scrobh... �is dbhroch `%s'�n comhad ID `%s'! (drochuimhir dhraochta)�t `%s' ag leagan %d, ach n thuigim ach leagan %d�`%s' gan aimsi�libn slabhracha�n fidir %ld beart a dhileadh le haghaidh hais-tbla: cuimhne dithe�n fidir radchruach a chruth le haghaidh argint teanga: cuimhne dithe�n fidir argint teanga a dhileadh: cuimhne dithe�theip ar chdir go `%s'�theip ar chdir go `%s' `%s'�n fidir `%s' a chruth�n fidir `%s' a chruth i `%s'�n fidir io_size de theaghrn a shocr!�n fidir `%s' a rith�n fidir forc a dhanamh�n fidir mid an chomhaid mapa `%s' a fhil�n fidir comhadlann oibre a fhil�n fidir `ID' a aimsi�n fidir `%s' a `lstat' `%s'�n fidir an slonn ionadaochta a mheaitseil: cuimhne dithe�n fidir `%s' a mhionathr�n fidir `%s' a oscailt�n fidir comhad mapa teanga `%s' a oscailt�n fidir comhadlann `%s' a lamh (`.' `%s')�n fidir comhad mapa teanga `%s' a lamh go hiomln�n fidir comhad mapa teanga `%s' a lamh�n fidir `%s' a stat�n fidir `%s' a `stat' `%s'�comhadlann�cuir in eagar? [y1-9^S/nq] �earrid agus `%s' dhnadh�comhad�stl neamhbhail `--key': `%s'�stl neamhbhail `--result': `%s'�stl neamhbhail `--separator': `%s'�bruscar: `%c'�bruscar: `\%03o'�bhothas ag sil le hainm teanga tar is `%s' i gcomhad `%s'�leibhal %d: %ld/%ld = %.0f%% �gan chomhadainmneacha mar argint�fgra: bh `%s' ina %s, ach is %s anois!�fgra: d'athraigh na paraimadair scanta le haghaidh `%s'�fgra: t an rogha `-e' i lig, sid `-r' ina hionad�sps�an iomarca comhadainmneacha mar argint�cinel anaithnid I/A: %d�teanga anaithnid: `%s'�mid gan tacaocht i io_read (): %d�mid gan tacaocht i io_write (): %d�rabhadh: is an comhad canna `%s' agus `%s', ach tugann siad scanta difrila!�����������������������������������������������������������������������������������id-utils-4.6+git20120811/po/hu.po�������������������������������������������������������������������0000664�0000000�0000000�00000066114�12166360012�013002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Hungarian translation of gnu id-utils. # Copyright (C) 2002 Free Software Foundation, Inc. # Gbor Istvn <stive@mezobereny.hu>, 2002. # msgid "" msgstr "" "Project-Id-Version: id-utils 3.2d\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2002-05-22 08:50GMT\n" "Last-Translator: Gbor Istvn <stive@mezobereny.hu>\n" "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.5\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: a `%s' kapcsol nem egyrtelm\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: a `--%s' kapcsol nem enged meg argumentumot\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: a `%c%s' kapcsol nem enged meg argumentumot\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: a `%s' kapcsolhoz argumentum szksges\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: a `--%s' kapcsol ismeretlen\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: a `%c%s' kapcsol ismeretlen\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: rvnytelen kapcsol -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: a kapcsolnak szksge van egy argumentumra -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: a `%s' kapcsol nem egyrtelm\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: a `--%s' kapcsol nem enged meg argumentumot\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: a `%s' kapcsolhoz argumentum szksges\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "nem rem el a munka knyvtrat" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "nem rem el a munka knyvtrat" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, fuzzy, c-format msgid "invalid `--separator' style: `%s'" msgstr "rvnytelen '--key' stlus %s" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "nem lehet meghatrozni az io_size sztringet!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "nem lehet megnyitni a %s" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "%s nem ID fjl(rossz mgikus szm)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "a %s az %d verzij, de n csak a %d verzit ismerem" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "nem tmogatott mret io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "ismeretlen I/O tpus: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "nem lehet %ld bjtot lefoglalni a hash tblnak:a memria elfogyott" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Betlts=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "jra hash-els=%d," #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "tkzsek=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "nem tmogatott mret io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "ismeretlen a %s nyelv" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "nem lehet lefoglalni a nyelv args obstack-jt: a memria elfogyott" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "nem lehet lefoglalni a nyelv args-jt:a memria elfogyott" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "a nyelv nevt a %s-nl a %s fjlban vrja" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "nem lehet megnyitni a %s nyelvi trkp fjlt" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "nem lehet meghatrozni a %s trkp fjl mrett" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "nem lehet olvasni a %s nyelvi trkp fjlt" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "nem lehet olvasni a %s nyelvi trkp fjl bejegyzseit" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C nyelv\n" " -k,--keep=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny megtartja\n" " -i,--ignore=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny eldobja\n" " -u,--strip-underscore Leszedi a kezdeti alhzst a nll jelekrl\n" #: libidu/scanners.c:460 #, fuzzy, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C nyelv\n" " -k,--keep=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny megtartja\n" " -i,--ignore=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny eldobja\n" " -u,--strip-underscore Leszedi a kezdeti alhzst a nll jelekrl\n" #: libidu/scanners.c:471 #, fuzzy, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C nyelv\n" " -k,--keep=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny megtartja\n" " -i,--ignore=CHARS Engedlyezi a nll jel sztringekben a CHARS-t,az " "eredmny eldobja\n" " -u,--strip-underscore Leszedi a kezdeti alhzst a nll jelekrl\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "szemt: %c" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "szemt: \\%03o" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assembly nyelv:\n" " -c,--comment=CHARS Az sszes CHARS-al kezdd sor megjegyzsnek " "minsl\n" " -k,--keep=CHARS Engedlyezi a CHARS-t a jelekben s az eredmnyt " "megtartja\n" " -i,--ignore=CHARS Engedlyezi a CHARS-t a jelekben s az eredmnyt " "elhagyja\n" " -u,--strip-underscore Leszedi a kezdeti alhzst a jelekrl\n" " -n,--no-cpp Nem kezeli a C pre-processor direktvkat\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "nem lehet olvasni a `%s' knyvtrat (`.' `%s'-bl)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "Megjegyzs: a %s az %s volt, de most %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "fjl" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "knyvtr" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "figyelem: a %s s a %s ugyanaz a fjl, de a vizsglat eredmnye klnbz!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "megjegyzs: az ellenrzs paramterei megvltoztak %s-re" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "nem rem el a munka knyvtrat" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "nem lehet knyvtrat vltani a %s-re" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "nem lehet knyvtrat vltani a %s-re a %s-rl" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "nem lehet megvizsglni a %s-bl a %s-t" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "nem lehet megvizsglni a %s-bl a %s-t" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Prbld a `%s --help'-et.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Hasznlat: %s [OPCI] FJLNV [FJLNV]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Lista azonost elfordulhat a FJLNVBEN vagy ha \n" "megadja a FJLNV2-t akkor a mindkt fjlban.\n" "\n" " -f, --file=FJL az ID adatbzis fjl neve\n" " --help megjelenti ezt a segtsget s kilp\n" " --version kirja a verzi informcit s kilp\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "nem fjl nv az paramter" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "tl sok fjl nv paramter" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "nem tallom az ID-t" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "%s nem egyrtelm" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "%s nincs meg" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Hasznlat: %s[OPCIK]...[MINTA]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Kirja azokat a fjlokat melynek nevei illeszkednek a MINTRA\n" "hasznlhatja a shell-stlus keressei karaktereket(*,?) -f, --" "file=FJL az ID adatbzis fjl neve\n" " -S, --separator=STLUS A STLUS lehet braces', `space' vagy `newline'\n" " --help megjelenti ezt a segtsget s kilp\n" " --version kirja a verzi informcit s kilp\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Hasznlat: %s [OPCI]...[MINTA]...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Lekrdezi az ID adatbzist s jelentst kszt.\n" "Alapbl a kimenet tbb sort tartalmaz, mindegyik sor tartalmazza a\n" "az illeszked azonostkat majd ezt kveti a fjl neve amelyikben feltnt\n" "\n" " -f, --file=FJL az ID adatbzis fjl neve\n" "\n" " -i, --ignore-case a MINTBAN nem tesz klnbsget a kis s nagy bet " "kztt\n" " -l, --literal a MINTBAN csak bet szerinti egyezst fogad el\n" " -r, --regexp a MINTT, mint regulris kifelyezs kezeli\n" " -w, --word a MINTA egy elhatrolt sz\n" " -s, --substring a MINTA egy alsztring\n" " Megjegyzs: Ha a MINTA tartalmaz egy kibvtett regulris meta-\n" " karaktert, akkor regulris kifelyezs alsztringjeknt lesz " "kezelve.\n" " egybknt a MINTT betrl-betre val egyezst hasznl\n" " \n" " -k, --key=STLUS STLUS lehet `token', `pattern' vagy `none'\n" " -R, --result=STLUS STLUS lehet `filenames', `grep', `edit' vagy " "`none'\n" " -S, --separator=STLUS STLUS lehet `braces', `space' vagy `newline' s\n" " csak akkor alkalmazza a fjlnevekre amikor `--" "result=filenames' kapcsolt hasznlja\n" " A STLUS opcik a kimenet megjelentst szablyozzk.\n" " Alapbl --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=ISMTLS a megkeresi azokat a jeleket amelyek ISMTLS-" "szor elfordulnak\n" " ahol az ISMTLS egy intervallum N..M.Ha nem r N-t akkor \n" " alapbl 1-et hasznl, ha az M-et hagyja ki akkor az " "alapbellts a MAX_USHRT vltoz\n" " -a, --ambiguous=HOSSZ ahol a megtallt jel nem egyrtelm ott a HOSSZ-t " "hasznlja\n" "\n" " -x, --hex a megtallt szmokat tizenhatos szmrendszer-belinek " "veszi\n" " -d, --decimal a megtallt szmokat tzes szmrendszer-belinek " "vesszi\n" " -o, --octal a megtallt szmokat nyolcas szmrendszer-belinek " "vesszi\n" " Alapbl az sszes szmrendszert elfogadja.\n" "\n" " --help megjelenti ezt a segtsget s kilp\n" " --version megjelenti a verzi informcikat s kilp\n" #: src/lid.c:283 msgid "braces" msgstr "sszekapcsol" #: src/lid.c:283 #, fuzzy msgid "space" msgstr "hely" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "megjegyzs:a '-e' elavult, hasznlja helyette a '-r' kapcsolt" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Az sszes azonost nem egyrtelm az els %d karakteren bell\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "rvnytelen '--key' stlus %s" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "rvnytelen '--result' stlus %s" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "nem azonos regulris kifelyezs: memria elfogyott" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "szerkeszt? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "nem lehet elgazni" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "a %s nem futtathat" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Hasznlat: %s [KAPCSOL]... [FJL]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Ltrehozz egy azonost(ID) adatbzist.\n" " -o, --output=OUTFILE az ID adatbzis fjl neve\n" " -f, --file=OUTFILE ugyanaz, mint az --output\n" " -i, --include=LANGS a LANGS nyelveket hasznlja(alapbl: \"C C++ asm" "\")\n" " -x, --exclude=LANGS a LANGS nyelveket nem hasznlja\n" " -l, --lang-option=L:OPT az OPT -ot teszi az alaprtelmezett nyelv(lsd " "ksbb)\n" " -m, --lang-map=MAPFJL a MAPFJL-t hasznlja a fjlnevek mappelshez a " "forrs nyelvhez\n" " -d, --default-lang=LANG ltrehozza a LANG-et alaprtelmezett forrs-" "nyelvnek\n" " -p, --prune=NEVEK kihagyja a NEVEK fjlokat s knyvtrakat\n" " -v, --verbose a statisztika eredmnyt fjlonknt kirja\n" " -s, --statistics a statisztika eredmnyt a futs vgn kirja\n" "\n" " --help megjelenti ezt a segtsget s kilp\n" " --version megjelenti a verzi informcikat s kilp\n" "\n" "A FJL lehet fjlnv vagy knyvtrnv a rekrziv keresshez\n" "Ha nincs meg adva FJL, akkor az aktulis knyvtrban kezd el keresni\n" "Megjegyzs: az `--include' s `--exclude' opcik egymst kizrjk.\n" "\n" "A kvetkez opcikat alkalmazza a nyelv-specifikus ellenrzk\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "nem lehet ltrehozni a `%s' -ben `%s'-t" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "nem lehet mdostani a %s-t" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "nem lehet statisztikt kszteni a %s-rl" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " j = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nv=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Szm =%ld," #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Sztring =%ld," #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "sztring =%ld," #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Megjegyzs=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Fjlok =%ld," #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Jelek=%ld," #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bjt=%ld KB " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Dinamikus munkaterlet=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Output=%ld (%ld tok, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", ismtls=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Jelek rendezse...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "A %s rsa...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "nem lehet ltrehozni a %s-t" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "szint %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Kirja az sszes megtallt jelet a forrs fjlban.\n" " -i, --include=LANGS a LANGS nyelveket hasznlja(alapbl: \"C C++ asm" "\")\n" " -x, --exclude=LANGS a LANGS nyelveket nem hasznlja\n" " -l, --lang-option=L:OPT az OPT -ot teszi az alaprtelmezett nyelv(lsd " "ksbb)\n" " -m, --lang-map=MAPFJL a MAPFJL-t hasznlja a fjlnevek mappelshez a " "forrs nyelvhez\n" " -d, --default-lang=LANG ltrehozza a LANG-et alaprtelmezett " "forrsnyelvnek\n" " -p, --prune=NEVEK kihagyja a NEVEK fjlokat s knyvtrakat\n" " --help megjelenti ezt a segtsget s kilp\n" " --version megjelenti a verzi informcikat s kilp\n" "\n" "A kvetkez opcikat alkalmazza a nyelv-specifikus ellenrzk\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: illeglis kapcsol -- %c\n" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ga.po�������������������������������������������������������������������0000664�0000000�0000000�00000071626�12166360012�012761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Irish translations for idutils. # Copyright (C) 2005 Free Software Foundation, Inc. # Kevin Patrick Scannell <scannell@SLU.EDU>, 2005, 2007. # msgid "" msgstr "" "Project-Id-Version: idutils 4.2\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2007-07-21 18:36-0500\n" "Last-Translator: Kevin Scannell <kscanne@gmail.com>\n" "Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n" "Language: ga\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: T an rogha `%s' dbhroch\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: n cheadatear argint i ndiaidh na rogha `--%s'\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: n cheadatear argint i ndiaidh na rogha `%c%s'\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: t argint de dhth i ndiaidh na rogha `%s'\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: rogha anaithnid `--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: rogha anaithnid `%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: rogha neamhbhail -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: t argint de dhth i ndiaidh na rogha -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: T rogha `-W %s' dbhroch\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: n cheadatear argint i ndiaidh na rogha `-W %s'\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: t argint de dhth i ndiaidh na rogha `%s'\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "n fidir comhadlann oibre a fhil" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "n fidir comhadlann oibre a fhil" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "stl neamhbhail `--separator': `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "n fidir io_size de theaghrn a shocr!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "n fidir `%s' a oscailt" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "n comhad ID `%s'! (drochuimhir dhraochta)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "t `%s' ag leagan %d, ach n thuigim ach leagan %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "mid gan tacaocht i io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "cinel anaithnid I/A: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "n fidir %ld beart a dhileadh le haghaidh hais-tbla: cuimhne dithe" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Ld=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Ath-haiseil=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Tuairteanna haisela=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "mid gan tacaocht i io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "teanga anaithnid: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" "n fidir radchruach a chruth le haghaidh argint teanga: cuimhne dithe" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "n fidir argint teanga a dhileadh: cuimhne dithe" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "bhothas ag sil le hainm teanga tar is `%s' i gcomhad `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "n fidir comhad mapa teanga `%s' a oscailt" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "n fidir mid an chomhaid mapa `%s' a fhil" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "n fidir comhad mapa teanga `%s' a lamh" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "n fidir comhad mapa teanga `%s' a lamh go hiomln" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Teanga C:\n" " -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; coimed an toradh\n" " -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; caith an toradh i " "dtraipis\n" " -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon\n" " chomhartha amhin\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Teanga C++:\n" " -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; coimed an toradh\n" " -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; caith an toradh i " "dtraipis\n" " -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon\n" " chomhartha amhin\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Teanga Java:\n" " -k,--keep=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; coimed an toradh\n" " -i,--ignore=CARACHTAIR Carachtair at ceadaithe i dteaghrin le haon\n" " teaghrn comhartha amhin; caith an toradh i " "dtraipis\n" " -u,--strip-underscore Struipeil fostroc thosaigh theaghrin le haon\n" " chomhartha amhin\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "bruscar: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "bruscar: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Teanga dholama:\n" " -c,--comment=CARACHTAIR Tosaonn aon cheann de na CARACHTAIR nta\n" " trchta, go dt deireadh na lne\n" " -k,--keep=CARACHTAIR Ceadaithe i dteaghrin chomhartha; coimed an " "toradh\n" " -i,--ignore=CARACHTAIR Ceadaithe i dteaghrin chomhartha; caith an " "toradh\n" " i dtraipis\n" " -u,--strip-underscore Struipeil fostroc thosaigh theaghrin " "chomhartha\n" " -n,--no-cpp N limhseil treoracha ramhphrisela C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Teanga thacs:\n" " -i,--include=AICME Is pirt de theaghrin chomhartha iad na\n" " carachtair in AICME\n" " -x,--exclude=AICME Is teormharcir idir teaghrin chomhartha iad " "na\n" " carachtair in AICME\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Teanga Perl:\n" " -i,--include=AICME Is pirt de theaghrin chomhartha iad na\n" " carachtair in AICME\n" " -x,--exclude=AICME Is teormharcir idir teaghrin chomhartha iad " "na\n" " carachtair in AICME\n" " -d,--dtags Cuir clibeanna doicimadaithe san ireamh\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Teanga Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "n fidir comhadlann `%s' a lamh (`.' `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "fgra: bh `%s' ina %s, ach is %s anois!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "comhad" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "comhadlann" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "rabhadh: is an comhad canna `%s' agus `%s', ach tugann siad scanta " "difrila!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "fgra: d'athraigh na paraimadair scanta le haghaidh `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "n fidir comhadlann oibre a fhil" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "theip ar chdir go `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "theip ar chdir go `%s' `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "n fidir `%s' a `lstat' `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "n fidir `%s' a `stat' `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Bain triail as `%s --help' chun tuilleadh eolais a fhil.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "sid: %s [ROGHA] COMHADAINM [COMHADAINM2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Taispein na haitheantir at i gCOMHADAINM, n m t COMHADAINM2 ann\n" "freisin, taispein na haitheantir at i ngach comhad.\n" "\n" " -f, --file=COMHAD comhadainm an bhunachair sonra ID\n" " --help taispein an chabhair seo agus scoir\n" " --version taispein eolas faoin leagan agus scoir\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Seol tuairisc fabhtanna chuig " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "gan chomhadainmneacha mar argint" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "an iomarca comhadainmneacha mar argint" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "n fidir `ID' a aimsi" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "is dbhroch `%s'" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "`%s' gan aimsi" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "sid: %s [ROGHA]... [PATRN]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Taispein ainmneacha de chomh-chomhaid at comhoirinach le PATRN,\n" "le saorga de chinel na blaoisce.\n" " -f, --file=COMHAD comhadainm an bhunachair sonra ID\n" " -S, --separator=STL ceann de `braces', `space' n `newline'\n" " --help taispein an chabhair seo agus scoir\n" " --version taispein eolas faoin leagan agus scoir\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "sid: %s [ROGHA]... PATRN...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Dan iarratas ar bhunachar sonra ID agus taispein na tortha. De rir\n" "ramhshocraithe, t lnte iomadla san aschur, le haitheantir " "comhoirinach\n" "ar gach lne, agus liosta de na comhaid ina bhfuil s ina dhiaidh.\n" "\n" " -f, --file=COMHAD comhadainm an bhunachair sonra ID\n" "\n" " -i, --ignore-case meaitseil PATRN ach n bac le cs\n" " -l, --literal meaitseil PATRN mar theaghrn litriil\n" " -r, --regexp meaitseil PATRN mar shlonn ionadaochta\n" " -w, --word meaitseil PATRN mar fhocal teoranta\n" " -s, --substring meaitseil PATRN mar fhotheaghrn\n" " Nta: M t meiteacharachtair bhreisithe sa PHATRN (a " "sidtear\n" " i sloinn bhreisithe ionadaochta), caithfear PATRN mar\n" " fhotheaghrn de shlonn ionadaochta. I ngach cs eile, " "caithfear\n" " le PATRN mar fhocal litriil.\n" "\n" " -k, --key=STL ceann de `token', `pattern' n `none'\n" " -R, --result=STL ceann de `filenames', `grep', `edit' n `none'\n" " -S, --separator=STL ceann de `braces', `space' n `newline', agus\n" " cuirtear i bhfeidhm nuair a `--result=filenames'\n" " Rialaonn na roghanna STL thuas an chaoi ina dtaispenfar\n" " tortha an iarratais. Seo iad na ramhshocruithe:\n" " --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=MINIC aimsigh teaghrin chomhartha a tharlaonn MINIC " "uaire,\n" " le MINIC tugtha mar raon `N..M'. M t an `N' ar " "lr,\n" " sid 1 mar ramhshocr, agus sid MAX_USHRT mar\n" " luach ramhshocraithe ar `M'\n" " -a, --ambiguous=FAD aimsigh teaghrin chomhartha a bhfuil ainmneacha " "acu\n" " at dchiallach tr FAD carachtar\n" "\n" " -x, --hex cuardaigh ar uimhreacha i bhfoirm heicsidheachlach\n" " -d, --decimal cuardaigh ar uimhreacha i bhfoirm dheachlach\n" " -o, --octal cuardaigh ar uimhreacha i bhfoirm ochtnrtha\n" " De rir ramhshocraithe, cuardfar ar uimhreacha le haon bhunuimhir\n" "\n" " --help taispein an chabhair seo agus scoir\n" " --version taispein eolas faoin leagan agus scoir\n" #: src/lid.c:283 msgid "braces" msgstr "libn slabhracha" #: src/lid.c:283 msgid "space" msgstr "sps" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "fgra: t an rogha `-e' i lig, sid `-r' ina hionad" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "" "Is aonchiallach iad na haitheantir uile, taobh istigh den chad %d " "carachtar\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "stl neamhbhail `--key': `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "stl neamhbhail `--result': `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "n fidir an slonn ionadaochta a mheaitseil: cuimhne dithe" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "cuir in eagar? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "n fidir forc a dhanamh" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "n fidir `%s' a rith" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "sid: %s [ROGHA]... [COMHAD]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Tg bunachar sonra d'aitheantir.\n" " -o, --output=ASCHOMHAD comhad ina scrobhfar an bunachar sonra\n" " -f, --file=ASCHOMHAD ar comhbhr le --output\n" " -i, --include=TEANGACHA cuir na TEANGACHA seo san ireamh\n" " (ramhshocr: \"C C++ asm\")\n" " -x, --exclude=TEANGACHA fg na TEANGACHA seo as\n" " -l, --lang-option=T:R socraigh R mar ramhshocr do theanga T (fach " "thos)\n" " -m, --lang-map=MAPA sid MAPA chun comhadainmneacha a mhapil go dt\n" " an teanga fhoinseach\n" " -d, --default-lang=TNG socraigh TNG mar theanga ramhshocraithe " "fhoinseach\n" " -p, --prune=AINMNEACHA fg na comhaid/comhadlanna ainmnithe as\n" " -v, --verbose taispein staitistic do gach comhad\n" " -s, --statistics taispein staitistic ag deireadh an reatha\n" "\n" " --help taispein an chabhair seo agus scoir\n" " --version taispein eolas faoin leagan agus scoir\n" "\n" "Is fidir COMHAD a bheith comhadainm, n ainm chomhadlainne ina gcuardidh\n" "go hathchrsach. Mura bhfuil COMHAD tugtha, cuardaigh sa chomhadlann " "reatha\n" "mar ramhshocr. N cheadatear na roghanna `--include' agus `--exclude' " "a \n" "bheith tugtha in ineacht le chile.\n" "\n" "Baineann na hargint seo a leanas le scanir at sainiil do theangacha " "irithe:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "n fidir `%s' a chruth i `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "n fidir `%s' a mhionathr" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "n fidir `%s' a stat" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nua = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Ainm=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Uimhir=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Teaghrn=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Teaghrn Litriil=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Nta=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Comhaid=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Teaghrin Chomhartha=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bearta=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Carn=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Aschur=%ld (%ld comhartha, %ld aimsithe)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Minic=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Teaghrin chomhartha srtil...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "`%s' scrobh...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "n fidir `%s' a chruth" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "earrid agus `%s' dhnadh" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "leibhal %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Priontil gach teaghrn comhartha a aimstear i gcomhad foinseach.\n" " -i, --include=TEANGACHA cuir na TEANGACHA seo san ireamh\n" " (ramhshocr: \"C C++ asm\")\n" " -x, --exclude=TEANGACHA fg na TEANGACHA seo as\n" " -l, --lang-option=T:R socraigh R mar ramhshocr do theanga T (fach " "thos)\n" " -m, --lang-map=MAPA sid MAPA chun comhadainmneacha a mhapil go dt\n" " an teanga fhoinseach\n" " -d, --default-lang=TNG socraigh TNG mar theanga ramhshocraithe " "fhoinseach\n" " -p, --prune=AINMNEACHA fg na comhaid/comhadlanna ainmnithe as\n" " --help taispein an chabhair seo agus scoir\n" " --version taispein eolas faoin leagan agus scoir\n" "\n" "Baineann na hargint seo a leanas le scanir at sainiil do theangacha " "irithe:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: rogha neamhcheadaithe -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" ����������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/pt_BR.gmo���������������������������������������������������������������0000664�0000000�0000000�00000022200�12166360012�013524� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������L������|��e���������p�� ���q�������A�����e�������<�����K�����B �� ���\ �� ���i ����u �� ���~ ����� �� ��� �� ��� ����� ��9�� �� ��� ����� �� ���2 �����? �� ��� ��&��� ��(���! ��!���J �� ���l ��#��� ����� ����� ��%��� ��.��� �����)�����8��9���?��6���y��.�����������������������#��(���=�����f�� ���v����������������������0�������������-��!���=��)���_��(�����!��������������� ������������������ �����<�� ���[�� ���f��2���t������������'�����(�����3���+�����_�����e������������"�����#�����D�������?�� ����������F�������>�������S�������P�����h�����x��*���� ���������� ����� ������������ �� ���������� ���������������)�����#���������� ���9�����Z�����z�������,�����=���������������@���!��D���b��;�����#�����+��������3�����I��1���g������������6�����,��������* ��&���D ��;���k ����� ����� ��2��� ��-��� !��7���8!��3���p!��+���!��%���!�� ���!������"�����"��"���"��%���@"�� ���f"�����s"��0���"�����"��!���"��(���"��/���#��/���K#�����{#��$���#�����#�����#��&���#��'��� $��L���3$��������?������;���4���������������E������G���)���9���-���.��������������0��� ����������F����������7���:���$���������� ���B���A���J������!���(�������������&����������I���������5���H���>���*���1���/���+���,������<�������L������ �������"�����������%���=���#����������@��� ��������������3������� �������6�������8�������������2���������K���������������������'������ �������C������D���� new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: id-utils 3.2d Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2002-10-24 23:41-0300 Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br> Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br> Language: pt_BR MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8-bit � novo = %d/%d�, Freq=%ld/%ld=%.2f �Todos os identificadores so no-ambguos nos primeiros %d caracteres �Linguagem Assembly: -c,--comment=CHARS Qualquer um dos CHARS inicia um comentrio at o final da linha -k,--keep=CHARS Permite CHARS em palavras-chave, mantm o resultado -i,--ignore=CHARS Permite CHARS em palavras-chave, descarta o resultado -u,--strip-underscore Remove o sublinhado inicial de palavras-chave -n,--no-cpp No processa diretivas de pre-processador C �Bytes=%ld Kb, �Linguagem C: -k,--keep=CHARS Permite CHARS em strings de token nica, mantm o resultado -i,--ignore=CHARS Permite CHARS em strings de token nica, descarta o resultado -u,--strip-underscore Remove o sublinhado inicial de strings de token nica �Colises=%ld/%ld=%.0f%%�Comentrio=%ld �Arquivos=%ld, �Lista identificadores que ocorrem em NOMEARQ, ou se NOMEARQ2 tambm for fornecido, lista os identificadores que ocorrem em ambos os arquivos. -f, --file=ARQ nome do arquivo do banco de dados de ID --help exibe esta ajuda e sai --version mostra informaes de verso e sai �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Nome=%ld, �Nmero=%ld, �Sada=%ld (%ld tok, %ld hit) �Imprime os nomes de arquivos que correspondem ao PADRO, usando coringas estilo shell. -f, --file=ARQ nome de arquivo do banco de dados de IDs -S, --separator=ESTILO ESTILO pode ser `braces' (chaves), `space' (espao) ou `newline' (nova linha) --help exibe esta ajuda e sai --version mostra informaes de verso e sai �Rehash=%d, �Ordenando palavras-chave... �String=%ld, �Linguagem Texto: -i,--include=CHAR-CLASS Trata os caracteres de CHAR-CLASS como parte de token -x,--exclude=CHAR-CLASS Trata os caracteres de CHAR-CLASS como delimitador de token �Palavras-Chave=%ld, �Tente `%s --help' para mais informaes. �Uso: %s [OPO] NOMEARQ [NOMEARQ2] �Uso: %s [OPO]... PADRO... �Uso: %s [OPO]... [ARQUIVO]... �Uso: %s [OPO]... [PADRO]... �Gravando `%s'... �`%s' ambguo�`%s' no um arquivo ID! (n mgico errado)�`%s' tem verso %d, mas s possvel fazer grok da verso %d�`%s' no encontrado�chaves�impossvel alocar %ld bytes para a tabela hash: memria esgotada�impossvel alocar argumentos de linguagem na pilha: memria esgotada�impossvel alocar argumentos de linguagem: memria esgotada�impossvel executar chdir para `%s'�impossvel executar chdir para `%s' de `%s'�impossvel criar `%s'�impossvel criar `%s' em `%s'�impossvel determinar o tamanho_es de uma string!�impossvel executar `%s'�impossvel bifurcar�impossvel descobrir o tamanho do arquivo de mapa `%s'�impossvel descobrir o diretrio de trabalho�impossvel localizar `ID'�impossvel executar lstat `%s' de `%s'�impossvel procurar com expresso regular: memria esgotada�impossvel modificar `%s'�impossvel abrir `%s'�impossvel abrir arquivo de mapa de linguagem `%s'�impossvel ler o diretrio `%s' (`.' de `%s')�impossvel ler todo o arquivo de mapa de linguagem `%s'�impossvel ler do arquivo de mapa de linguagem `%s'�impossvel mostrar as estatsiticas de `%s'�impossvel executar stat `%s' de `%s'�diretrio�editar? [y1-9^S/nq] �arquivo�estilo invlido para `--key': `%s'�estilo invlido para `--result': `%s'�refugo: `%c'�refugo: `\%03o'�linguagem no esperada aps `%s' no arquivo `%s'�nvel %d: %ld/%ld = %.0f%% �sem argumentos de nome de arquivo�nota: `%s' era um %s, mas agora um %s!�nota: parmetros de leitura alterados para `%s'�nota: uso de `-e' obsoleto, use `-r' no lugar�espao�muitos argumentos de nome de arquivo�tipo desconhecido de E/S: %d�linguagem no reconhecida: `%s'�tamanho no suportado de io_read(): %d�tamanho no suportado de io_write(): %d�aviso: `%s' e `%s' so o mesmo arquivo, mas resultam em leituras diferentes!�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/nl.po�������������������������������������������������������������������0000664�0000000�0000000�00000071427�12166360012�013002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Dutch translations for GNU idutils. # Copyright (C) 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # # Ivo Timmermans <ivo@o2w.nl>, 1998. # Benno Schulenberg <benno@vertaalt.nl>, 2007, 2010. msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-06-19 11:37+0200\n" "Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/closeout.c:112 msgid "write error" msgstr "schrijffout" #: lib/error.c:188 msgid "Unknown system error" msgstr "Onbekende systeemfout" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: optie '%s' is niet eenduidig\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: optie '--%s' staat geen argument toe\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: optie '%c%s' staat geen argument toe\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: optie '--%s' vereist een argument\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: onbekende optie '--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: onbekende optie '%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ongeldige optie -- '%c'\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: optie vereist een argument -- '%c'\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: optie '-W %s' is niet eenduidig\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: optie '-W %s' staat geen argument toe\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: optie '-W %s' vereist een argument\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "onvoldoende geheugen beschikbaar" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "kan de huidige werkmap niet vastleggen" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "kan niet terugkeren naar de initiële werkmap" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "‘" #: lib/quotearg.c:312 msgid "'" msgstr "’" #: lib/regcomp.c:131 msgid "Success" msgstr "Gelukt" #: lib/regcomp.c:134 msgid "No match" msgstr "Geen overeenkomsten" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Ongeldige reguliere expressie" # Zie http://mailman.vrijschrift.org/pipermail/vertaling/2005-August/004670.html #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Ongeldig samengesteld teken" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Ongeldige tekenklassenaam" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Backslash aan het eind" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Ongeldige terugverwijzing" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Ongepaarde [ of [^" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Ongepaarde ( of \\(" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Ongepaarde \\{" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ongeldige inhoud van \\{\\}" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Ongeldig bereikeinde" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Onvoldoende geheugen beschikbaar" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ongeldige voorafgaande reguliere expressie" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Voortijdig einde van reguliere expressie" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Reguliere expressie is te groot" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ongepaarde ) of \\)" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Geen eerdere reguliere expressie" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "ongeldige stijl voor '--separator': '%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "kan van een tekenreeks de 'io_size' niet vaststellen!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "kan '%s' niet openen" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "'%s' is geen ID-bestand: onjuist magisch nummer" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "'%s' is versie %d, maar ik lust alleen versie %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "niet-ondersteunde grootte in io_read(): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "onbekend I/O-type: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "kan %ld bytes voor hashtabel niet reserveren: onvoldoende geheugen" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Belasting=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Herhash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Botsingen=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "niet-ondersteunde grootte in io_write(): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "onbekende taal: '%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "kan geen ruimte voor objectstapel reserveren: onvoldoende geheugen" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "kan geen ruimte voor taalargumenten reserveren: onvoldoende geheugen" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "taalnaam werd verwacht na '%s' in bestand '%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "kan taalkaartbestand '%s' niet openen" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "kan grootte van taalkaartbestand '%s' niet bepalen" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "kan taalkaartbestand '%s' niet lezen" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "kan het taalkaartbestand '%s' niet volledig lezen" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C:\n" " -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat " "houden\n" " -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat " "wegdoen\n" " -u,--strip-underscore liggende streepjes voor naamtekenreeksen " "verwijderen\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C++:\n" " -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat " "houden\n" " -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat " "wegdoen\n" " -u,--strip-underscore liggende streepjes voor naamtekenreeksen " "verwijderen\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Java:\n" " -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat " "houden\n" " -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat " "wegdoen\n" " -u,--strip-underscore liggende streepjes voor naamtekenreeksen " "verwijderen\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "rommel: '%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "rommel: '\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assembeertaal:\n" " -c,--comment=TEKENS elk van deze tekens begint een commentaarregel\n" " -k,--keep=TEKENS toegestane tekens in namen, resultaat houden\n" " -i,--ignore=TEKENS toegestane tekens in namen, resultaat wegdoen\n" " -u,--strip-underscore liggende streepjes aan begin van namen verwijderen\n" " -n,--no-cpp opdrachten voor C-pre-processor niet behandelen\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Gewone tekst:\n" " -i,--include=TEKENKLASSE tekens van deze klasse zijn naambouwstenen\n" " -x,--exclude=TEKENKLASSE tekens van deze klasse zijn naamscheiders\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Perl:\n" " -i,--include=TEKENKLASSE tekens van deze klasse zijn naambouwstenen\n" " -x,--exclude=TEKENKLASSE tekens van deze klasse zijn naamscheiders\n" " -d,--dtags documentatie-tags meenemen\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "kan map '%s' niet lezen ('.' van '%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "opmerking: '%s' was een %s, maar is nu een %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "bestand" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "map" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "waarschuwing: '%s' en '%s' zijn hetzelfde bestand, maar leveren " "verschillende resultaten op!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "opmerking: parameters voor '%s' zijn veranderd" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "'--include'- en '--exclude'-opties gaan niet samen" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "kan huidige map niet bepalen" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "kan niet naar map '%s' gaan" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "kan niet naar map '%s' gaan vanuit '%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "kan de status van '%s' niet opvragen vanuit '%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "kan de status van '%s' niet opvragen vanuit '%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Typ '%s --help' voor meer informatie.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Gebruik: %s [OPTIE] BESTANDSNAAM [BESTANDSNAAM2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Een lijst tonen van de namen die in BESTANDSNAAM voorkomen;\n" "als een tweede bestand gegeven is, dan alleen die namen tonen\n" "die in beide bestanden voorkomen.\n" "\n" " -f, --file=BESTAND deze ID-gegevensbank gebruiken\n" " --help deze hulptekst tonen en stoppen\n" " --version versie-informatie tonen en stoppen\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Rapporteer programmafouten aan " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "ontbrekende bestandsnaam als argument" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "te veel bestandsnamen als argument" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "kan 'ID' niet vinden" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "'%s' is niet eenduidig" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "'%s' is niet gevonden" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Gebruik: %s [OPTIE]... [PATROON]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Die bestandsnamen in de gegevensbank tonen die overeenkomen met PATROON.\n" "(PATROON gebruikt jokertekens zoals die van de shell.)\n" "\n" " -f, --file=BESTAND deze ID-gegevensbank gebruiken\n" " -S, --separator=STIJL bestandsnamenstijl: 'braces', 'space' of 'newline'\n" " --help deze hulptekst tonen en stoppen\n" " --version versie-informatie tonen en stoppen\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Gebruik: %s [OPTIE]... PATROON...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Een ID-gegevensbank doorzoeken naar PATROON en de resultaten rapporteren.\n" "Bij normale uitvoer begint elke regel met een gevonden naam, gevolgd door\n" "een lijst van bestandsnamen waar deze naam in voorkomt.\n" "\n" " -f, --file=BESTAND deze ID-gegevensbank gebruiken\n" "\n" " -i, --ignore-case verschillen in hoofd- en kleine letters negeren\n" " -l, --literal PATROON is een letterlijke tekenreeks\n" " -r, --regexp PATROON is een reguliere expressie\n" " -w, --word PATROON komt alleen overeen met een heel woord\n" " -s, --substring PATROON komt ook overeen met een deel van een woord\n" " Als het PATROON metatekens van uitgebreide reguliere expressies bevat, " "dan\n" " wordt het begrepen als een reguliere expressie. Als het niet zulke " "tekens\n" " bevat, dan wordt het begrepen als een letterlijke tekenreeks.\n" "\n" " -k, --key=STIJL sleutelstijl: 'token', 'pattern' of 'none'\n" " -R, --result=STIJL rapportagestijl: 'filenames', 'grep', 'edit' of " "'none'\n" " -S, --separator=STIJL bestandsnamenstijl: 'braces', 'space' of " "'newline'\n" " Bovenstaande stijlopties bepalen hoe de zoekresultaten gepresenteerd " "worden.\n" " De standaardwaarden zijn: --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ de namen rapporteren die met deze frequentie " "voorkomen;\n" " de frequentie is een bereik op te geven als 'N..M'; " "als\n" " N ontbreekt is het 1, als M ontbreekt is het " "MAX_USHRT\n" " -a, --ambiguous=LENG de namen rapporteren die niet eenduidig zijn bij " "dit\n" " aantal tekens\n" "\n" " -x, --hex alleen hexadecimale getallen rapporteren\n" " -d, --decimal alleen decimale getallen rapporteren\n" " -o, --octal alleen octale getallen rapporteren\n" " Standaard worden getallen van alle grondtallen gerapporteerd.\n" "\n" " --help deze hulptekst tonen en stoppen\n" " --version versie-informatie tonen en stoppen\n" #: src/lid.c:283 msgid "braces" msgstr "accolades" #: src/lid.c:283 msgid "space" msgstr "spatie" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "opmerking: optie '-e' is verouderd; gebruik '-r' in plaats daarvan" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Alle variabelenamen van zijn eenduidig binnen de eerste %d tekens.\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "ongeldige stijl voor '--key': '%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "ongeldige stijl voor '--result': '%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "kan reguliere expressie niet verwerken: onvoldoende geheugen" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "bewerken? [j1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "kan geen nieuw proces starten" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "kan '%s' niet uitvoeren" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "" "Gebruik: %s [OPTIE]... [BESTAND]...\n" "\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Een gegevensbank met namen aanmaken.\n" "\n" " -d, --default-lang=TAAL deze taal de standaardtaal maken\n" " -f, --file=BESTAND gegevensbank opslaan in dit bestand\n" " -i, --include=TALEN deze talen begrijpen (standaard is \"C C++ asm" "\")\n" " -x, --exclude=TALEN deze talen niet begrijpen\n" " -l, --lang-option=TAAL:OPTIE voor deze taal standaard deze optie " "gebruiken\n" " -m, --lang-map=KAART talenkaartbestand dat bestandsnamen aan talen " "koppelt\n" " -o, --output=BESTAND gegevensbank opslaan in dit bestand\n" " -p, --prune=NAMEN deze bestanden en/of mappen overslaan\n" " -s, --statistics statistieken rapporteren aan het eind over het " "geheel\n" " -v, --verbose statistieken per bestand rapporteren\n" "\n" " --files0-from=BSTND alleen de bestanden doornemen die genoemd staan " "in\n" " BESTND (met NUL-tekens als scheiding)\n" "\n" " --help deze hulptekst tonen en stoppen\n" " --version versie-informatie tonen en stoppen\n" "\n" "BESTAND kan een bestandsnaam zijn, of een map om recursief te doorzoeken.\n" "Als geen BESTAND opgegeven is, wordt standaard de huidige map doorzocht.\n" "De opties '--include' en '--exclude' kunnen niet samen gebruikt worden.\n" "\n" "De volgende opties gelden voor taalspecifieke scanners:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "overtollig argument: %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "bestandsargumenten gaan niet samen met '--files0-from'" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "kan %s niet openen om te lezen" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: fout bij lezen" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" "bij het lezen van bestandsnamen van standaardinvoer is bestandsnaam %s niet " "toegestaan" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "ongeldige bestandsnaam (lengte nul)" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "er is niets om te doen" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "kan '%s' niet aanmaken in '%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "kan '%s' niet veranderen" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "kan de status van '%s' niet opvragen" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nieuw = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Naam=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Nummer=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Tekenreeks=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Letterlijk=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Commentaar=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Bestanden=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Tokens=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bytes=%ld kB, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%llu+%llu kB, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Uitvoer=%ld (%ld tokens, %ld gevonden)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Frequentie=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sorteren van tokens...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Schrijven van '%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "kan '%s' niet aanmaken" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "innerlijke begrenzing: positie van 2^32 of groter" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "fout bij sluiten van '%s'" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "niveau %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Alle namen tonen die in een programmatekstbestand voorkomen.\n" "\n" " -d, --default-lang=TAAL deze taal de standaardtaal maken\n" " -i, --include=TALEN deze talen begrijpen (standaard is \"C C++ asm" "\")\n" " -x, --exclude=TALEN deze talen niet begrijpen\n" " -l, --lang-option=TAAL:OPTIE voor deze taal standaard deze optie " "gebruiken\n" " -m, --lang-map=KAART talenkaartbestand dat bestandsnamen aan talen " "koppelt\n" " -p, --prune=NAMEN deze bestanden en/of mappen overslaan\n" "\n" " --files0-from=BSTND alleen de bestanden doornemen die genoemd staan " "in\n" " BESTND (met NUL-tekens als scheiding)\n" "\n" " --help deze hulptekst tonen en stoppen\n" " --version versie-informatie tonen en stoppen\n" "\n" "De volgende opties gelden voor taalspecifieke scanners:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: ongeldige optie -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/vi.gmo������������������������������������������������������������������0000664�0000000�0000000�00000061534�12166360012�013151� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.��!���u0�����0��.���0��8���0��8���1��8���H1��9���1��+���1��6���1��9���2�����X2��-���i2��-���2�����2�����2��I���2����.3��6�� 5�� ���D;��9��R;��;��<�����=�� ���=�����=�����>��'���>��&���E>��)���l>��)���>��0���>�����>��*��� ?��<��6?�����s@��w��@�����A�����B�����0B�� ���AB�� ���LB��0���ZB�� ���B��.���B��8��B��*���C�� ��)D����5H��� ��J��#���S�����)S��&���9S�� ���`S�� ���nS�����{S�����{T�����T��F���T�����T��3���U��3���DU��3���xU��'���U��;���U��*���V��0���;V��,���lV�����V�����V�����V��M���V��]���W�����xW�����W��O���W��l���W��T���dX��5���X��C���X�����3Y��*���OY��I���zY��#���Y��$���Y��@��� Z��,���NZ�����{Z��`���Z��P���Z��i���I[��"���[�����[��:���[��?���,\��G���l\��<���\��.���\��M��� ]��!���n]�� ���]�����]�����]��"���]��A���]�� ���5^��I���?^��/���^��4���^��7���^��B���&_��E���i_�� ���_�� ���_��H���_�����`�����-`��,���>`�����k`��;���`��I���`��D��� a�� ���Pa��2���\a��=���a�����a��'���a��:���b��D���Pb��Y���b��b���b�� ���Rc�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-10-03 23:10+1030 Last-Translator: Clytie Siddall <clytie@riverland.net.au> Language-Team: Vietnamese <vi-VN@googlegroups.com> Language: vi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; X-Generator: LocFactoryEditor 1.8 � Hãy thông báo lỗi nào cho � mới = %d/%d�%s: tùy chọn không hợp lệ -- « %c » �%s: tùy chọn « %c%s » không cho phép đối số �%s: tùy chọn « --%s » không cho phép đối số �%s: tùy chọn « --%s » yêu cầu một đối số �%s: tùy chọn « -W %s » không cho phép đối số �%s: tùy chọn « -W %s » vẫn mơ hồ �%s: tùy chọn « %s » yêu cầu một đối số �%s: tùy chọn yêu cầu một đối số -- « %c » �%s: lỗi đọc�%s: không nhận ra tuỳ chọn « %c%s » �%s: không nhận ra tuỳ chọn « --%s » � »�, Tần số=%ld/%ld=%.2f �Mọi bộ nhận diện không phải mơ hồ trong %d ký tự đầu �Ngôn ngữ tổ hợp: -c,--comment=KÝ_TỰ Ký tự nào trong các ký tự này sẽ bắt đầu ghi chú đến kết thúc dòng -k,--keep=KÝ_TỰ Cho phép các ký tự này trong hiệu bài, giữ kết quả -i,--ignore=KÝ_TỰ Cho phép các ký tự này trong hiệu bài, bỏ kết quả -u,--strip-underscore Bỏ dấu gạch dưới ở đầu khỏi hiệu bài -n,--no-cpp Đừng xử lý chỉ thị tiền xử lý C �Xây dựng cơ sở dữ liệu nhận diện. -o, --output=TỆP_RA tên của tập tin được xuất ra cơ sở dữ liệu ID. -f, --file=TỆP_RA cùng nghĩa với « --output » -i, --include=NGÔN_NGỮ gồm có các ngôn ngữ này (mặc định: « C C++ asm ») -x, --exclude=NGÔN_NGỮ loại trừ các ngôn ngữ này -l, --lang-option=L:TÙY_CHỌN gửi tùy chọn này làm mặc định cho ngôn ngữ L (xem dưới) -m, --lang-map=TỆP dùng tập tin này để ánh xạ tên tập tin với ngôn ngữ nguồn -d, --default-lang=NGÔN_NGỮ đặt ngôn ngữ này là ngôn ngữ nguồn mặc định -p, --prune=TÊN loại trừ các tập tin/thư mục này -v, --verbose thông báo thống kê cho mỗi tập tin -s, --statistics thông báo thống kê một khi chạy xong --files0-from=F làm hiệu bài chỉ những tập tin được ghi rõ bằng tên chấm dứt NUL trong tập tin F --help hiển thị trợ giúp này rồi thoát --version xuất ra thông tin phiên bản rồi thoát TỆP có thể là một tên tập tin, hoặc một tên thư mục trong đó cần tìm kiếm đệ quy. Không đưa ra tập tin thì thư tìm kiếm trong mục hiện thời theo mặc định. Ghi chú rằng hai tùy chọn « --include » (bao gồm) và « --exclude » (loại trừ) loại từ lẫn nhau. Các đối số theo đây áp dụng cho những bộ quét đặc trưng cho ngôn ngữ : �Byte=%ld Kb, �Ngôn ngữ C: -k,--keep=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết quả -i,--ignore=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết quả -u,--strip-underscore Bỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn �Ngôn ngữ C++: -k,--keep=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết quả -i,--ignore=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết quả -u,--strip-underscore Bỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn �Xung đột=%ld/%ld=%.0f%%�Ghi chú=%ld �Tập tin=%ld, �Miền nhớ=%llu+%llu Kb, �Tham chiếu ngược không hợp lệ�Tên hạng ký tự không hợp lệ�Ký tự đối chiếu không hợp lệ�Nội dụng « \{\} » không hợp lệ�Sai đặt biểu thức chính quy đi trước�Sai kết thúc phạm vi�Biểu thức chính quy không hợp lệ�Ngôn ngữ Java: -k,--keep=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, giữ kết quả -i,--ignore=KÝ_TỰ Cho phép các ký tự này trong chuỗi hiệu bài đơn, bỏ kết quả -u,--strip-underscore Bỏ dấu gạch dưới ở đầu khỏi chuỗi hiệu bài đơn �Ngôn ngữ Lisp: �Liệt kê các bộ nhận diện nằm trong tập tin, hoặc nếu cũng đưa ra tập tin thứ hai, liệt kê các bộ nhận diện nằm trong cả hai tập tin. -f, --file=TẬP_TIN tên tập tin của cơ sở dữ liệu ID --help hiển thị trợ giúp này rồi thoát --version xuất ra thông tin phiên bản rồi thoát �Nghĩa chữ=%ld, �Trọng tải=%ld/%ld=%.0f%%, �Cạn bộ nhớ�Tên=%ld, �Không khớp�Không có biểu thức chính quy đi trước�Số=%ld, �Kết xuất=%ld (%ld hiệu bài, %ld lần) �Ngôn ngữ Perl: -i,--include=HẠNG-KÝ_TỰ Xử lý các ký tự của hạng này như là phần tử của hiệu bài -x,--exclude=HẠNG-KÝ_TỰ Xử lý các ký tự của hạng này như là dấu định giới hiệu bài -d,--dtags Gồm có các thẻ tài liệu hướng dẫn �Kết thúc sớm biểu thức chính quy�In ra tất cả các hiệu bài được tìm trong một tập tin nguồn nào đó. -i, --include=NGÔN_NGỮ gồm có các ngôn ngữ này (mặc định: « C C++ asm ») -x, --exclude=NGÔN_NGỮ loại trừ các ngôn ngữ này -l, --lang-option=L:TÙY_CHỌN gửi tùy chọn này làm mặc định cho ngôn ngữ L (xem dưới) -m, --lang-map=TẬP_TIN dùng tập tin này để ánh xạ tên tập tin với ngôn ngữ nguồn -d, --default-lang=NGÔN_NGỮ đặt ngôn ngữ này là ngôn ngữ nguồn mặc định -p, --prune=TÊN loại trừ các tập tin/thư mục này --files0-from=F làm hiệu bài chỉ những tập tin được ghi rõ bằng tên chấm dứt NUL trong tập tin F --help hiển thị trợ giúp này rồi thoát --version xuất ra thông tin phiên bản rồi thoát Các đối số theo đây áp dụng cho những bộ quét đặc trưng cho ngôn ngữ : �In ra các tên tập tin phần tử mà khớp với mẫu này, dùng ký tự đại diện kiểu trình bao. -f, --file=TẬP_TIN tên tập tin của cơ sở dữ liệu ID -S, --separator=KIỂU kiểu dáng này là một của: • braces dấu ngoặc móc • space dấu cách • newline dòng mới --help hiển thị trợ giúp này rồi thoát --version xuất ra thông tin phiên bản rồi thoát �Hỏi cơ sở dữ liệu ID và thông báo kết quả. Mặc định là kết xuất đa dòng, mỗi dòng chứa bộ nhận diện tương ứng và sau đó danh sách các tên tập tin chứa nó. -f, --file=TỆP tên tập tin của cơ sở dữ liệu ID -i, --ignore-case khớp MẪU mà không phân biệt chữ hoa/thường -l, --literal khớp MẪU như là một chuỗi nghĩa chữ -r, --regexp khớp MẪU như là một biểu thức chính quy -w, --word khớp MẪU như là một từ đã định giới -s, --substring khớp MẪU như là một chuỗi phụ Ghi chú : nếu MẪU chứa siêu ký tự kiểu biểu thức chính quy đã mở rộng, nó được giải thích như là một chuỗi phụ kiểu biểu thức chính quy. Không thì MẪU được giải thích như là một từ nghĩa chữ. -k, --key=KIỂU kiểu dáng này là một của: • token hiệu bài • pattern mẫu • none không có -R, --result=KIỂU kiểu dáng này là một của: • filenames các tên tập tin • grep • edit sửa • grep • none không có -S, --separator=KIỂU kiểu dáng này là một của: • braces dấu ngoặc móc • space dấu cách • newline dòng mới và chỉ áp dụng cho các tên tập tin khi « --result=các_tên_tệp » Những tùy chọn KIỂU bên trên thì điều khiển cách hiển thị kết quả hỏi. Mặc định là: --key=hiệu_bài --result=các_tên_tệp --separator=%s -F, --frequency=SỐ tìm các hiệu bài xảy ra số lần này, mà số này là một phạm vi được đại diện như « N..M ». Bỏ N thì mặc định là 1, còn bỏ M thì mặc định là MAX_USHRT -a, --ambiguous=SỐ tìm các hiệu bài có tên mờ hồ trong số ký tự này -x, --hex chỉ tìm các con số dạng thập lục -d, --decimal chỉ tìm các con số dạng thập phân -o, --octal chỉ tìm các con số dạng bát phân Mặc định là tiến trình tìm tương ứng với con số có bất cứ cơ số nào. --help hiển thị trợ giúp này rồi thoát --version xuất ra thông tin phiên bản rồi thoát �Biểu thức chính quy quá lớn�Băm lại=%d, �Đang sắp xếp các hiệu bài... �Chuỗi=%ld, �Thành công�Ngôn ngữ văn bản: -i,--include=HẠNG-KÝ_TỰ Xử lý các ký tự của hạng này như là phần tử của hiệu bài -x,--exclude=HẠNG-KÝ_TỰ Xử lý các ký tự của hạng này như là dấu định giới hiệu bài �Hiệu bài=%ld, �Dấu chéo ngược theo sau�Thử lệnh trợ giúp « %s --help » để tìm thêm thông tin. �Không rõ lỗi hệ thống�Có một ký tự « ( » hay « \( » riêng lẻ�Có một ký tự « ) » hay « \) » riêng lẻ�Có một ký tự « [ » hay « [^ » riêng lẻ�Có một ký tự « \{ » riêng lẻ�Cách sử dụng: %s [TÙY_CHỌN] TẬP_TIN [TẬP_TIN2] �Sử dụng: %s [TÙY_CHỌN]... MẪU... �Sử dụng: %s [TÙY_CHỌN]... [TẬP_TIN]... �Sử dụng: %s [TÙY_CHỌN]... [MẪU]... �Đang ghi « %s »... �« �« %s » vẫn mơ hồ�« %s » không phải là một tập tin mã số (con số ma thuật sai)�« %s » là phiên bản %d, nhưng chương trình này chỉ chấp nhận phiên bản %d�Không tìm thấy « %s »�dấu ngoặc móc�không thể phân cấp %ld byte cho bảng băm: hết bộ nhớ hoàn toàn�không thể phân cấp đống đối tượng các đối số ngôn ngữ : hết bộ nhớ hoàn toàn�không thể phân cấp các đối số ngôn ngữ : hết bộ nhớ hoàn toàn�không thể chuyển đổi thư mục sang « %s »�không thể chuyển đổi thư mục sang « %s » từ « %s »�không thể tạo « %s »�không thể tạo « %s » trong « %s »�không thể quyết định kích cỡ VR (io_size) của một chuỗi.�không thể thực hiện « %s »�không thể tạo tiến trình con�không thể lấy kích cỡ của tập tin sơ đồ « %s »�không thể lấy thư mục hoạt động�không tìm thấy « ID »�không thể lấy trạng thái liên kết tượng trưng (lstat) về « %s » từ « %s »�không thể khớp với biểu thức chính quy: hết bộ nhớ hoàn toàn�không thể kết hợp hai tuỳ chọn « --include » (bao gồm) và « --exclude » (loại trừ )�không thể sửa đổi « %s »�không thể mở « %s »�không thể mở tập tin sơ đồ ngôn ngữ « %s »�không thể đọc thư mục « %s » (« . » từ « %s »)�không thể đọc toàn bộ tập tin sơ đồ ngôn ngữ « %s »�không thể đọc tập tin sơ đồ ngôn ngữ « %s »�không thể lấy trạng thái về « %s »�không thể lấy trạng thái tập tin (stat) về « %s » từ « %s »�không thể mở %s để đọc�thư mục�sửa ? [y1-9^S/nq] �gặp lỗi khi đóng « %s »�gặp một toán hạng thừa %s�không trở được về thư mục hoạt động đầu tiên�tập tin�không thể kết hợp toán hạng tập tin với « --files0-from »�giới hạn bên trong: hiệu số hơn 2^32�kiểu dáng « --key » không hợp lệ: « %s »�kiểu dáng « --result » không hợp lệ: « %s »�kiểu dáng phân cách « --separator » không hợp lệ: `%s'�gặp tên tập tin không hợp lệ (có chiều dài số không)�rác: `%c'�rác: `\%03o'�mong đợi tên ngôn ngữ nằm sau « %s » trong tập tin « %s »�cấp %d: %ld/%ld = %.0f%% �cạn bộ nhớ�không có đối số kiểu tên tập tin�không có gì cần làm�thông báo : « %s » đã là %s, còn bây giờ là %s.�thông báo : các tham số quét bị thay đổi đối với « %s »�thông báo : dùng « -e » bị phản đối: nên dùng « -r »�dấu cách�có quá nhiều đối số kiểu tên tập tin�không thể ghi lưu thư mục hoạt động hiện thời�không nhận ra kiểu V/R: %d�không nhận ra ngôn ngữ : « %s »�kích cỡ không được hỗ trợ trong io_read (): %d�kích cỡ không được hỗ trợ trong io_write () (ghi VR): %d�cảnh báo : « %s » và « %s » là cùng tập tin, còn cho bản quét khác nhau.�khi đọc tên tập tin từ đầu vào tiêu chuẩn, không cho phép tên tập tin của %s�lỗi ghi���������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/insert-header.sin�������������������������������������������������������0000664�0000000�0000000�00000001240�10623104751�015262� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/zh_CN.po����������������������������������������������������������������0000664�0000000�0000000�00000067421�12166360012�013371� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Chinese translations for idutils package. # Copyright (C) 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Ji ZhengYu <zhengyuji@gmail.com>, 2008, 2009, 2010. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-07-02 13:24+0800\n" "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "写错误" #: lib/error.c:188 msgid "Unknown system error" msgstr "未知系统错误" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: 选项‘-W %s’有歧义\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: 选项‘--%s’不允许带参数\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: 选项‘%c%s’不允许带参数\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: 选项‘--%s’需要参数\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: 选项‘--%s’不可识别\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: 选项‘%c%s’不可识别\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: 无效选项 -- '%c'\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: 选项 -- '%c' 需要参数\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: 选项‘-W %s’有歧义\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: 选项‘-W %s’不允许带参数\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: 选项‘-W %s’需要参数\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "内存耗尽" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "无法记录当前工作目录" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "无法返回起始工作目录" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "“" #: lib/quotearg.c:312 msgid "'" msgstr "”" #: lib/regcomp.c:131 msgid "Success" msgstr "成功" #: lib/regcomp.c:134 msgid "No match" msgstr "无匹配" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "无效的正则表达式" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "无效的排序比较方式" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "无效的字符类名称" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "反斜杠太多" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "无效的向后引用" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ 或 [^ 不匹配" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( 或 \\( 不匹配" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ 不匹配" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "\\{\\} 中的内容无效" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "无效的范围" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "内存耗尽" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "先前的正则表达式无效" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "正则表达式过早结束" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "正则表达式太长" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") 或 \\) 不匹配" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "没有上一次的正则表达式" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "无效的‘--separator’方式: ‘%s’" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "无法确定字符串的 io_size" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "无法打开‘%s’" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "‘%s’不是 ID 文件!(错误的 magic #)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "‘%s’的版本号为 %d,但我仅想要版本号为 %d 的版本" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "io_read()中有不支持的字节大小: %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "未知的 I/O 类型: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "无法给哈希表分配 %ld 字节: 内存耗尽" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "载入=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "重新生成哈希表(Rehash)=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "哈希值冲突=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "io_write()中有不支持的字节大小: %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "不可识别的语言: ‘%s’" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "无法分配语言参数的对象堆栈" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "无法分配语言参数: 内存耗尽" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "要求语言名称,在文件‘%2$s’中带上‘%1$s’" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "无法打开语言 map 文件‘%s’" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "无法获取 map 文件的大小‘%s’" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "无法读取语言 map 文件‘%s’" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "无法读取整个语言 map 文件‘%s’" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C 语言:\n" " -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果\n" " -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果\n" " -u,--strip-underscore 从单个标记的字符串中删除前面的下划线\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C++ 语言:\n" " -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果\n" " -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果\n" " -u,--strip-underscore 从单个标记的字符串中删除前面的下划线\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Java 语言:\n" " -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果\n" " -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果\n" " -u,--strip-underscore 从单个标记的字符串中删除前面的下划线\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "内存碎片: ‘%c’" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "内存碎片: ‘\\%03o’" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "汇编语言:\n" " -c,--comment=CHARS 从 CHARS 开始为一个注释,直到一行结束\n" " -k,--keep=CHARS 允许在标识中使用 CHARS 并保存结果\n" " -i,--ignore=CHARS 允许在标识中使用 CHARS 但不保存结果\n" " -u,--strip-underscore 从标识中删除前面的下划线\n" " -n,--no-cpp 不要处理 C 预处理指定\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Text 语言:\n" " -i,--include=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的一部分\n" " -x,--exclude=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的分隔符\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Perl 语言:\n" " -i,--include=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的一部分\n" " -x,--exclude=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的分隔符\n" " -d,--dtags 包含文档标记\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Lisp 语言:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "无法读取目录‘%s’(从‘%s’中读取‘.’)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "注意: ‘%s’以前是 %s,但现在是 %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "文件" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "目录" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "警告: ‘%s’和‘%s’是同一个文件,但扫描所得不同!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "注意: 扫描参数改为‘%s’" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "无法混合使用 --include 和 --exclude 选项" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "无法获取工作目录" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "无法更改目录为‘%s’" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "无法将目录从‘%2$s’改为‘%1$s’" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "无法从‘%2$s’中 lstat ‘%1$s’" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "无法从‘%2$s’中 stat ‘%1$s’" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "尝试使用‘%s --help’来获取更多信息。\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "用法: %s [选项] 文件名 [文件名2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "列出出现在 FILENAME 中的识别字符。如果还指定了 FILENAME2 \n" "那就列出两个文件中都出现的识别字符。\n" "\n" " -f, --file=FILE ID 数据库的文件名\n" " --help 显示此帮助并退出\n" " --version 输出版本信息并退出\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "发送错误报告至 " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "没有文件名参数" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "文件名参数太多了" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "无法定位‘ID’" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "‘%s’有歧义" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "‘%s’未找到" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "用法: %s [选项]... [匹配模板]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "打印文件名中匹配 PATTERN 的文件名,\n" "使用 shell 通配符。\n" " -f, --file=FILE ID 数据库的文件名\n" " -S, --separator=STYLE STYLE 可以是‘braces’,‘space’或是‘newline’中的一个\n" " --help 显示此帮助并退出\n" " --version 输出版本信息并退出\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "用法: %s [选项]... 匹配模板...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "查寻 ID 数据库并报告结果。\n" "默认输出由多行组成,每行包含匹配的标识字符,\n" "后面跟着标识符出现时的文件名。\n" "\n" " -f, --file=FILE ID 数据库的文件名\n" "\n" " -i, --ignore-case 匹配 PATTERN,大小写不敏感\n" " -l, --literal 以纯文本字符串方式匹配 PATTERN\n" " -r, --regexp 以正则表达式方式匹配 PATTERN\n" " -w, --word 以分隔符方式匹配 PATTERN\n" " -s, --substring 以子串方式匹配 PATTERN\n" " 注意:如果 PATTERN 包含了扩展的正则表达式元字符\n" " (meta-character),它将被认为是正则表达式的子串。\n" " 否则,PATTERN 就被解释为一个文本字符串。\n" "\n" " -k, --key=STYLE STYLE 是 ‘token’,‘pattern’或是‘none’中的一个\n" " -R, --result=STYLE STYLE 是‘filenames’,‘grep’,‘edit’或是‘none’中的一" "个\n" " -S, --separator=STYLE STYLE 是‘braces’,‘space’或是‘newline’中的一个\n" " 当使用‘--result=filenames’时则仅对该文件有效\n" " 以上 STYLE 选项控制查寻结果如果输出。\n" " 默认是 --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ 找出出现 FREQ 次的标识, FREQ\n" " 是个以‘N..M’表达的范围。如果省略 N,\n" " 则默认为 1。如果省略 M 则默认为 MAX_USHRT\n" " -a, --ambiguous=LEN 找出名称与 LEN 有歧义的标识字符\n" "\n" " -x, --hex 仅查找十六进制表示的数\n" " -d, --decimal 仅查找十进制表示的数\n" " -o, --octal 仅查找八进制表示的数\n" " 默认查找将匹配任意底的数。\n" "\n" " --help 显示此帮助并退出\n" " --version 输出版本信息并退出\n" #: src/lid.c:283 msgid "braces" msgstr "大括号" #: src/lid.c:283 msgid "space" msgstr "空格" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "注意: 不要再用‘-e’了,使用‘-r’代替" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "在前 %d 个字符中所有的识别字符都没有歧义\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "无效的‘--key’类型: ‘%s’" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "无效的‘--result’类型: ‘%s’" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "无法匹配正则表达式: 内存耗尽" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "编辑? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "无法派生" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "无法执行‘%s’" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "用法: %s [选项]... [文件]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "建立一个标识符数据库。\n" " -o, --output=OUTFILE ID 数据库输出时所用的文件名\n" " -f, --file=OUTFILE 等同于 --output\n" " -i, --include=LANGS 在 LANGS 中包含语言(默认: “C C++ asm”)\n" " -x, --exclude=LANGS 在 LANGS 不包含语言\n" " -l, --lang-option=L:OPT 传递 OPT 作为语言 L 的默认值(见下)\n" " -m, --lang-map=MAPFILE 使用 MAPFILE 将文件名与源语言关联起来\n" " -d, --default-lang=LANG 设置 LANG 为默认源语言\n" " -p, --prune=NAMES 不包含文件(或目录)\n" " -v, --verbose 报告每个文件的统计结果\n" " -s, --statistics 运行结束时报告统计结果\n" "\n" " --file0-from=F 仅标识来自 F 的\n" " 非终止符所分隔的文件\n" "\n" " --help 显示此帮助并退出\n" " --version 输出版本信息并退出\n" "\n" "FILE 可以是个文件名,或者是目录名,它将用于递归搜索。\n" "如果不指定 FILE,默认搜索当前目录。\n" "注意‘--include’和‘--exclude’选项是互斥的。\n" "\n" "以下参数用于指定语言的扫描:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "额外操作 %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "文件操作无法与 --files0-from 合并" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "无法读取 %s" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: 读错误" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "当从标准输入(stdin)读取文件名时,不允许 %s 的文件名" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "无效的 0 字节文件名" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "无操作" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "无法在‘%2$s’中创建‘%1$s’" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "无法修改‘%s’" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "无法 stat ‘%s’" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " 新建 = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "名称=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "个数=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "字符串=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "文本=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "注释=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "文件=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "标识符=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "字节=%ld Kb, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "堆=%llu+%llu Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "输出=%ld (%ld 标识, %ld 命中)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", 频率=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "正在排序标识...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "正在写入‘%s’...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "无法创建‘%s’" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "内部限制: 2^32 或更大的字节偏移" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "关闭‘%s’时发生错误" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "级别 %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "打印出源文件中找到的所有标识\n" " -i, --include=LANGS 在 LANGS 中包含语言(默认: “C C++ asm”)\n" " -x, --exclude=LANGS 在 LANGS 中不包含语言\n" " -l, --lang-option=L:OPT 传递 OPT 作为语言 L 的默认值(见下)\n" " -m, --lang-map=MAPFILE 使用 MAPFILE 将文件名与源语言关联起来\n" " -d, --default-lang=LANG 设置 LANG 为默认的源语言\n" " -p, --prune=NAMES 不包含指定的文件(或目录)\n" "\n" " --file0-from=F 仅标识来自 F 的\n" " 非终止符所分隔的文件\n" "\n" " --help 显示此帮助并退出\n" " --version 输出版本信息并退出\n" "\n" "以下参数用于指定语言的扫描:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: 非法选项 -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/fi.po�������������������������������������������������������������������0000664�0000000�0000000�00000072715�12166360012�012770� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Finnish messages for idutils. # Copyright © 2009, 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Jorma Karvonen <karvonen.jorma@gmail.com>, 2010. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-06-18 13:08+0200\n" "Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n" "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/closeout.c:112 msgid "write error" msgstr "kirjoitusvirhe" #: lib/error.c:188 msgid "Unknown system error" msgstr "Tuntematon järjestelmävirhe" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: valitsin ’%c%s’ ei salli argumenttia\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: valitsin ’--%s’ vaatii argumentin\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: tunnistamaton valitsin ’--%s’\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: tunnistamaton valitsin ’%c%s’\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: virheellinen valitsin -- ’%c’\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: valitsin vaatii argumentin -- ’%c’\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: valitsin ’-W %s’ ei ole yksiselitteinen\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: valitsin ’-W %s’ ei salli argumenttia\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: valitsin ’-W %s’ vaatii argumentin\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "muisti loppui" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "nykyistä työhakemistoa ei kyetä tallentamaan" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "ei onnistuttu palaamaan alkuperäiseen työhakemistoon" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "”" #: lib/quotearg.c:312 msgid "'" msgstr "”" #: lib/regcomp.c:131 msgid "Success" msgstr "Onnistui" #: lib/regcomp.c:134 msgid "No match" msgstr "Ei löytynyt" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Virheellinen säännöllinen lauseke" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Virheellinen vertailumerkki" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Virheellinen merkkiluokkanimi" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Seuraava kenoviiva" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Virheellinen paluuviite" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Pariton [ tai [^" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Pariton ( tai \\(" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Pariton \\{" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Virheellinen \\{\\}-sisältö" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Virheellinen lukualueen loppu" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Muisti loppui" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Virheellinen edeltävä säännöllinen lauseke" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Ennenaikainen säännöllisen lausekkeen loppu" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Säännöllinen lauseke liian suuri" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Parition ) tai \\)" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Ei edellistä säännöllistä lauseketta" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "virheellinen ”--separator”-tyyli: ”%s”" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "ei voi määritellä merkkijonon io_size-kokoa!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "ei voitu avata tiedostoa ”%s”" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "”%s” ei ole ID-tiedosto! (virheellinen maaginen numero)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "”%s” on versio %d, mutta tämä ohjelma osaa vain versiota %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "tukematon koko kutsussa io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "tuntematon siirräntätyyppi: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "ei voi varata %ld tavua hash-taulua varten: muisti loppui" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Käyttöaste=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Uudelleenhajautus=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Yhteentörmäyksiä=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "tukematon koko kutsussa io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "tunnistamaton kieli: ”%s”" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "ei voi varata kieliargumenttien objektipinoa: muisti loppui" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "ei voi varata kieliargumentteja: muisti loppui" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "kielinimen odotettiin seuraava kohdetta ”%s” tiedostossa ”%s”" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "ei voida avata kielen map-tiedostoa ”%s”" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "ei voida saada map-tiedoston ”%s” kokoa" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "ei voida lukea kielen map-tiedostoa ”%s”" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "ei voida lukea kokonaan kielen map-tiedostoa ”%s”" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C-kieli:\n" " -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, säilytä tulos\n" " -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, hylkää tulos\n" " -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät " "alaviivat\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "C++-kieli:\n" " -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, säilytä tulos\n" " -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, hylkää tulos\n" " -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät " "alaviivat\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Java-kieli:\n" " -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, säilytä tulos\n" " -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole " "tyhjemerkkejä, hylkää tulos\n" " -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät " "alaviivat\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "roskaa: ”%c”" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "roskaa: ”\\%03o”" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Assembly-kieli:\n" " -c,--comment=MERKIT Kaikki MERKIT aloittavat rivin loppuun kestävän " "kommentin\n" " -k,--keep=MERKIT Salli MERKIT merkkijonoissa ja säilytä tulos\n" " -i,--ignore=MERKIT Salli MERKIT merkkijonoissa ja hylkää tulos\n" " -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät " "alaviivat\n" " -n,--no-cpp Älä käsittele C-esikääntäjädirektiivejä\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Text-kieli:\n" " -i,--include=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen " "rakenneosina\n" " -x,--exclude=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen " "erottimina\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Perl-kieli:\n" " -i,--include=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen " "rakenneosina\n" " -x,--exclude=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen " "erottimina\n" " -d,--dtags Sisällytä dokumentointitunnisteet\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Lisp-kieli:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "ei voida lukea hakemistoa ”%s” (”.” kohteesta ”%s”)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "ilmoitus: ”%s” oli %s, mutta on nyt %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "tiedosto" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "hakemisto" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "varoitus: ”%s” ja ”%s” ovat sama tiedosto, mutta antavat eri " "tutkintatulokset!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "ilmoitus: tutkintaparametrit muuttuivat kohteelle ”%s”" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "ei voi sekoittaa valitsimia --include ja --exclude" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "työhakemistoa ei saada" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "ei voi suorittaa chdir-komentoa hakemistoon ”%s”" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "ei voi suorittaa chdir-komentoa hakemistoon ”%s” hakemistosta ”%s”" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "ei voi suorittaa komentoa lstat ”%s” kohteesta ”%s”" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "ei voi suorittaa komentoa stat ”%s” kohteesta ”%s”" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Lisätietoja komennolla ”%s --help”.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Käyttö: %s [VALITSIN] TIEDOSTONIMI [TIEDOSTONIMI2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Luettele tunnisteet TIEDOSTONIMI-tiedostossa tai jos TIEDOSTONIMI2 on\n" "myös annettu, luettele tunnisteet, jotka esiintyvät molemmissa " "tiedostoissa.\n" "\n" " -f, --file=TIEDOSTO TIEDOSTOnimi ID-tietokannassa\n" " --help näytä tämä opaste ja poistu\n" " --version tulosta versiotiedot ja poistu\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Ilmoita virheistä osoitteeseen " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "tiedostonimiargumentit puuttuvat" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "liian monta tiedostonimiargumenttia" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "ei voi paikallistaa kohdetta ”ID”" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "”%s” ei ole yksiselitteinen" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "argumenttia ”%s” ei löytynyt" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Käyttö: %s [VALITSIN]... [MALLI]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Tulosta rakenneosatiedostonimet, jotka täsmäävät MALLIn kanssa\n" "käyttäen shell-tyylisiä jokerimerkkejä.\n" " -f, --file=TIEDOSTO TIEDOSTOn nimi ID-tietokannassa\n" " -S, --separator=TYYLI TYYLI on ”braces”, ”space” tai ”newline”\n" " --help näytä tämä opaste ja poistu\n" " --version tulosta versiotiedot ja poistu\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Käyttö: %s [VALITSIN]... MALLI...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Kysele ID-tietokantaa ja ilmoita tuloksista.\n" "Oletuksena tuloste koostuu useista riveistä, joista jokainen sisältää\n" "täsmäävän tunnisteen, jota seuraa luettelo tiedostonimistä, missä se " "esiintyy.\n" "\n" " -f, --file=TIEDOSTO ID-tietokannan TIEDOSTOnimi\n" "\n" " -i, --ignore-case täsmää MALLI riippumatta isoista ja pienistä " "kirjaimista\n" " -l, --literal täsmää MALLI literaalimerkkijonona\n" " -r, --regexp täsmää MALLI säännöllisenä lausekkeena\n" " -w, --word täsmää MALLI rajoitinsanana\n" " -s, --substring täsmää MALLI alimerkkijonona\n" " Huomaa: Jos MALLI sisältää laajennetun säännöllisen lausekkeen " "meta-\n" " merkkejä, se tulkitaan säännöllisen lausekkeen alimerkkijonona.\n" " Muuten MALLI tulkitaan literaalisanana.\n" "\n" " -k, --key=TYYLI TYYLI on ”token”, ”pattern” tai ”none”\n" " -R, --result=TYYLI TYYLI on ”filenames”, ”grep”, ”edit” tai ”none”\n" " -S, --separator=TYYLI TYYLI on ”braces”, ”space” tai ”newline” ja\n" " koskee tiedostonimiä vain kun käytössä on ”--" "result=filenames”\n" " Yllä olevat TYYLI-valitsimet ohjaavat sitä kuinka tulokset " "esitetään.\n" " Oletuksia ovat --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=TAAJUUS etsii merkkijonoja, jotka esiintyvät TAAJUUS " "kertaa,\n" " jossa TAAJUUS on lukualue ”N..M”. Jos N on " "jätetty pois,\n" " oletus on 1, jos M on jätetty pois, oletuksena on " "MAX_USHRT\n" " -a, --ambiguous=PITUUS etsii merkkijonoja, joiden nimet eivät ole " "yksiselitteisiä PITUUS merkkiä\n" "\n" " -x, --hex etsii vain heksadesimaalinumeroita\n" " -d, --decimal etsii vain desimaalinumeroita\n" " -o, --octal etsii vain oktaalinumeroita\n" " Oletuksena etsii mitä kantalukua tahansa käyttäviä numeroita.\n" "\n" " --help näytä tämä opaste ja poistu\n" " --version tulosta versiotiedot ja poistu\n" #: src/lid.c:283 msgid "braces" msgstr "sulkeet" #: src/lid.c:283 msgid "space" msgstr "välilyönti" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "" "ilmoitus: valitsimen ”-e” käyttö on vanhentunut, käytä sen sijasta ”-r”-" "valitsinta" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Kaikki tunnisteet ovat yksiselitteisiä ensimmäisen %d merkin sisällä\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "virheellinen ”--key”-tyyli: ”%s”" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "virheellinen ”--result”-tyyli: ”%s”" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "ei voi täsmätä säännöllistä lauseketta: muisti loppui" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "muokataanko? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "ei voi suorittaa funktiota fork" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "ei voida suorittaa komentoa exec ”%s”" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Rakenna tunnistetietokanta.\n" " -o, --output=OUTFILE ID-tietokantatulosteen tiedostonimi\n" " -f, --file=OUTFILE synonyymi valitsimelle --output\n" " -i, --include=LANGS ota mukaan LANGS-kielet (oletus: ”C C++ asm”)\n" " -x, --exclude=LANGS älä ota mukaan LANGS-kieliä\n" " -l, --lang-option=L:OPT välitä OPT oletuksena kielelle L (katso alla)\n" " -m, --lang-map=MAPFILE käytä MAPFILE kartoittamaan tiedostonimet " "lähdekieleen\n" " -d, --default-lang=LANG tee LANG oletuslähdekieleksi\n" " -p, --prune=NAMES älä ota mukaan nimettyjä tiedostoja tai " "hakemistoja\n" " -v, --verbose ilmoita tilastot tiedostottain\n" " -s, --statistics ilmoita tilastot suorituksen lopussa\n" "\n" " --files0-from=F jäsennä vain tiedostot, jotka on määritelty\n" " NUL-päätteisillä nimillä tiedostossa F\n" "\n" " --help näytä tämä opaste ja poistu\n" " --version tulosta versiotiedot ja poistu\n" "\n" "TIEDOSTO voi olla tiedostonimi tai hakemistonimi rekursiivisessä " "etsinnässä.\n" "Jos TIEDOSTO ei ole annettu, oletuksena etsitään nykyinen hakemisto.\n" "Huomaa, että valitsimet ”--include” ja ”--exclude” sulkevat toisensa pois.\n" "\n" "Seuraavat argumentit koskevat kielikohtaisia etsintöjä:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "lisäoperandi %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "tiedosto-operandeja ei voi yhdistää valitsimen --files0-from kanssa" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "ei voi avata %s lukemista varten" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: lukuvirhe" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" "%s-tiedostonimi ei ole sallittu luettaessa tiedostonimiä vakiosyötteestä" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "virheellinen nollapituinen tiedostonimi" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "ei mitään tehtävää" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "ei voida luoda kohdetta ”%s” kohteessa ”%s”" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "ei voi muokata kohdetta ”%s”" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "ei voi suorittaa komentoa stat ”%s”" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " uusi = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nimi=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Numero=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Merkkijono=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Literaali=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Kommentti=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Tiedostoja=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Merkkijonoja=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Tavuja=%ld kt, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Keko=%llu+%llu kt, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Tuloste=%ld (%ld tok, %ld osumaa)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Taajuus=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Lajitellaan merkkijonoja...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Kirjoitetaan ”%s”...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "ei voida luoda kohdetta ”%s”" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "sisäinen rajoite: 2^32-siirros tai suurempi" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "virhe suljettaessa ”%s”" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "taso %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Tulosta kaikki lähdetiedostoista löydetyt merkkijonot.\n" " -i, --include=LANGS ota mukaan LANGS-kielet (oletus: ”C C++ asm”)\n" " -x, --exclude=LANGS älä ota mukaan LANGS-kieliä\n" " -l, --lang-option=L:OPT välitä OPT oletuksena kielelle L (katso alla)\n" " -m, --lang-map=MAPFILE käytä MAPFILE kartoittamaan tiedostonimet " "lähdekieleen\n" " -d, --default-lang=LANG tee LANG oletuslähdekieleksi\n" " -p, --prune=NAMES älä ota mukaan nimettyjä tiedostoja tai " "hakemistoja\n" "\n" " --files0-from=F jäsennä vain tiedostot, jotka on määritelty\n" " NUL-päätteisillä nimillä tiedostossa F\n" "\n" " --help näytä tämä opaste ja poistu\n" "\t\t --version tulosta versiotiedot ja poistu\n" "\n" "Seuraavat argumentit koskevat kielikohtaisia etsintöjä:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: virheellinen valitsin -- %c\n" #~ msgid "" #~ "\n" #~ "\n" #~ msgstr "" #~ "\n" #~ "\n" ���������������������������������������������������id-utils-4.6+git20120811/po/POTFILES.in�������������������������������������������������������������0000664�0000000�0000000�00000000442�11434330764�013603� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������lib/closeout.c lib/error.c lib/getopt.c lib/obstack.c lib/openat-die.c lib/quotearg.c lib/regcomp.c lib/xalloc-die.c libidu/fnprint.c libidu/idfile.c libidu/idread.c libidu/idu-hash.c libidu/idwrite.c libidu/scanners.c libidu/walker.c src/fid.c src/fnid.c src/lid.c src/mkid.c src/xtokid.c ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/fi.gmo������������������������������������������������������������������0000664�0000000�0000000�00000055246�12166360012�013134� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.��!���k0�����0��&���0��-���0��-���0��*���1��.���J1��0���y1��+���1��+���1�� ���2��&���2��&���72�����^2�����b2��I���z2����2����W4�����<9��%��L9��'��r:��"���;�����;�����;�����;�����;����� <�����'<�����C<��/���_<�����<��$���<��(��<�� ���=��5��>�����>?�����N?�� ���l?�� ���z?�� ���?��)���?�� ���?��"���?����?��.���@��'��A��g��ED����E��#���M�����M�����M�����N�����N�����!N�����N�����N��)���O�����2O�����PO�����aO�����sO�� ���O��5���O��$���O��)���O��&���P�����;P�����UP�����YP��;���yP��A���P��!���P�����Q��9���!Q��;���[Q��.���Q��4���Q��J���Q�� ���FR��3���gR��/���R��)���R�����R��+���S�����AS��%���YS��;���S��<���S��2���S�� ���+T��!���LT��,���nT��?���T��5���T��,���U��'���>U��:���fU�� ���U�� ���U�����U�����U�����V��6���V�����JV��E���SV��,���V��(���V��+���V��.���W��'���JW�����rW�����W��E���W�����W�� ���W�� ���X�����'X��+���?X��:���kX��^���X�� ���Y��#���Y��/���6Y�� ���fY�����Y��&���Y��'���Y��V���Y��K���KZ�����Z�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-06-18 13:08+0200 Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com> Language-Team: Finnish <translation-team-fi@lists.sourceforge.net> Language: fi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); � Ilmoita virheistä osoitteeseen � uusi = %d/%d�%s: virheellinen valitsin -- ’%c’ �%s: valitsin ’%c%s’ ei salli argumenttia �%s: valitsin ’--%s’ ei salli argumenttia �%s: valitsin ’--%s’ vaatii argumentin �%s: valitsin ’-W %s’ ei salli argumenttia �%s: valitsin ’-W %s’ ei ole yksiselitteinen �%s: valitsin ’-W %s’ vaatii argumentin �%s: valitsin vaatii argumentin -- ’%c’ �%s: lukuvirhe�%s: tunnistamaton valitsin ’%c%s’ �%s: tunnistamaton valitsin ’--%s’ �”�, Taajuus=%ld/%ld=%.2f �Kaikki tunnisteet ovat yksiselitteisiä ensimmäisen %d merkin sisällä �Assembly-kieli: -c,--comment=MERKIT Kaikki MERKIT aloittavat rivin loppuun kestävän kommentin -k,--keep=MERKIT Salli MERKIT merkkijonoissa ja säilytä tulos -i,--ignore=MERKIT Salli MERKIT merkkijonoissa ja hylkää tulos -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät alaviivat -n,--no-cpp Älä käsittele C-esikääntäjädirektiivejä �Rakenna tunnistetietokanta. -o, --output=OUTFILE ID-tietokantatulosteen tiedostonimi -f, --file=OUTFILE synonyymi valitsimelle --output -i, --include=LANGS ota mukaan LANGS-kielet (oletus: ”C C++ asm”) -x, --exclude=LANGS älä ota mukaan LANGS-kieliä -l, --lang-option=L:OPT välitä OPT oletuksena kielelle L (katso alla) -m, --lang-map=MAPFILE käytä MAPFILE kartoittamaan tiedostonimet lähdekieleen -d, --default-lang=LANG tee LANG oletuslähdekieleksi -p, --prune=NAMES älä ota mukaan nimettyjä tiedostoja tai hakemistoja -v, --verbose ilmoita tilastot tiedostottain -s, --statistics ilmoita tilastot suorituksen lopussa --files0-from=F jäsennä vain tiedostot, jotka on määritelty NUL-päätteisillä nimillä tiedostossa F --help näytä tämä opaste ja poistu --version tulosta versiotiedot ja poistu TIEDOSTO voi olla tiedostonimi tai hakemistonimi rekursiivisessä etsinnässä. Jos TIEDOSTO ei ole annettu, oletuksena etsitään nykyinen hakemisto. Huomaa, että valitsimet ”--include” ja ”--exclude” sulkevat toisensa pois. Seuraavat argumentit koskevat kielikohtaisia etsintöjä: �Tavuja=%ld kt, �C-kieli: -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, säilytä tulos -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, hylkää tulos -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät alaviivat �C++-kieli: -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, säilytä tulos -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, hylkää tulos -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät alaviivat �Yhteentörmäyksiä=%ld/%ld=%.0f%%�Kommentti=%ld �Tiedostoja=%ld, �Keko=%llu+%llu kt, �Virheellinen paluuviite�Virheellinen merkkiluokkanimi�Virheellinen vertailumerkki�Virheellinen \{\}-sisältö�Virheellinen edeltävä säännöllinen lauseke�Virheellinen lukualueen loppu�Virheellinen säännöllinen lauseke�Java-kieli: -k,--keep=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, säilytä tulos -i,--ignore=MERKIT Salli MERKIT merkkijonoissa, joissa ei ole tyhjemerkkejä, hylkää tulos -u,--strip-underscore Riisu tyhjemerkittömiä merkkijonoja edeltävät alaviivat �Lisp-kieli: �Luettele tunnisteet TIEDOSTONIMI-tiedostossa tai jos TIEDOSTONIMI2 on myös annettu, luettele tunnisteet, jotka esiintyvät molemmissa tiedostoissa. -f, --file=TIEDOSTO TIEDOSTOnimi ID-tietokannassa --help näytä tämä opaste ja poistu --version tulosta versiotiedot ja poistu �Literaali=%ld, �Käyttöaste=%ld/%ld=%.0f%%, �Muisti loppui�Nimi=%ld, �Ei löytynyt�Ei edellistä säännöllistä lauseketta�Numero=%ld, �Tuloste=%ld (%ld tok, %ld osumaa) �Perl-kieli: -i,--include=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen rakenneosina -x,--exclude=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen erottimina -d,--dtags Sisällytä dokumentointitunnisteet �Ennenaikainen säännöllisen lausekkeen loppu�Tulosta kaikki lähdetiedostoista löydetyt merkkijonot. -i, --include=LANGS ota mukaan LANGS-kielet (oletus: ”C C++ asm”) -x, --exclude=LANGS älä ota mukaan LANGS-kieliä -l, --lang-option=L:OPT välitä OPT oletuksena kielelle L (katso alla) -m, --lang-map=MAPFILE käytä MAPFILE kartoittamaan tiedostonimet lähdekieleen -d, --default-lang=LANG tee LANG oletuslähdekieleksi -p, --prune=NAMES älä ota mukaan nimettyjä tiedostoja tai hakemistoja --files0-from=F jäsennä vain tiedostot, jotka on määritelty NUL-päätteisillä nimillä tiedostossa F --help näytä tämä opaste ja poistu --version tulosta versiotiedot ja poistu Seuraavat argumentit koskevat kielikohtaisia etsintöjä: �Tulosta rakenneosatiedostonimet, jotka täsmäävät MALLIn kanssa käyttäen shell-tyylisiä jokerimerkkejä. -f, --file=TIEDOSTO TIEDOSTOn nimi ID-tietokannassa -S, --separator=TYYLI TYYLI on ”braces”, ”space” tai ”newline” --help näytä tämä opaste ja poistu --version tulosta versiotiedot ja poistu �Kysele ID-tietokantaa ja ilmoita tuloksista. Oletuksena tuloste koostuu useista riveistä, joista jokainen sisältää täsmäävän tunnisteen, jota seuraa luettelo tiedostonimistä, missä se esiintyy. -f, --file=TIEDOSTO ID-tietokannan TIEDOSTOnimi -i, --ignore-case täsmää MALLI riippumatta isoista ja pienistä kirjaimista -l, --literal täsmää MALLI literaalimerkkijonona -r, --regexp täsmää MALLI säännöllisenä lausekkeena -w, --word täsmää MALLI rajoitinsanana -s, --substring täsmää MALLI alimerkkijonona Huomaa: Jos MALLI sisältää laajennetun säännöllisen lausekkeen meta- merkkejä, se tulkitaan säännöllisen lausekkeen alimerkkijonona. Muuten MALLI tulkitaan literaalisanana. -k, --key=TYYLI TYYLI on ”token”, ”pattern” tai ”none” -R, --result=TYYLI TYYLI on ”filenames”, ”grep”, ”edit” tai ”none” -S, --separator=TYYLI TYYLI on ”braces”, ”space” tai ”newline” ja koskee tiedostonimiä vain kun käytössä on ”--result=filenames” Yllä olevat TYYLI-valitsimet ohjaavat sitä kuinka tulokset esitetään. Oletuksia ovat --key=token --result=filenames --separator=%s -F, --frequency=TAAJUUS etsii merkkijonoja, jotka esiintyvät TAAJUUS kertaa, jossa TAAJUUS on lukualue ”N..M”. Jos N on jätetty pois, oletus on 1, jos M on jätetty pois, oletuksena on MAX_USHRT -a, --ambiguous=PITUUS etsii merkkijonoja, joiden nimet eivät ole yksiselitteisiä PITUUS merkkiä -x, --hex etsii vain heksadesimaalinumeroita -d, --decimal etsii vain desimaalinumeroita -o, --octal etsii vain oktaalinumeroita Oletuksena etsii mitä kantalukua tahansa käyttäviä numeroita. --help näytä tämä opaste ja poistu --version tulosta versiotiedot ja poistu �Säännöllinen lauseke liian suuri�Uudelleenhajautus=%d, �Lajitellaan merkkijonoja... �Merkkijono=%ld, �Onnistui�Text-kieli: -i,--include=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen rakenneosina -x,--exclude=MERKKI-LUOKKA Käsittele MERKKI-LUOKKA-merkkejä merkkijonojen erottimina �Merkkijonoja=%ld, �Seuraava kenoviiva�Lisätietoja komennolla ”%s --help”. �Tuntematon järjestelmävirhe�Pariton ( tai \(�Parition ) tai \)�Pariton [ tai [^�Pariton \{�Käyttö: %s [VALITSIN] TIEDOSTONIMI [TIEDOSTONIMI2] �Käyttö: %s [VALITSIN]... MALLI... �Käyttö: %s [VALITSIN]... [TIEDOSTO]... �Käyttö: %s [VALITSIN]... [MALLI]... �Kirjoitetaan ”%s”... �”�”%s” ei ole yksiselitteinen�”%s” ei ole ID-tiedosto! (virheellinen maaginen numero)�”%s” on versio %d, mutta tämä ohjelma osaa vain versiota %d�argumenttia ”%s” ei löytynyt�sulkeet�ei voi varata %ld tavua hash-taulua varten: muisti loppui�ei voi varata kieliargumenttien objektipinoa: muisti loppui�ei voi varata kieliargumentteja: muisti loppui�ei voi suorittaa chdir-komentoa hakemistoon ”%s”�ei voi suorittaa chdir-komentoa hakemistoon ”%s” hakemistosta ”%s”�ei voida luoda kohdetta ”%s”�ei voida luoda kohdetta ”%s” kohteessa ”%s”�ei voi määritellä merkkijonon io_size-kokoa!�ei voida suorittaa komentoa exec ”%s”�ei voi suorittaa funktiota fork�ei voida saada map-tiedoston ”%s” kokoa�työhakemistoa ei saada�ei voi paikallistaa kohdetta ”ID”�ei voi suorittaa komentoa lstat ”%s” kohteesta ”%s”�ei voi täsmätä säännöllistä lauseketta: muisti loppui�ei voi sekoittaa valitsimia --include ja --exclude�ei voi muokata kohdetta ”%s”�ei voitu avata tiedostoa ”%s”�ei voida avata kielen map-tiedostoa ”%s”�ei voida lukea hakemistoa ”%s” (”.” kohteesta ”%s”)�ei voida lukea kokonaan kielen map-tiedostoa ”%s”�ei voida lukea kielen map-tiedostoa ”%s”�ei voi suorittaa komentoa stat ”%s”�ei voi suorittaa komentoa stat ”%s” kohteesta ”%s”�ei voi avata %s lukemista varten�hakemisto�muokataanko? [y1-9^S/nq] �virhe suljettaessa ”%s”�lisäoperandi %s�ei onnistuttu palaamaan alkuperäiseen työhakemistoon�tiedosto�tiedosto-operandeja ei voi yhdistää valitsimen --files0-from kanssa�sisäinen rajoite: 2^32-siirros tai suurempi�virheellinen ”--key”-tyyli: ”%s”�virheellinen ”--result”-tyyli: ”%s”�virheellinen ”--separator”-tyyli: ”%s”�virheellinen nollapituinen tiedostonimi�roskaa: ”%c”�roskaa: ”\%03o”�kielinimen odotettiin seuraava kohdetta ”%s” tiedostossa ”%s”�taso %d: %ld/%ld = %.0f%% �muisti loppui�tiedostonimiargumentit puuttuvat�ei mitään tehtävää�ilmoitus: ”%s” oli %s, mutta on nyt %s!�ilmoitus: tutkintaparametrit muuttuivat kohteelle ”%s”�ilmoitus: valitsimen ”-e” käyttö on vanhentunut, käytä sen sijasta ”-r”-valitsinta�välilyönti�liian monta tiedostonimiargumenttia�nykyistä työhakemistoa ei kyetä tallentamaan�tuntematon siirräntätyyppi: %d�tunnistamaton kieli: ”%s”�tukematon koko kutsussa io_read (): %d�tukematon koko kutsussa io_write (): %d�varoitus: ”%s” ja ”%s” ovat sama tiedosto, mutta antavat eri tutkintatulokset!�%s-tiedostonimi ei ole sallittu luettaessa tiedostonimiä vakiosyötteestä�kirjoitusvirhe�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/fr.po�������������������������������������������������������������������0000664�0000000�0000000�00000077503�12166360012�013001� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# French translation of idutils. # Copyright (C) 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996. # Frédéric Marchal <fmarchal@perso.be>, 2011. msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2011-05-25 12:34+0200\n" "Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n" "Language-Team: French <traduc@traduc.org>\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Lokalize 1.0\n" #: lib/closeout.c:112 msgid "write error" msgstr "erreur d'écriture" #: lib/error.c:188 msgid "Unknown system error" msgstr "Erreur système inconnue" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: l'option « %s » est ambiguë\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: l'option « --%s » n'accepte pas de paramètre\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: l'option « %c%s » n'accepte pas de paramètre\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: l'option « --%s » requiert un paramètre\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: l'option « --%s » n'est pas reconnue\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: l'option « %c%s » n'est pas reconnue\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: l'option -- « %c » est invalide\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'option -- « %c » requiert un paramètre\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: l'option « -W %s » est ambiguë\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: l'option « -W %s » n'accepte pas de paramètre\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: l'option « -W %s » requiert un paramètre\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "mémoire épuisée" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "impossible de stocker le répertoire de travail courant" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "échec lors du retour vers le répertoire de travail initial" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "« " #: lib/quotearg.c:312 msgid "'" msgstr " »" #: lib/regcomp.c:131 msgid "Success" msgstr "Succès" #: lib/regcomp.c:134 msgid "No match" msgstr "Pas de correspondance" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Expression régulière invalide" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Caractère d'interclassement invalide" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Nom de classe de caractère invalide" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Antislash de fin" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Référence arrière invalide" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ ou [^ non apparié" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( ou \\( non appariée" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ non apparié" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenu invalide dans \\{\\}" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "La limite supérieure de l'intervalle est invalide" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Mémoire épuisée" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Expression régulière précédente invalide" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression régulière" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Expression régulière trop grande" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ou \\) non appariée" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Pas d'expression régulière précédente" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "Le style de « --separator » est invalide: « %s »" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "ne peut déterminer la taille « io_size » d'une chaîne !" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "ne peut ouvrir « %s »" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "" "« %s » n'est pas un identificateur de fichier ! (mauvaise valeur « magic »)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "« %s » est de version %d, mais je ne peux traiter que la version %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "la taille fournie à io_read() n'est pas supportée: %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "type d'E/S inconnu: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "ne peut allouer %ld octets pour la table de hachage: mémoire épuisée" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Charger=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Rehacher=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Collisions=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "la taille fournie à io_writel() n'est pas supportée: %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "langage inconnu: « %s »" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "ne peut allouer les paramètres « obstack » du langage: mémoire épuisée" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "ne peut allouer les paramètres du langage: mémoire épuisée" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "nom du langage attendu après « %s » dans le fichier « %s »" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "ne peut ouvrir le fichier d'index du langage « %s »" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "ne peut obtenir la taille du fichier d'index « %s »" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "ne peut lire le fichier d'index du langage « %s »" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "ne peut lire entièrement le fichier d'index du langage « %s »" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Langage C:\n" " -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et conserver le résultat\n" " -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et ignorer le résultat\n" " -u,--strip-underscore Éliminer le caractère souligné de tête d'une\n" " chaîne simple de jetons\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Langage C++:\n" " -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et conserver le résultat\n" " -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et ignorer le résultat\n" " -u,--strip-underscore Éliminer le caractère souligné de tête d'une\n" " chaîne simple de jetons\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Langage Java:\n" " -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et conserver le résultat\n" " -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de\n" " jetons et ignorer le résultat\n" " -u,--strip-underscore Éliminer le caractère souligné de tête d'une\n" " chaîne simple de jetons\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "rebut: « %c »" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "rebut: « \\%03o »" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Langage assembleur:\n" " -c,--comment=CARAC Les CARACtères débutent un commentaire\n" " jusqu'à la fin de la ligne\n" " -k,--keep=CARAC Autoriser les CARACtères dans les jetons et\n" " conserver le résultat\n" " -i,--ignore=CARAC Autoriser les CARACtères dans les jetons et\n" " ignorer le résultat\n" " -u,--strip-underscore Ěliminer le caractère souligné de tête des jetons\n" " -n,--no-cpp Ne pas traiter les directives du pré-propcesseur C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Langage texte:\n" " -i,--include=CLASSE Traiter les caractères de la CLASSE comme\n" " des constituants de jetons\n" " -x,--exclude=CHAR-CLASS Traiter les caractères de la CLASSE comme\n" " des délimiteurs de jetons\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Langage perl:\n" " -i,--include=CLASSE Traiter les caractères de la CLASSE comme\n" " des constituants de jetons\n" " -x,--exclude=CHAR-CLASS Traiter les caractères de la CLASSE comme\n" " des délimiteurs de jetons\n" " -d,--dtags Inclure les étiquettes de documentation\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Langage lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "ne peut lire le répertoire « %s » (« . » de « %s »)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "à noter: « %s » était %s, mais est devenu maintenant %s !" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "fichier" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "répertoire" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "avertissement: « %s » et « %s » sont le même fichier, mais donne des " "résultats d'analyse différents !" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "à noter: les paramètres d'analyse ont changés pour « %s »" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "les options --include et --exclude ne peuvent pas être mélangées" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "impossible de déterminer le répertoire de travail courant" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "ne peut exécuter chdir() dans « %s »" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "ne peut exécuter chdir() vers « %s » depuis « %s »" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "ne peut exécuter lstat() « %s » depuis « %s »" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "ne peut exécuter stat() « %s » depuis « %s »" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Utilisez « %s --help » pour obtenir plus d'informations.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Usage: %s [OPTION] FICHIER [FICHIER2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Afficher la liste des identificateurs qui apparaissent dans FICHIER ou,\n" "si FICHIER2 est également fourni, qui apparaissent dans les deux fichiers.\n" "\n" " -f, --file=FICHIER utiliser le FICHIER de la base de données\n" " des identificateurs\n" " --help afficher l'aide-mémoire\n" " --version afficher la version du logiciel\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Rapportez les bugs à " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "aucun nom de fichier fourni en paramètre" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "trop de noms de fichiers fournis en paramètre" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "ne peut trouver l'identificateur « ID »" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "« %s » est ambigu" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "« %s » n'a pas été trouvé" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Usage: %s [OPTION]... [PATRON]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Afficher les noms de fichiers constituants qui concordent avec le PATRON\n" "en utilisant le style des métacaractères des shells.\n" " -f, --file=FICHIER nom du FICHIER de la base de données\n" " des identificateurs\n" " -S, --separator=STYLE utiliser le STYLE parmi les choix possibles:\n" " « braces », « space » ou « newline »\n" " --help afficher l'aide-mémoire\n" " --version afficher le nom et la version du logiciel\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Usage: %s [OPTION]... PATRON...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Interroger la base de données des identificateurs et afficher les " "résultats.\n" "Par défaut, la sortie se présente sur plusieurs lignes, chaque ligne " "contient\n" "l'identificateur concordant suivi de la liste des noms de fichiers où\n" "cette concordance se produit.\n" "\n" " -f, --file=FICHIER nom du FICHIER de la base de données des\n" " identificateurs\n" "\n" " -i, --ignore-case établir la concordance au PATRON en ignorant\n" " la casse des caractères\n" " -l, --literal établir la concordance au PATRON comme une\n" " chaîne littérale\n" " -r, --regexp établir la concordance au PATRON comme une\n" " expression régulière\n" " -w, --word établir la concordance au PATRON sur un mot\n" " complet\n" " -s, --substring établir la concordance au PATRON sur une\n" " sous-chaîne\n" "Note: si le PATRON contient des méta-caractères étendus d'une expression " "régulière,\n" " il est interprété comme une sous-chaîne d'expression régulière.\n" " Autrement, le PATRON est interprété comme un mot littéral.\n" "\n" " -k, --key=STYLE traiter la clé selon un STYLE parmi:\n" " « token », « pattern » or « none »\n" " -R, --result=STYLE traiter le résultat selon un STYLE parmi:\n" " « filenames », « grep », « edit » ou « none »\n" " -S, --separator=STYLE traiter la séparation selon un STYLE parmi:\n" " « braces », « space » ou « newline »; ne s'applique\n" " qu'aux noms de fichiers quand « --" "result=filenames »\n" "Note: les options de STYLE contrôlent la présentation des résultats " "d'interrogations.\n" " Les options par défaut sont :\n" " --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ afficher les jetons qui apparaissent FREQ fois\n" " où FREQ s'exprime comme un intervalle « N..M ».\n" " Si N est omis, il vaut 1 par défaut; si M est omis,\n" " il prend la valeur MAX_USHRT\n" " -a, --ambiguous=LONG afficher les jetons dont les noms sont ambigus\n" " pour une chaîne de caractère ayant une certaine\n" " LONGueur\n" "\n" " -x, --hex afficher seulement les nombres exprimés en " "hexadécimal\n" " -d, --decimal afficher seulement les nombres exprimés en décimal\n" " -o, --octal afficher seulement les nombres exprimés en octal\n" "Par défaut, les nombres sont recherchés dans n'importe quelle base.\n" "\n" " --help afficher l'aide-mémoire\n" " --version afficher le nom et la version du logiciel\n" #: src/lid.c:283 msgid "braces" msgstr "parenthèses" #: src/lid.c:283 msgid "space" msgstr "blanc d'espacement" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "" "à noter: l'utilisation de « -e » est désuet, utilisez « -r » à la place" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "" "Tous les identificateurs sont uniques à l'intérieur des premiers %d " "caractères\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "le style de l'option « --key » est invalide: « %s »" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "le style de l'option « --result » est invalide: « %s »" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "" "ne peut établir la concordance avec l'expression régulière: mémoire épuisée" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "éditer? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "ne peut démarrer un autre processus via fork()" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "ne peut exécuter « %s »" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Usage: %s [OPTION]... [FICHIER]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Générer un base de données d'identificateurs.\n" " -o, --output=FICHIER nom du FICHIER de la base de données\n" " des identificateurs\n" " -f, --file=FICHIER identique à --output\n" " -i, --include=LANGAGES inclure les LANGAGES (par défaut: « C C++ asm »)\n" " -x, --exclude=LANGAGES exclure les LANGAGES\n" " -l, --lang-option=L:OPT relayer l'OPTion comme valeur par défaut du " "langage L\n" " (voir plus bas)\n" " -m, --lang-map=TABLE utiliser la TABLE d'index pour identifier\n" " les noms de fichiers sources des langages\n" " -d, --default-lang=LANG utiliser le LANGage source par défaut\n" " -p, --prune=NOMS exclure les fichiers et répertoires nommés\n" " -v, --verbose afficher les statistiques par fichier traités\n" " -s, --statistics afficher les statistiques à la fin d'exécution\n" "\n" " --files0-from=F ne traiter que les fichiers dont les noms " "(terminés par\n" " zéro) sont lus dans F\n" "\n" " --help afficher l'aide-mémoire\n" " --version afficher le nom et la version du logiciel\n" "\n" "FICHIER peut être un nom de fichier ou un nom de répertoire pour faire\n" "une recherche récursive.\n" "Si aucun FICHIER n'est fourni, le répertoire courant est utilisé par " "défaut.\n" "Noter que les options « --include » et « --exclude » sont mutuellement " "exclusives.\n" "\n" "Les paramètres suivants s'appliquent aux analyseurs spécifiques des " "langages :\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "paramètre %s superflu" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" "des noms de fichiers ne peuvent pas être fournis en même temps que --files0-" "from" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "impossible d'ouvrir %s en lecture" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: erreur de lecture" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" "lorsque les noms de fichiers sont lus depuis stdin, le nom de fichier %s " "n'est pas permis" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "le nom de fichier avec une taille nulle est invalide" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "rien à faire" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "ne peut créer « %s » dans « %s »" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "ne peut modifier « %s »" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "ne peut exécuter stat() sur « %s »" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nouveau=%d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nom=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Numéro=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Chaîne=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Littéral=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Commentaire=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Fichiers=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Jetons=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Octets=%ld Kb, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Tas=%llu+%llu Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Sortie=%ld (%ld jetons, %ld concordances)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Fréq=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Tri des jetons en cours...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Écriture de « %s » en cours...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "ne peut créer « %s »" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "limitation interne: déplacement de 2^32 ou plus" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "erreur à la fermeture de « %s »" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "niveau %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Afficher tous les jetons repérés dans un fichier source.\n" " -i, --include=LANG ajouter les LANGages (par défaut: « C C++ asm »)\n" " -x, --exclude=LANG exclure les LANGages\n" " -l, --lang-option=L:OPT relayer l'OPTion comme valeur par défaut du " "langage L\n" " (voir plus bas)\n" " -m, --lang-map=TABLE utiliser la TABLE d'index pour identifier\n" " les noms de fichiers sources des langages\n" " -d, --default-lang=LANG utiliser le LANGage source par défaut\n" " -p, --prune=NOMS exclure les fichiers ou répertoires\n" " portant les NOMS\n" "\n" " --files0-from=F ne traiter que les fichiers dont les noms " "(terminés par\n" " zéro) sont lus dans F\n" "\n" " --help afficher l'aide-mémoire\n" " --version afficher le nom et la version du logiciel\n" "\n" "Les paramètres suivants s'appliquent aux analyseurs spécifiques de " "langage :\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: l'option -- %c est illégale.\n" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/LINGUAS�����������������������������������������������������������������0000664�0000000�0000000�00000000071�11434330764�013051� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������da de fi fr ga hu id it nl pl pt_BR ro ru sv tr vi zh_CN �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/pl.gmo������������������������������������������������������������������0000664�0000000�0000000�00000055615�12166360012�013151� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.�� ���?0�����`0�����o0��*���0��*���0��"���0��+���1��'���.1��%���V1��%���|1�����1�����1�����1�����1�����1��L���2����Q2��x��3�����O9��s��^9��u��:�����H<�����_<�� ���n<�����z<�����<�����<�����<�����<��(���<�����=�����/=��v��J=�� ���>��%��>�� ���?�����@�����@�� ���0@�����<@��'���K@�� ���s@�����@��)��@��)���A����A����E����HG�����O�����P�����5P�� ���OP�����]P�����dP�����VQ�����fQ��/���xQ�����Q�����Q�����Q�����Q�����R��1���R��#���DR��"���hR��%���R�����R�����R�����R��2���R��5���S�����HS�����\S��H���cS��F���S��:���S�����.T��&���NT�����uT�����T��$���T�����T�����T��-���U��$���2U�����WU��#���oU��<���U��-���U�����U�����V��,���2V��-���_V��,���V��%���V�����V��"���V�� ���"W�� ���CW�����NW�����hW�����W��7���W�����W��?���W��0���X�����LX�����fX�����X��#���X�� ���X�����X��5���X�����Y�����5Y�����GY�����aY��#���yY��2���Y��8���Y����� Z�����Z��3���.Z�����bZ�����yZ��'���Z��(���Z��G���Z��T���,[�� ���[�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-06-18 19:49+0200 Last-Translator: Jakub Bogusz <qboosh@pld-linux.org> Language-Team: Polish <translation-team-pl@lists.sourceforge.net> Language: pl MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8-bit � Prosz zgasza bdy na adres � nowy = %d/%d�%s: bdna opcja -- '%c' �%s: opcja '%c%s' nie moe mie argumentw �%s: opcja '--%s' nie moe mie argumentw �%s: opcja '%s' musi mie argument �%s: opcja '-W %s' nie moe mie argumentw �%s: opcja '-W %s' jest niejednoznaczna �%s: opcja '-W %s' musi mie argument �%s: opcja musi mie argument -- '%c' �%s: bd odczytu�%s: nieznana opcja '%c%s' �%s: nieznana opcja '--%s' �'�, Czsto=%ld/%ld=%.2f �Wszystkie identyfikatory s niejednoznaczne w zakresie pierwszych %d znakw �Jzyk asemblera: -c,--comment=ZNAKI Kady ze ZNAKW rozpoczyna komentarz do koca linii -k,--keep=ZNAKI Dopuszczenie ZNAKW w znacznikach, zachowanie wyniku -i,--ignore=ZNAKI Dopuszczenie ZNAKW w znacznikach, pominicie wyniku -u,--strip-underscore Usunicie wiodcego podkrelenia ze znacznikw -n,--no-cpp Nie obsugiwanie dyrektyw preprocesora C �Budowanie bazy danych identyfikatorw. -o, --output=WYJCIE nazwa pliku wyjciowego bazy danych ID -f, --file=WYJCIE synonim --output -i, --include=JZYKI doczenie jzykw do JZYKW (domylnie: "C C++ asm") -x, --exclude=JZYKI wykluczenie jzykw z JZYKW -l, --lang-option=J:OPC przekazanie OPCji jako domylnej dla jzyka J (p. niej) -m, --lang-map=MAPA uycie pliku MAPY do mapowania nazwplikw na jzyki rdowe -d, --default-lang=JZYK uycie JZYKA jako domylnego jzyka rdowego -p, --prune=NAZWY wykluczenie plikw i/lub katalogw o tych nazwach -v, --verbose informowanie o statystykach dla kadego pliku -s, --statistics informowanie o statystykach na kocu dziaania --files0-from=P tokenizowanie tylko plikw okrelonych przez nazwy zakoczone znakiem NUL z pliku P --help wywietlenie tego opisu i zakoczenie --version wywietlenie informacji o wersji i zakoczenie PLIK moe by nazw pliku lub nazw katalogu do rekurencyjnego przeszukania. Jeli nie podano PLIKU, domylnie przeszukiwany jest katalog biecy. Uwaga: opcje `--include' i `--exclude' wzajemnie si wykluczaj. Nastpujce argumenty odnosz si do skanerw dla poszczeglnych jzykw: �Bajty=%ld Kb, �Jzyk C: -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, zachowanie wyniku -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, pominicie wyniku -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw jednoznacznikowych �Jzyk C++: -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, zachowanie wyniku -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, pominicie wyniku -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw jednoznacznikowych �Kolizje=%ld/%ld=%.0f%%�Komentarz=%ld �Pliki=%ld, �Sterta=%llu+%llu Kb, �Bdne odniesienie wstecz�Bdna nazwa klasy znakw�Bdny znak sortowany�Bdna zawarto \{\}�Bdne poprzedzajce wyraenie regularne�Bdny koniec zakresu�Bdne wyraenie regularne�Jzyk Java: -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, zachowanie wyniku -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach jednoznacznikowych, pominicie wyniku -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw jednoznacznikowych �Jzyk Lisp: �Wypisanie identyfikatorw wystpujcych w NAZWIE_PLIKU lub, jeli podano take NAZW_PLIKU_2, wystpujcych w obu nazwach. -f, --file=PLIK nazwa pliku bazy danych ID --help wywietlenie tego opisu i zakoczenie --version wywietlenie informacji o wersji i zakoczenie �Litera=%ld, �Obcienie=%ld/%ld=%.0f%%, �Pami wyczerpana�Nazwa=%ld, �Nic nie pasuje�Brak poprzedniego wyraenia regularnego�Numer=%ld, �Wynik=%ld (%ld tok, %ld hit) �Jzyk Perl: -i,--include=KLASA-ZNAKW Traktowanie znakw z KLASY jako skadnikw znacznikw -x,--exclude=KLASA-ZNAKW Traktowanie znakw z KLASY jako separatorw znacznikw -d,--dtags Doczenie znacznikw dokumentacji �Przedwczesny koniec wyraenia regularnego�Wypisanie wszystkich znacznikw znalezionych w pliku rdowym. -i, --include=JZYKI doczenie jzykw do JZYKW (domylnie: "C C++ asm") -x, --exclude=JZYKI wykluczenie jzykw z JZYKW -l, --lang-option=J:OPC przekazanie OPCji jako domylnej dla jzyka J (p. poniej) -m, --lang-map=MAPA uycie pliku MAPY do mapowania nazw plikw na jzyki rdowe -d, --default-lang=JZYK uycie JZYKA jako domylnego jzyka rdowego -p, --prune=NAZWY wykluczenie plikw i/lub katalogw o tych nazwach --files0-from=P tokenizowanie tylko plikw okrelonych przez nazwy zakoczone znakiem NUL z pliku P --help wywietlenie tego opisu i zakoczenie --version wywietlenie informacji o wersji i zakoczenie Nastpujce argumenty odnosz si do skanerw dla poszczeglnych jzykw: �Wypisanie pasujcych do WZORCA skadowych nazw plikw przy uyciu masek w stylu powoki. -f, --file=PLIK nazwa pliku bazy danych ID -S, --separator=STYL STYL to jeden z `braces' (nawiasy), `space' (spacja), `newline' (nowa linia) --help wywietlenie tego opisu i zakoczenie --version wywietlenie informacji o wersji i zakoczenie �Odpytanie bazy danych ID i zgoszenie wynikw. Domylnie wyjcie skada si z wielu linii, z ktrych kada zawiera pasujcy identyfikator, po ktrym nastpuje lista nazw plikw, w ktrych wystpuje. -f, --file=PLIK nazwa pliku bazy danych ID -i, --ignore-case dopasowywanie WZORCA z pominiciem wielkoci liter -l, --literal dopasowywanie WZORCA jako dokadnego acucha -r, --regexp dopasowywanie WZORCA jako wyraenia regularnego -w, --word dopasowywanie WZORCA jako ograniczonego sowa -s, --substring dopasowywanie WZORCA jako podcigu Uwaga: jeli WZORZEC zawiera metaznaki rozszerzonych wyrae regularnych, jest interpretowany jako podcig wyraenia regularnego. W przeciwnym wypadku WZORZEC jest interpretowany jako dokadne sowo. -k, --key=STYL STYL to jeden z: `token', `pattern' (wzorzec) lub `none' (brak) -R, --result=STYL STYL to jeden z: `filenames' (nazwy plikw), `grep', `edit' lub `none' (brak) -S, --separator=STYL STYL to jeden z `braces' (nawiasy), `space' (spacja) lub `newline' (nowa linia) i dotyczy tylko nazw plikw kiedy `--result=filenames' Powysze opcje STYLU okrelaj sposb prezentacji wynikw zapyta. Domylne to --key=token --result=filenames --separator=%s -F, --frequency=ILE szukanie znacznikw wystpujcych ILE razy, gdzie ILE to przedzia wyraony jako `N..M'. Jeli pominito N, zakadane jest 1; jeli pominito M, zakadane jest MAX_USHRT -a, --ambiguous=ILE szukanie znacznikw o nazwach niejednoznacznych na ILU znakach -x, --hex szukanie tylko liczb wyraonych szesnastkowo -d, --decimal szukanie tylko liczb wyraonych dziesitnie -o, --octal szukanie tylko liczb wyraonych semkowo Domylnie szukanie dopasowuje liczby o dowolnej podstawie. --help wywietlenie tego opisu i zakoczenie --version wywietlenie informacji o wersji i zakoczenie �Wyraenie regularne zbyt due�Ponownie mieszanie=%d, �Sortowanie znacznikw... �acuch=%ld, �Sukces�Jzyk tekstowy: -i,--include=KLASA-ZNAKW Traktowanie znakw z KLASY jako skadnikw znacznikw -x,--exclude=KLASA-ZNAKW Traktowanie znakw z KLASY jako separatorw znacznikw �Znaczniki=%ld, �Koczcy znak `\'�`%s --help' pozwoli uzyska wicej informacji. �Nieznany bd systemowy�Niesparowane ( lub \(�Niesparowane ) lub \)�Niesparowane [ lub [^�Niesparowane \{�Skadnia: %s [OPCJA] NAZWA_PLIKU [NAZWA_PLIKU_2] �Skadnia: %s [OPCJA]... WZORZEC... �Skadnia: %s [OPCJA]... [PLIK]... �Skadnia: %s [OPCJA]... [WZORZEC]... �Zapisuj `%s'... �`�`%s' jest niejednoznaczny�`%s' nie jest plikiem ID! (bdna liczba magiczna)�`%s' jest w wersji %d, ten program obsuguje tylko %d�nie znaleziono `%s'�braces�nie mona przydzieli %ld bajtw na tablic haszujc: pami wyczerpana�nie mona przydzieli obstack dla argumentw jzyka: pami wyczerpana�nie mona przydzieli argumentw jzyka: pami wyczerpana�nie mona wykona chdir do `%s'�nie mona wykona chdir do `%s' z `%s'�nie mona utworzy `%s'�nie mona utworzy `%s' w `%s'�nie mona okreli io_size acucha!�nie mona wykona exec `%s'�nie mona wykona fork�nie mona uzyska rozmiaru pliku mapowa `%s'�nie mona uzyska biecego katalogu�nie mona odnale `ID'�nie mona wykona lstat `%s' z `%s'�nie mona dopasowa wyraenia regularnego: pami wyczerpana�nie mona miesza opcji --include i --exclude�nie mona zmodyfikowa `%s'�nie mona otworzy `%s'�nie mona otworzy pliku mapowa jzyka `%s'�nie mona odczyta katalogu `%s' (`.' z `%s')�nie mona odczyta caego pliku mapowa `%s'�nie mona odczyta pliku mapowa `%s'�nie mona wykona stat na `%s'�nie mona wykona stat `%s' z `%s'�nie mona otworzy %s do odczytu�katalogiem�modyfikowa? [y1-9^S/nq] �bd podczas zamykania `%s'�nadmiarowy argument %s�nie udao si wrci do pocztkowego katalogu roboczego�plikiem�argumenty dotyczce plikw nie mog by czone z --files0-from�ograniczenie wewntrzne: offset 2^32 lub wikszy�bdny styl `--key': `%s'�bdny styl `--result': `%s'�bdny styl `--separator': `%s'�bdna nazwa pliku zerowej dugoci�mie: `%c'�mie: `\%03o'�oczekiwano nazwy jzyka zakoczonej `%s' w pliku `%s'�poziom %d: %ld/%ld = %.0f%% �pami wyczerpana�brak argumentw plikowych�nie ma nic do zrobienia�uwaga: `%s' byo %s, teraz jest %s!�uwaga: parametry przeszukiwania zmienione dla `%s'�uwaga: uycie `-e' jest przestarzae, prosz uywa `-r'�space�zbyt duo argumentw plikowych�nnie udao si zapisa biecego katalogu roboczego�nieznany typ we/wy: %d�nierozpoznany jzyk: `%s'�nieobsugiwany rozmiar w io_read (): %d�nieobsugiwany rozmiar w io_write (): %d�uwaga: `%s' i `%s' to ten sam plik, ale uzyskany w rnych przebiegach!�przy odczycie nazw plikw ze standardowego wejcia, nazwa pliku %s jest niedozwolona�bd zapisu��������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/tr.gmo������������������������������������������������������������������0000664�0000000�0000000�00000021457�12166360012�013160� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������L������|��e���������p�� ���q�������A�����e�������<�����K�����B �� ���\ �� ���i ����u �� ���~ ����� �� ��� �� ��� ����� ��9�� �� ��� ����� �� ���2 �����? �� ��� ��&��� ��(���! ��!���J �� ���l ��#��� ����� ����� ��%��� ��.��� �����)�����8��9���?��6���y��.�����������������������#��(���=�����f�� ���v����������������������0�������������-��!���=��)���_��(�����!��������������� ������������������ �����<�� ���[�� ���f��2���t������������'�����(�����3���+�����_�����e������������"�����#�����D�����u��?������������5��������� �������������������������!���� �������� �� ��� �� ���,��!���8����Z������������ ���"�����.�������+�����(���+��%���T��'���z��'���������� �����3�����:���!�����\�����m��9���t��8�����/����������%���1�����W��&���m��$���������������8��������!�����@��&���S��1���z������������(�����$�����2���# ��&���V �����} ����� ����� ����� ����� ����� ��!��� �� ���!�����!!��7���0!�����h!�����!��(���!��3���!��:���!�����7"��$���="�����b"�����|"��(���"��)���"��J���"��������?������;���4���������������E������G���)���9���-���.��������������0��� ����������F����������7���:���$���������� ���B���A���J������!���(�������������&����������I���������5���H���>���*���1���/���+���,������<�������L������ �������"�����������%���=���#����������@��� ��������������3������� �������6�������8�������������2���������K���������������������'������ �������C������D���� new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: id-utils 3.2d Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2002-06-27 13:00+0200 Last-Translator: Deniz Akkus Kanca <deniz@arayan.com> Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net> Language: tr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit � yeni = %d/%d�, Frek=%ld/%ld=%.2f �Bütün tanımlayıcıların ilk %d harfleri belirli �Makina dili: (assembly) -c,--comment=KRKTR KRKTR'lerin her biri satırsonuna kadar açıklamayı başlatır -k,--keep=KRKTR Anahtarlarda KRKTR'e izin verir, sonucu tutar -i,--ignore=KRKTR Anahtarlarda KRKTR'e izin verir, sonucu atar -u,--strip-underscore Anahtarların başından alt-tireyi soyar -n,--no-cpp C ön-işleyici yönergelerini işlemez �Bayt=%ld Kb, �C dili: -k,--keep=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu tutar -i,--ignore=KRKTR Tek anahtarlı dizgelerde KRKTR'e izin verir, sonucu atar -u,--strip-underscore Tek anahtarlı dizgelerin başından alt-tireyi soyar �Çakışmalar=%ld/%ld=%.0f%%�Açıklama=%ld �Dosyalar=%ld, �DOSYA'daki tanımlayıcıları gösterir. Eğer DOSYA2 de verilmişse, her iki dosyada da bulunan tanımlayıcıları gösterir. -f, --file=FDOS kimlik veritabanının dosya adı --help bu yardımı gösterir ve çıkar --version bu sürümü gösterir ve çıkar �Sabit=%ld, �Yük=%ld/%ld=%.0f%%, �İsim=%ld, �Sayı=%ld, �Çıktı=%ld (%ld anah, %ld hit) �KALIP'a uyan öğe dosya adlarını kabuk tarzı genel arama karakterleri kullanarak listeler. -f, --file=DOSYA kimlik veritabanının dosya adı -S, --separator=AYRAÇ AYRAÇ, `braces' ({}), `space' (boşluk) veya `newline' (yenisatır) olabilir --help bu yardımı gösterir ve çıkar --version sürüm bilgilerini gösterir ve çıkar �Yeniden hash=%d, �Anahtarlar sıralanıyor... �Dizge=%ld, �Metin dili: -i,--include=KSINIF KSINIF'a ait karakterleri anahtar öğesi olarak kabul eder -x,--exclude=KSINIF KSINIF'a ait karakterleri anahtar sonlayıcısı olarak kabul eder �Anahtarlar=%ld, �Daha fazla bilgi için `%s --help' yazın. �Kullanım: %s [SEÇENEK] DOSYA [DOSYA2] �Kullanım: %s [SEÇENEK]... KALIP... �Kullanım: %s [SEÇENEK]... [DOSYA]... �Kullanım: %s [SEÇENEK]... [KALIP]... �`%s' yazılıyor... �`%s' belirsiz�`%s' bir kimlik dosyası değil! (hatalı sihir no)�`%s' sürüm %d, fakat yalnız %d sürümü anlaşılıyor�`%s' bulunamadı�braces�hash tablosu için %ld bayt ayrılamadı: bellek tükendi�dil argüman ob-yığıtı ayrılamadı: bellek tükendi�dil argümanları ayrılamadı: bellek tükendi�`%s' dizinine geçilemedi�`%2$s'den `%1$s' dizinine geçilemedi�`%s' oluşturulamadı�`%2$s' içinde `%1$s' oluşturulamadı�bir dizgenin io_size'ı bulunamadı!�`%s' çalıştırılamadı�çatal açılamadı�`%s' eşleşme dosyasının büyüklüğü belirlenmiyor�çalışma dizini bulunamıyor�kimlik bulunamadı�`%2$s'den `%1$s'e `lstat' yapılamadı�düzenli ifade eşleştirilemedi: bellek tükendi�`%s' değiştirilemedi�`%s' açılamadı�dil eşleşme dosyası `%s' açılamadı�`%s' dizini okunamadı (`%s'den `.')�dil eşleşme dosyası `%s'nın tamamı okunamadı�dil eşleşme dosyası `%s' okunamadı�`%s' durumlanamadı�`%2$s'den `%1$s' durumlanamadı�dizin�düzenle? [e1-9^S/hq] �dosya�geçersiz `--key' türü: `%s'�geçersiz `--result' türü: `%s'�bozuk: `%c'�bozuk: `\%03o'�`%2$s' dosyasında `%1$s' sonrasında dil adı beklendi�seviye %d: %ld/%ld = %.0f%% �dosya adı argümanı yok�bildirim: `%s', %s idi, fakat şimdi %s!�bildirim: `%s' için tarama parametreleri değişti�bildirim: `-e' kullanımdan kalkmak üzere, `-r' kullanın�space�çok fazla dosya adı argümanı var�bilinmeyen I/O türü: %d�bilinmeyen dil: `%s'�io_read() içinde desteklenmeyen boy: %d�io_write() içinde desteklenmeyen boy: %d�uyarı: `%s' ve `%s' aynı dosya fakat farklı tarama sonuçları veriyor!������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/it.gmo������������������������������������������������������������������0000664�0000000�0000000�00000022160�12166360012�013137� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������L������|��e���������p�� ���q�������A�����e�������<�����K�����B �� ���\ �� ���i ����u �� ���~ ����� �� ��� �� ��� ����� ��9�� �� ��� ����� �� ���2 �����? �� ��� ��&��� ��(���! ��!���J �� ���l ��#��� ����� ����� ��%��� ��.��� �����)�����8��9���?��6���y��.�����������������������#��(���=�����f�� ���v����������������������0�������������-��!���=��)���_��(�����!��������������� ������������������ �����<�� ���[�� ���f��2���t������������'�����(�����3���+�����_�����e������������"�����#�����D�����i��?������������7��������� �����9��������� ����� �����9�������Y�����i�� ����� ����������c���� �����"���*�� ���M�����[�� ���I��/���W��'����� ����������"�������������0��+���?��=���k������������C�����O�����C���U�������&���������������0��������H�����b��6���{��+����������#�����@��� �����` �����| ��9��� ��3��� ��@���!��:���C!�����~!��"���!�� ���!�����!�����!�����!��!���"�����%"�����5"��=���H"�����"��"���"��$���"��5���"��8���"#�����[#��"���a#�����#��!���#��+���#��,���#��T���$��������?������;���4���������������E������G���)���9���-���.��������������0��� ����������F����������7���:���$���������� ���B���A���J������!���(�������������&����������I���������5���H���>���*���1���/���+���,������<�������L������ �������"�����������%���=���#����������@��� ��������������3������� �������6�������8�������������2���������K���������������������'������ �������C������D���� new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: id-utils 3.2d Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2003-08-28 21:45+0200 Last-Translator: Marco Parrone <marc0@autistici.org> Language-Team: Italian <tp@lists.linux.it> Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit � nuovo = %d/%d�, Freq=%ld/%ld=%.2f �Nessun identificatore ambiguo nei primi %d caratteri �Linguaggio Assembly: -c,--comment=CARATTERI Ognuno tra CARATTERI inizia un commento fino a fine linea -k,--keep=CARATTERI Permette CARATTERI nei simboli, mantiene il risultato -i,--ignore=CARATTERI Permette CARATTERI nei simboli, scarta il risultato -u,--strip-underscore Rimuove un underscore dall'inizio dei simboli singoli -n,--no-cpp Non elabora le direttive per il pre-processore C �Byte=%ld Kb, �Linguaggio C: -k,--keep=CARATTERI Permette CARATTERI nella stringa di un simbolo singolo, mantiene il risultato -i,--ignore=CARATTERI Permette CARATTERI nella stringa di un simbolo singolo, scarta il risultato -u,--strip-underscore Rimuove un underscore dall'inizio della stringa di un simbolo singolo �Collisioni=%ld/%ld=%.0f%%�Commento=%ld �File=%ld, �Elenca gli identificatori che occorrono in FILENAME, o se viene fornito anche FILENAME2 elenca gli identificatori che occorrono in entrambi i file. -f, --file=FILE nome del file del database degli ID --help mostra questo aiuto ed esce --version mostra informazioni sulla versione ed esce �Letterale=%ld, �Caricati=%ld/%ld=%.0f%%, �Nome=%ld, �Numero=%ld, �Output=%ld (%ld tok, %ld hit) �Visualizza i nomi di file costituenti che soddisfano PATTERN, usando caratteri jolly in stile shell. -f, --file=FILE nome del file del database degli ID -S, --separator=STILE STILE pu essere braces, space o newline --help mostra questo aiuto ed esce --version mostra informazioni sulla versione ed esce �Rehash=%d, �Ordinamento dei simboli in corso. �Stringa=%ld, �Linguaggio testo: -i,--include=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-CARATTERI come costituenti di un simbolo -x,--exclude=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-CARATTERI come delimitatori di un simbolo �Simboli=%ld, �Provare %s --help per maggiori informazioni. �Uso: %s [OPZIONI] FILENAME [FILENAME2] �Uso: %s [OPZIONI]... PATTERN... �Uso: %s [OPZIONE]... [FILE]... �Uso: %s [OPZIONI]... [PATTERN]... �Scrittura di %s in corso. �%s ambiguo�%s non un file ID (numero magic errato)�la versione di %s %d, ma conosciuta solo la versione %d�%s non trovato�braces�impossibile allocare %ld byte per la tabella hash: memoria esaurita�impossibile allocare obstack per gli argomenti del linguaggio: memoria esaurita�impossibile allocare gli argomenti del linguaggio: memoria esaurita�impossibile fare chdir in %s�impossibile fare chdir in %s da %s�impossibile creare %s�impossibile creare %s in %s�impossibile determinare l'io_size di una stringa�impossibile eseguire %s�impossibile fare il fork�impossibile ottenere la dimensione del file mappa %s�impossibile ottenere la directory di lavoro�impossibile localizzare ID�impossibile fare lstat %s da %s�impossibile riconoscere l'espressione regolare: memoria esaurita�impossibile modificare %s�impossibile aprire %s�impossibile aprire il file della mappa dei linguaggi %s�impossibile leggere la directory %s (. da %s)�impossibile leggere l'intero file della mappa dei linguaggi %s�impossibile leggere il file della mappa dei linguaggi %s�impossibile fare stat %s�impossibile fare stat %s da %s�directory�modificare? [y1-9^S/nq] �file�stile --key non valido: %s�stile --result non valido: %s�rifiutato: %c�rifiutato: \%03o�era previsto il nome di un linguaggio dopo %s nel file %s�livello %d: %ld/%ld = %.0f%% �nessun nome di file come argomento�nota: %s era un %s, ma ora un %s�nota: sono cambiati i parametri di scansione per %s�nota: l'uso di -e sconsigliato, usare -r piuttosto�space�troppi nomi di file come argomenti�tipo di I/O sconosciuto: %d�linguaggio non riconosciuto: %s�dimensione non supportata in io_read (): %d�dimensione non supportata in io_write (): %d�attenzione: %s e %s sono lo stesso file, ma corrispondono a scansioni differenti�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ro.gmo������������������������������������������������������������������0000664�0000000�0000000�00000021602�12166360012�013143� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������L������|��e���������p�� ���q�������A�����e�������<�����K�����B �� ���\ �� ���i ����u �� ���~ ����� �� ��� �� ��� ����� ��9�� �� ��� ����� �� ���2 �����? �� ��� ��&��� ��(���! ��!���J �� ���l ��#��� ����� ����� ��%��� ��.��� �����)�����8��9���?��6���y��.�����������������������#��(���=�����f�� ���v����������������������0�������������-��!���=��)���_��(�����!��������������� ������������������ �����<�� ���[�� ���f��2���t������������'�����(�����3���+�����_�����e������������"�����#�����D�������?������������=�������R�������������������5�� ���H��;��V������������ ����� �����!�����c���� ���[�����g�����z������� ���[��3���h��2�����%�����&�����%��������B�����S��/���e��8���������������8�����;��� ��2���\�������"���������������#�������������.��0���?��"���p������������,������������� ��4��� ��*���T ��8��� ��1��� ����� ����� �����!�����&!�����<!�����C!�����^!�� ���|!�����!��3���!�����!�� ���!�����"��)���%"��=���O"�����"��$���"�����"�����"��$���"��%��� #��N���3#��������?������;���4���������������E������G���)���9���-���.��������������0��� ����������F����������7���:���$���������� ���B���A���J������!���(�������������&����������I���������5���H���>���*���1���/���+���,������<�������L������ �������"�����������%���=���#����������@��� ��������������3������� �������6�������8�������������2���������K���������������������'������ �������C������D���� new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: id-utils-3.2d Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2003-05-05 08:15+0300 Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro> Language-Team: Romanian <translation-team-ro@lists.sourceforge.net> Language: ro MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); � nou(i) = %d/%d�, Freq=%ld/%ld=%.2f �Toi identificatorii nu sunt ambigui n primele %d caractere �Limbaj de asamblare: -c,--comment=CARACTERE Oricare din CARACTERE ncepe un comentariu pn la sfrit de linie -k,--keep=CARACTERE Accept CARACTERE n tokens, i pstreaz rezultatul -i,--ignore=CARACTERE Accept CARACTERE n tokens, i renun la rezultat -u,--strip-underscore Scoate underscore-ul din faa tokens -n,--no-cpp Nu interpreta directivele C pre-processor �Octei=%ld Kb, �limbaj C: -k,--keep=CARACTERE Permite CARACTERE in iruri single-token , pstreaz rezultatele -i,--ignore=CARACTERE Permite CARACTERE n iruri single-token, renun la rezultate -u,--strip-underscore Scoate underscore-ul din faa irurilor single-token �Coliziuni=%ld/%ld=%.0f%%�Comentariu(i)=%ld �Fiiere=%ld, �Listeaz identificatorii ce apar n NUME_FIIER,sau dac NUME_FIIER este dat de asemenea listeaz identificatorii care apar n ambele fiiere. -f, --file=FIIER numele de fiier al bazei de date ID --help afieaz acest ajutor i iese --version afieaz informaii despre versiune i iese �Literal(e)=%ld, �ncrcare=%ld/%ld=%.0f%%, �Nume=%ld, �Numr=%ld, �Output=%ld (%ld tok, %ld gsite) �Tiprete numele fiiere constituente care se potrivesc TIPARului, utiliznd globale(wildcards) stil shell. -f, --file=FIIER nume fiier al bazei de date ID -S, --separator=STIL STIL e unul din `braces', `space' sau `newline' --help afieaz acest ajutor i iese --version afieaz informaii versiune i iese �Rehash=%d, �Sortare tokens... �ir(uri)=%ld, �Limbaj text: -i,--include=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca i constitueni token -x,--exclude=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca i delimitatori token �Tokens=%ld, �ncercai `%s --help' pentru mai multe informaii. �Folosire: %s [OPIUNE] NUME_FIIER [NUME_FIIER2] �Folosire: %s [OPIUNE]... PATTERN... �Folosire: %s [OPIUNE]... [FIIER]... �Folosire: %s [OPIUNE]... [TIPAR]... �Scriere `%s'... �`%s' este ambiguu�`%s' nu este un fiier ID! (numr magic greit)�`%s' este versiunea %d, dar eu accept numai versiunea %d�nu am gsit `%s'�acolade�nu pot aloca %ld octei pentru hash table: memorie plin�nu pot aloca obstack parametri (args) limbaj: memorie plin�nu pot aloca parametri(args) limbaj: memorie plin�nu pot face chdir la `%s'�nu pot face chdir n `%s' din `%s'�nu pot crea `%s'�nu pot crea `%s' n `%s'�nu pot determina io_size a irului!�nu pot executa `%s'�nu pot face fork�nu pot stabili mrimea fiierului de mapare `%s'�nu pot schimba directorul de lucru�nu pot localiza `ID'�nu pot face lstat `%s' din `%s'�nu pot gsi expresia regulat: memorie plin�nu pot modifica `%s'�nu pot deschide `%s'�nu pot deschide fiierul de mapare a limbajului `%s'�nu pot citi directorul `%s' (.`' din `%s')�nu pot citi ntregul fiier de mapare al limbajului `%s'�nu pot citi fiierul de mapare al limbajului `%s'�nu pot stabili `%s'�nu pot face stat `%s' din `%s'�director�editare? [y1-9^S/nq] �fiier�stil `--key' invalid: `%s'�stil `--result' invalid: `%s'�gunoi: `%c'�gunoi: `\%03o'�nume limbaj ateptat ulterior `%s' n fiierul `%s'�nivel %d: %ld/%ld = %.0f%% �nici un parametru de nume fiier�not: `%s' a fost %s, nu %s!�not: parametrul de scan schimbat n `%s'�not: folosirea lui `-e' este nvechit, folosii `-r' n loc�spaiu�prea muli parametri de nume fiiere�Tip I/O necunoscut: %d�limbaj necunoscut: `%s'�mrime nesuportat n io_read (): %d�mrime nesuportat n io_write (): %d�avertisment: `%s' i `%s' sunt acelai fiier, dar au produs scanri diferite!�������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/id.gmo������������������������������������������������������������������0000664�0000000�0000000�00000025004�12166360012�013117� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������S��������q���L������������� ���"�����0��A���E��e����������������� ����� �� ��� �� ��� ����� ����� ����) �� ���2 �����@ �� ���V �� ���a �����n ����� ��9��d�� ���������� ���������� ���x��&�����(�����!����� �����#��������<�����M��%���_��.���������������9�����6�����.���;�����j�����~������������(���������� �������� �����,�����H�����Z��0���u������������!�����)�����(�����!���=�����_�����o�� ������������������������������!����� ����� ���&��2���4�����g�������'�����(�����3�������������%�����B�����W��"���s��#�����D�������������� ����������=�����e�������{��������������� ����� ��������� �����-���� ���������� ���'�� ���2�����?�����^��_�� �� ���r!�����}!�� ���!�����!�� ���M"��/���Z"��&���"��$���"��$���"��$���"����� #�� ���1#��&���<#��4���c#�����#�����#��B���#��<���#��4���4$�����i$��#���$�����$��#���$��-���$�����%�����0%��+���E%��%���q%�����%�� ���%��5���%����� &�����'&��(���@&��2���i&��.���&��(���&�����&����� '�� ���-'�����7'�����J'�����]'�����b'��!���'��$���'�� ���'�����'��5���'�����(�����7(��<���S(��-���(��A���(������)�� ���)�����')�����B)��)���])��*���)��Q���)��������>���������������A�������F��� ����������E���0����������%���(���H���!������8�������:�����������������G���@���)���N������J�������������"��� ���L������2��������������9�������-���*�������#���&���/���1���6���7���'���=���O������S���D������R���������� �������4���K���P�������C���5���������I����������$��� ���B�������;�������������Q�����������M���+����������������������3��� �����������<���?��������������������,���.��������� ���� Report bugs to � new = %d/%d�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Rehash=%d, �Sorting tokens... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Try `%s --help' for more information. �Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�directory�edit? [y1-9^S/nq] �error closing `%s'�file�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �no file name arguments�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�Project-Id-Version: idutils 4.2 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2008-08-17 19:57+0700 Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com> Language-Team: Indonesian <translation-team-id@lists.sourceforge.net> Language: id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 0.9.6 � Laporkan kutu ke � baru = %d/%d�, Frek=%ld/%ld=%.2f �Semua identifier adalah non-ambigu dalam %d karakter pertama �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Bytes=%ld Kb, �C language: -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan hasilnya -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus hasilnya -u,--strip-underscore hilangkan garis bawah awal dari string token tunggal �C++ language: -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan hasilnya -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus hasilnya -u,--strip-underscore hilangkan garis bawah awal dari string token tunggal �Tabrakan==%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Java language: -k,--keep=CHARS bolehkan CHARS dalam string token-tunggal, simpan hasilnya -i,--ignore=CHARS bolehkan CHARS dalam string token-tunggal, hapus hasilnya -u,--strip-underscore hilangkan garis bawah awal dari string token tunggal �Bahasa Lisp: �Daftar identifier yang ada dalam FILENAME, atau bila FILENAME2 juga diberikan daftar identifier yang ada di kedua file. -f, --file=FILE nama file database ID --help menampilkan help ini dan keluar --version menampilkan informasi versi dan keluar �Literal=%ld, �Beban=%ld/%ld=%.0f%%,�Name=%ld, �Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Perlakukan karakter CHAR-CLASS sebagai pengganti token -x,--exclude=CHAR-CLASS Perlakukan karakter CHAR-CLASS sebagai penghapus token �Cetak nama file konstituen yang cocok dengan PATTERN, menggunakan wildcard bergaya-shell. -f, --file=FILE nama file database ID -S, --separator=STYLE STYLE adalah salah satu dari `braces', `spaces', atau `newline' -h, --help tampilkan bantuan ini dan keluar --version tampilkan informasi versi dan keluar �Rehash=%d,�Mensorting token... �String=%ld, �Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Coba `%s --help' untuk informasi lebih lanjut. �Pemakaian: %s [OPTION]... FILE1 FILE2 �Pemakaian: %s [OPTION]... [POLA]... �Pemakaian: %s [OPTION]... [FILE]... �Pemakaian: %s [OPTION]... [POLA]... �Menulis `%s'... �`%s' rancu�`%s' bukanlah file ID! (# ajaib jelek)�`%s' adalah versi %d, namun saya hanya grok versi %d�`%s' tidak ditemukan�kurung�tidak dapat mengalokasikan %ld byte untuk tabel hash: memori habis�tidak dapat mengalokasikan obstack args bahasa: memori habis�tidak dapat mengalokasikan args bahasa: memori habis�tidak dapat chdir ke `%s'�tidak dapat chdir ke `%s' dari `%s'�tidak dapat membuat `%s'�tidak dapat membuat `%s' dalam `%s'�tidak dapat menentukan io_size sebuah string!�tidak dapat mengeksekusi `%s'�tidak dapat mem-fork�tidak dapat memperoleh ukuran file map `%s'�Tidak dapat mengambil direktori kerja�tidak dapat menemukan `ID'�tidak dapat lstat `%s' dari `%s'�tidak dapat mencocokan ekspresi reguler: memori habis�tidak dapat memodifikasi `%s'�tidak dapat membuka `%s'�tidak dapat membuka file `%s' map bahasa�tidak dapat membaca direktori `%s' (`.' dari `%s')�tidak dapat membaca semua file map bahasa `%s'�tidak dapat membaca file map bahasa `%s'�tidak dapat menstat `%s'�tidak dapat stat `%s' dari `%s'�direktori�edit? [y1-9^S/nq] �galat menutup `%s'�file�gaya `--key' tidak valid: `%s'�gaya `--result' tidak valid: `%s'�gaya `--separator' tidak valid: `%s'�sampah: `%c'�sampah: `\%03o'�mengharapkan nama bahasa setelah `%s' dalam file `%s'�level %d: %ld/%ld = %.0f%% �tidak ada argumen nama file�perhatikan: `%s' adalah sebuah %s, namun sekarang sebuah %s!�perhatikan: parameter scan berubah untuk `%s'�perhatikan: penggunaan `-e' sudah tidak didukung, gunakanlah `-r'�space�terlalu banyak argumen nama file�tipe I/O tidak dikenal: %d�bahasa tidak dikenal: `%s'�ukuran tidak didukung dalam io_read(): %d�ukuran tidak didukung dalam io_write(): %d�peringatan: `%s' dan `%s' adalah file yang sama, namun menghasilkan scan berbeda!�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/fr.gmo������������������������������������������������������������������0000664�0000000�0000000�00000061622�12166360012�013140� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.�����i0�����0��(���0��6���0��6���0��1���(1��7���Z1��(���1��2���1��2���1�����!2��-���72��-���e2�����2�����2��R���2����3����5�����:����:����<�����>�����,>�����=>�����L>�����_>��$���}>��%���>�����>��,���>��2���?�����C?����c?�����@��e��A�����kB�����{B�����B�� ���B�����B��)���B�� ���B��*���B��J��*C��,���uD����D����YH�� ��EJ��"���T�� ���U�����!U�� ���=U�����KU����SU�� ���[V�����hV��=���yV�����V�����V�����V�����V�����W��&���!W�� ���HW��#���iW��"���W��$���W�����W�����W��T���W��G���EX�� ���X�� ���X��G���X��N���Y��>���RY��)���Y��;���Y�����Y��)���Z��>���;Z�����zZ��/���Z��7���Z��;���Z��+���;[��6���g[��Q���[��C���[�����4\�����P\��7���j\��@���\��B���\��5���&]��'���\]��5���]��!���]�� ���]�����]��$���]�����#^��<���:^�����w^��R���^��0���^��;���_��>���?_��8���~_��4���_�����_�����_��C���`�����W`�����t`��)���`�� ���`��@���`��@����a��R���Aa�����a��.���a��7���a�����b�����%b��7���Ab��9���yb��q���b��Y���%c�����c�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2011-05-25 12:34+0200 Last-Translator: Frédéric Marchal <fmarchal@perso.be> Language-Team: French <traduc@traduc.org> Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8-bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Lokalize 1.0 � Rapportez les bugs à � nouveau=%d/%d�%s: l'option -- « %c » est invalide �%s: l'option « %c%s » n'accepte pas de paramètre �%s: l'option « --%s » n'accepte pas de paramètre �%s: l'option « --%s » requiert un paramètre �%s: l'option « -W %s » n'accepte pas de paramètre �%s: l'option « -W %s » est ambiguë �%s: l'option « -W %s » requiert un paramètre �%s: l'option -- « %c » requiert un paramètre �%s: erreur de lecture�%s: l'option « %c%s » n'est pas reconnue �%s: l'option « --%s » n'est pas reconnue � »�, Fréq=%ld/%ld=%.2f �Tous les identificateurs sont uniques à l'intérieur des premiers %d caractères �Langage assembleur: -c,--comment=CARAC Les CARACtères débutent un commentaire jusqu'à la fin de la ligne -k,--keep=CARAC Autoriser les CARACtères dans les jetons et conserver le résultat -i,--ignore=CARAC Autoriser les CARACtères dans les jetons et ignorer le résultat -u,--strip-underscore Ěliminer le caractère souligné de tête des jetons -n,--no-cpp Ne pas traiter les directives du pré-propcesseur C �Générer un base de données d'identificateurs. -o, --output=FICHIER nom du FICHIER de la base de données des identificateurs -f, --file=FICHIER identique à --output -i, --include=LANGAGES inclure les LANGAGES (par défaut: « C C++ asm ») -x, --exclude=LANGAGES exclure les LANGAGES -l, --lang-option=L:OPT relayer l'OPTion comme valeur par défaut du langage L (voir plus bas) -m, --lang-map=TABLE utiliser la TABLE d'index pour identifier les noms de fichiers sources des langages -d, --default-lang=LANG utiliser le LANGage source par défaut -p, --prune=NOMS exclure les fichiers et répertoires nommés -v, --verbose afficher les statistiques par fichier traités -s, --statistics afficher les statistiques à la fin d'exécution --files0-from=F ne traiter que les fichiers dont les noms (terminés par zéro) sont lus dans F --help afficher l'aide-mémoire --version afficher le nom et la version du logiciel FICHIER peut être un nom de fichier ou un nom de répertoire pour faire une recherche récursive. Si aucun FICHIER n'est fourni, le répertoire courant est utilisé par défaut. Noter que les options « --include » et « --exclude » sont mutuellement exclusives. Les paramètres suivants s'appliquent aux analyseurs spécifiques des langages : �Octets=%ld Kb, �Langage C: -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et conserver le résultat -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et ignorer le résultat -u,--strip-underscore Éliminer le caractère souligné de tête d'une chaîne simple de jetons �Langage C++: -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et conserver le résultat -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et ignorer le résultat -u,--strip-underscore Éliminer le caractère souligné de tête d'une chaîne simple de jetons �Collisions=%ld/%ld=%.0f%%�Commentaire=%ld �Fichiers=%ld, �Tas=%llu+%llu Kb, �Référence arrière invalide�Nom de classe de caractère invalide�Caractère d'interclassement invalide�Contenu invalide dans \{\}�Expression régulière précédente invalide�La limite supérieure de l'intervalle est invalide�Expression régulière invalide�Langage Java: -k,--keep=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et conserver le résultat -i,--ignore=CARAC Autoriser les CARACtères d'une chaîne simple de jetons et ignorer le résultat -u,--strip-underscore Éliminer le caractère souligné de tête d'une chaîne simple de jetons �Langage lisp: �Afficher la liste des identificateurs qui apparaissent dans FICHIER ou, si FICHIER2 est également fourni, qui apparaissent dans les deux fichiers. -f, --file=FICHIER utiliser le FICHIER de la base de données des identificateurs --help afficher l'aide-mémoire --version afficher la version du logiciel �Littéral=%ld, �Charger=%ld/%ld=%.0f%%, �Mémoire épuisée�Nom=%ld, �Pas de correspondance�Pas d'expression régulière précédente�Numéro=%ld, �Sortie=%ld (%ld jetons, %ld concordances) �Langage perl: -i,--include=CLASSE Traiter les caractères de la CLASSE comme des constituants de jetons -x,--exclude=CHAR-CLASS Traiter les caractères de la CLASSE comme des délimiteurs de jetons -d,--dtags Inclure les étiquettes de documentation �Fin prématurée de l'expression régulière�Afficher tous les jetons repérés dans un fichier source. -i, --include=LANG ajouter les LANGages (par défaut: « C C++ asm ») -x, --exclude=LANG exclure les LANGages -l, --lang-option=L:OPT relayer l'OPTion comme valeur par défaut du langage L (voir plus bas) -m, --lang-map=TABLE utiliser la TABLE d'index pour identifier les noms de fichiers sources des langages -d, --default-lang=LANG utiliser le LANGage source par défaut -p, --prune=NOMS exclure les fichiers ou répertoires portant les NOMS --files0-from=F ne traiter que les fichiers dont les noms (terminés par zéro) sont lus dans F --help afficher l'aide-mémoire --version afficher le nom et la version du logiciel Les paramètres suivants s'appliquent aux analyseurs spécifiques de langage : �Afficher les noms de fichiers constituants qui concordent avec le PATRON en utilisant le style des métacaractères des shells. -f, --file=FICHIER nom du FICHIER de la base de données des identificateurs -S, --separator=STYLE utiliser le STYLE parmi les choix possibles: « braces », « space » ou « newline » --help afficher l'aide-mémoire --version afficher le nom et la version du logiciel �Interroger la base de données des identificateurs et afficher les résultats. Par défaut, la sortie se présente sur plusieurs lignes, chaque ligne contient l'identificateur concordant suivi de la liste des noms de fichiers où cette concordance se produit. -f, --file=FICHIER nom du FICHIER de la base de données des identificateurs -i, --ignore-case établir la concordance au PATRON en ignorant la casse des caractères -l, --literal établir la concordance au PATRON comme une chaîne littérale -r, --regexp établir la concordance au PATRON comme une expression régulière -w, --word établir la concordance au PATRON sur un mot complet -s, --substring établir la concordance au PATRON sur une sous-chaîne Note: si le PATRON contient des méta-caractères étendus d'une expression régulière, il est interprété comme une sous-chaîne d'expression régulière. Autrement, le PATRON est interprété comme un mot littéral. -k, --key=STYLE traiter la clé selon un STYLE parmi: « token », « pattern » or « none » -R, --result=STYLE traiter le résultat selon un STYLE parmi: « filenames », « grep », « edit » ou « none » -S, --separator=STYLE traiter la séparation selon un STYLE parmi: « braces », « space » ou « newline »; ne s'applique qu'aux noms de fichiers quand « --result=filenames » Note: les options de STYLE contrôlent la présentation des résultats d'interrogations. Les options par défaut sont : --key=token --result=filenames --separator=%s -F, --frequency=FREQ afficher les jetons qui apparaissent FREQ fois où FREQ s'exprime comme un intervalle « N..M ». Si N est omis, il vaut 1 par défaut; si M est omis, il prend la valeur MAX_USHRT -a, --ambiguous=LONG afficher les jetons dont les noms sont ambigus pour une chaîne de caractère ayant une certaine LONGueur -x, --hex afficher seulement les nombres exprimés en hexadécimal -d, --decimal afficher seulement les nombres exprimés en décimal -o, --octal afficher seulement les nombres exprimés en octal Par défaut, les nombres sont recherchés dans n'importe quelle base. --help afficher l'aide-mémoire --version afficher le nom et la version du logiciel �Expression régulière trop grande�Rehacher=%d, �Tri des jetons en cours... �Chaîne=%ld, �Succès�Langage texte: -i,--include=CLASSE Traiter les caractères de la CLASSE comme des constituants de jetons -x,--exclude=CHAR-CLASS Traiter les caractères de la CLASSE comme des délimiteurs de jetons �Jetons=%ld, �Antislash de fin�Utilisez « %s --help » pour obtenir plus d'informations. �Erreur système inconnue�( ou \( non appariée�) ou \) non appariée�[ ou [^ non apparié�\{ non apparié�Usage: %s [OPTION] FICHIER [FICHIER2] �Usage: %s [OPTION]... PATRON... �Usage: %s [OPTION]... [FICHIER]... �Usage: %s [OPTION]... [PATRON]... �Écriture de « %s » en cours... �« �« %s » est ambigu�« %s » n'est pas un identificateur de fichier ! (mauvaise valeur « magic »)�« %s » est de version %d, mais je ne peux traiter que la version %d�« %s » n'a pas été trouvé�parenthèses�ne peut allouer %ld octets pour la table de hachage: mémoire épuisée�ne peut allouer les paramètres « obstack » du langage: mémoire épuisée�ne peut allouer les paramètres du langage: mémoire épuisée�ne peut exécuter chdir() dans « %s »�ne peut exécuter chdir() vers « %s » depuis « %s »�ne peut créer « %s »�ne peut créer « %s » dans « %s »�ne peut déterminer la taille « io_size » d'une chaîne !�ne peut exécuter « %s »�ne peut démarrer un autre processus via fork()�ne peut obtenir la taille du fichier d'index « %s »�impossible de déterminer le répertoire de travail courant�ne peut trouver l'identificateur « ID »�ne peut exécuter lstat() « %s » depuis « %s »�ne peut établir la concordance avec l'expression régulière: mémoire épuisée�les options --include et --exclude ne peuvent pas être mélangées�ne peut modifier « %s »�ne peut ouvrir « %s »�ne peut ouvrir le fichier d'index du langage « %s »�ne peut lire le répertoire « %s » (« . » de « %s »)�ne peut lire entièrement le fichier d'index du langage « %s »�ne peut lire le fichier d'index du langage « %s »�ne peut exécuter stat() sur « %s »�ne peut exécuter stat() « %s » depuis « %s »�impossible d'ouvrir %s en lecture�répertoire�éditer? [y1-9^S/nq] �erreur à la fermeture de « %s »�paramètre %s superflu�échec lors du retour vers le répertoire de travail initial�fichier�des noms de fichiers ne peuvent pas être fournis en même temps que --files0-from�limitation interne: déplacement de 2^32 ou plus�le style de l'option « --key » est invalide: « %s »�le style de l'option « --result » est invalide: « %s »�Le style de « --separator » est invalide: « %s »�le nom de fichier avec une taille nulle est invalide�rebut: « %c »�rebut: « \%03o »�nom du langage attendu après « %s » dans le fichier « %s »�niveau %d: %ld/%ld = %.0f%% �mémoire épuisée�aucun nom de fichier fourni en paramètre�rien à faire�à noter: « %s » était %s, mais est devenu maintenant %s !�à noter: les paramètres d'analyse ont changés pour « %s »�à noter: l'utilisation de « -e » est désuet, utilisez « -r » à la place�blanc d'espacement�trop de noms de fichiers fournis en paramètre�impossible de stocker le répertoire de travail courant�type d'E/S inconnu: %d�langage inconnu: « %s »�la taille fournie à io_read() n'est pas supportée: %d�la taille fournie à io_writel() n'est pas supportée: %d�avertissement: « %s » et « %s » sont le même fichier, mais donne des résultats d'analyse différents !�lorsque les noms de fichiers sont lus depuis stdin, le nom de fichier %s n'est pas permis�erreur d'écriture���������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/Makefile.in.in����������������������������������������������������������0000664�0000000�0000000�00000037442�12166360012�014502� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu> # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.18 GETTEXT_MACRO_VERSION = 0.18 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/zh_CN.gmo���������������������������������������������������������������0000664�0000000�0000000�00000052143�12166360012�013530� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.��v��.�����60�����N0�����_0��'���y0��'���0��!���0��(���0�����1��"���41�� ���W1�� ���x1��!���1��!���1�����1�����1��;���1��e��!2��L��3�����7����7����8�����:�� ���%:�� ���1:�����>:�����Q:�����g:�����:�����:�����:�����:�����:����:�� ���<�� ��<�� ���)=�����6=�� ���N=�� ���[=�� ���h=��!���r=�� ���=��$���=�����=�����>����>��F��nA��2��B�����I��"���I�����!J�����8J�����HJ�����OJ�����J����� K��4���K�����PK�����cK�����vK�����K�� ���K��+���K��'���K��#���K��)���!L�����KL�����dL�����hL��.���zL��E���L�����L�� ���M��1��� M��'���=M��&���eM�����M��,���M�����M��&���M�� ���N�����4N�� ���IN��(���VN�����N�����N��'���N��)���N��1���N�����1O�����FO��%���[O��7���O��+���O��%���O����� P��&��� P�����GP�����WP�����^P�����uP�����P�����P�����P��*���P��+���P��$��� Q��'���EQ��*���mQ�����Q�����Q�����Q��;���Q�����!R�� ���>R�����KR�� ���aR��1���kR��"���R��6���R�����R�����R�����S�����6S�����OS��+���oS��,���S��H���S��G���T�� ���YT�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-07-02 13:24+0800 Last-Translator: Ji ZhengYu <zhengyuji@gmail.com> Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com> Language: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit � 发送错误报告至 � 新建 = %d/%d�%s: 无效选项 -- '%c' �%s: 选项‘%c%s’不允许带参数 �%s: 选项‘--%s’不允许带参数 �%s: 选项‘--%s’需要参数 �%s: 选项‘-W %s’不允许带参数 �%s: 选项‘-W %s’有歧义 �%s: 选项‘-W %s’需要参数 �%s: 选项 -- '%c' 需要参数 �%s: 读错误�%s: 选项‘%c%s’不可识别 �%s: 选项‘--%s’不可识别 �”�, 频率=%ld/%ld=%.2f �在前 %d 个字符中所有的识别字符都没有歧义 �汇编语言: -c,--comment=CHARS 从 CHARS 开始为一个注释,直到一行结束 -k,--keep=CHARS 允许在标识中使用 CHARS 并保存结果 -i,--ignore=CHARS 允许在标识中使用 CHARS 但不保存结果 -u,--strip-underscore 从标识中删除前面的下划线 -n,--no-cpp 不要处理 C 预处理指定 �建立一个标识符数据库。 -o, --output=OUTFILE ID 数据库输出时所用的文件名 -f, --file=OUTFILE 等同于 --output -i, --include=LANGS 在 LANGS 中包含语言(默认: “C C++ asm”) -x, --exclude=LANGS 在 LANGS 不包含语言 -l, --lang-option=L:OPT 传递 OPT 作为语言 L 的默认值(见下) -m, --lang-map=MAPFILE 使用 MAPFILE 将文件名与源语言关联起来 -d, --default-lang=LANG 设置 LANG 为默认源语言 -p, --prune=NAMES 不包含文件(或目录) -v, --verbose 报告每个文件的统计结果 -s, --statistics 运行结束时报告统计结果 --file0-from=F 仅标识来自 F 的 非终止符所分隔的文件 --help 显示此帮助并退出 --version 输出版本信息并退出 FILE 可以是个文件名,或者是目录名,它将用于递归搜索。 如果不指定 FILE,默认搜索当前目录。 注意‘--include’和‘--exclude’选项是互斥的。 以下参数用于指定语言的扫描: �字节=%ld Kb, �C 语言: -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果 -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果 -u,--strip-underscore 从单个标记的字符串中删除前面的下划线 �C++ 语言: -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果 -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果 -u,--strip-underscore 从单个标记的字符串中删除前面的下划线 �哈希值冲突=%ld/%ld=%.0f%%�注释=%ld �文件=%ld, �堆=%llu+%llu Kb, �无效的向后引用�无效的字符类名称�无效的排序比较方式�\{\} 中的内容无效�先前的正则表达式无效�无效的范围�无效的正则表达式�Java 语言: -k,--keep=CHARS 允许在单个标记的字符串中使用 CHARS,保留结果 -i,--ignore=CHARS 允许在单个标记的字符串中使用 CHARS,不保留结果 -u,--strip-underscore 从单个标记的字符串中删除前面的下划线 �Lisp 语言: �列出出现在 FILENAME 中的识别字符。如果还指定了 FILENAME2 那就列出两个文件中都出现的识别字符。 -f, --file=FILE ID 数据库的文件名 --help 显示此帮助并退出 --version 输出版本信息并退出 �文本=%ld, �载入=%ld/%ld=%.0f%%, �内存耗尽�名称=%ld, �无匹配�没有上一次的正则表达式�个数=%ld, �输出=%ld (%ld 标识, %ld 命中) �Perl 语言: -i,--include=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的一部分 -x,--exclude=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的分隔符 -d,--dtags 包含文档标记 �正则表达式过早结束�打印出源文件中找到的所有标识 -i, --include=LANGS 在 LANGS 中包含语言(默认: “C C++ asm”) -x, --exclude=LANGS 在 LANGS 中不包含语言 -l, --lang-option=L:OPT 传递 OPT 作为语言 L 的默认值(见下) -m, --lang-map=MAPFILE 使用 MAPFILE 将文件名与源语言关联起来 -d, --default-lang=LANG 设置 LANG 为默认的源语言 -p, --prune=NAMES 不包含指定的文件(或目录) --file0-from=F 仅标识来自 F 的 非终止符所分隔的文件 --help 显示此帮助并退出 --version 输出版本信息并退出 以下参数用于指定语言的扫描: �打印文件名中匹配 PATTERN 的文件名, 使用 shell 通配符。 -f, --file=FILE ID 数据库的文件名 -S, --separator=STYLE STYLE 可以是‘braces’,‘space’或是‘newline’中的一个 --help 显示此帮助并退出 --version 输出版本信息并退出 �查寻 ID 数据库并报告结果。 默认输出由多行组成,每行包含匹配的标识字符, 后面跟着标识符出现时的文件名。 -f, --file=FILE ID 数据库的文件名 -i, --ignore-case 匹配 PATTERN,大小写不敏感 -l, --literal 以纯文本字符串方式匹配 PATTERN -r, --regexp 以正则表达式方式匹配 PATTERN -w, --word 以分隔符方式匹配 PATTERN -s, --substring 以子串方式匹配 PATTERN 注意:如果 PATTERN 包含了扩展的正则表达式元字符 (meta-character),它将被认为是正则表达式的子串。 否则,PATTERN 就被解释为一个文本字符串。 -k, --key=STYLE STYLE 是 ‘token’,‘pattern’或是‘none’中的一个 -R, --result=STYLE STYLE 是‘filenames’,‘grep’,‘edit’或是‘none’中的一个 -S, --separator=STYLE STYLE 是‘braces’,‘space’或是‘newline’中的一个 当使用‘--result=filenames’时则仅对该文件有效 以上 STYLE 选项控制查寻结果如果输出。 默认是 --key=token --result=filenames --separator=%s -F, --frequency=FREQ 找出出现 FREQ 次的标识, FREQ 是个以‘N..M’表达的范围。如果省略 N, 则默认为 1。如果省略 M 则默认为 MAX_USHRT -a, --ambiguous=LEN 找出名称与 LEN 有歧义的标识字符 -x, --hex 仅查找十六进制表示的数 -d, --decimal 仅查找十进制表示的数 -o, --octal 仅查找八进制表示的数 默认查找将匹配任意底的数。 --help 显示此帮助并退出 --version 输出版本信息并退出 �正则表达式太长�重新生成哈希表(Rehash)=%d, �正在排序标识... �字符串=%ld, �成功�Text 语言: -i,--include=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的一部分 -x,--exclude=CHAR-CLASS 将 CHAR-CLASS 中的字符作为标识的分隔符 �标识符=%ld, �反斜杠太多�尝试使用‘%s --help’来获取更多信息。 �未知系统错误�( 或 \( 不匹配�) 或 \) 不匹配�[ 或 [^ 不匹配�\{ 不匹配�用法: %s [选项] 文件名 [文件名2] �用法: %s [选项]... 匹配模板... �用法: %s [选项]... [文件]... �用法: %s [选项]... [匹配模板]... �正在写入‘%s’... �“�‘%s’有歧义�‘%s’不是 ID 文件!(错误的 magic #)�‘%s’的版本号为 %d,但我仅想要版本号为 %d 的版本�‘%s’未找到�大括号�无法给哈希表分配 %ld 字节: 内存耗尽�无法分配语言参数的对象堆栈�无法分配语言参数: 内存耗尽�无法更改目录为‘%s’�无法将目录从‘%2$s’改为‘%1$s’�无法创建‘%s’�无法在‘%2$s’中创建‘%1$s’�无法确定字符串的 io_size�无法执行‘%s’�无法派生�无法获取 map 文件的大小‘%s’�无法获取工作目录�无法定位‘ID’�无法从‘%2$s’中 lstat ‘%1$s’�无法匹配正则表达式: 内存耗尽�无法混合使用 --include 和 --exclude 选项�无法修改‘%s’�无法打开‘%s’�无法打开语言 map 文件‘%s’�无法读取目录‘%s’(从‘%s’中读取‘.’)�无法读取整个语言 map 文件‘%s’�无法读取语言 map 文件‘%s’�无法 stat ‘%s’�无法从‘%2$s’中 stat ‘%1$s’�无法读取 %s�目录�编辑? [y1-9^S/nq] �关闭‘%s’时发生错误�额外操作 %s�无法返回起始工作目录�文件�文件操作无法与 --files0-from 合并�内部限制: 2^32 或更大的字节偏移�无效的‘--key’类型: ‘%s’�无效的‘--result’类型: ‘%s’�无效的‘--separator’方式: ‘%s’�无效的 0 字节文件名�内存碎片: ‘%c’�内存碎片: ‘\%03o’�要求语言名称,在文件‘%2$s’中带上‘%1$s’�级别 %d: %ld/%ld = %.0f%% �内存耗尽�没有文件名参数�无操作�注意: ‘%s’以前是 %s,但现在是 %s!�注意: 扫描参数改为‘%s’�注意: 不要再用‘-e’了,使用‘-r’代替�空格�文件名参数太多了�无法记录当前工作目录�未知的 I/O 类型: %d�不可识别的语言: ‘%s’�io_read()中有不支持的字节大小: %d�io_write()中有不支持的字节大小: %d�警告: ‘%s’和‘%s’是同一个文件,但扫描所得不同!�当从标准输入(stdin)读取文件名时,不允许 %s 的文件名�写错误������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/ro.po�������������������������������������������������������������������0000664�0000000�0000000�00000067076�12166360012�013016� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Mesajele n limba romn pentru pachetul id-utils. # Copyright (C) 2003 Free Software Foundation, Inc. # Eugen Hoanca <eugenh@urban-grafx.ro>, 2003. # msgid "" msgstr "" "Project-Id-Version: id-utils-3.2d\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2003-05-05 08:15+0300\n" "Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n" "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" "Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opiunea `%s' este ambigu\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: opiunea `--%s' nu permite parametri\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: opiunea `%c%s' nu permite parametri\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: opiunea `%s' necesit un parametru\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opiune necunoscut `--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opiune necunoscut `%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opiune invalid -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opiunea necesit un parametru -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: opiunea `%s' este ambigu\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: opiunea `--%s' nu permite parametri\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: opiunea `%s' necesit un parametru\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "nu pot schimba directorul de lucru" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "nu pot schimba directorul de lucru" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, fuzzy, c-format msgid "invalid `--separator' style: `%s'" msgstr "stil `--key' invalid: `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "nu pot determina io_size a irului!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "nu pot deschide `%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' nu este un fiier ID! (numr magic greit)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' este versiunea %d, dar eu accept numai versiunea %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "mrime nesuportat n io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "Tip I/O necunoscut: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "nu pot aloca %ld octei pentru hash table: memorie plin" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "ncrcare=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Rehash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Coliziuni=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "mrime nesuportat n io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "limbaj necunoscut: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "nu pot aloca obstack parametri (args) limbaj: memorie plin" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "nu pot aloca parametri(args) limbaj: memorie plin" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "nume limbaj ateptat ulterior `%s' n fiierul `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "nu pot deschide fiierul de mapare a limbajului `%s'" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "nu pot stabili mrimea fiierului de mapare `%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "nu pot citi fiierul de mapare al limbajului `%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "nu pot citi ntregul fiier de mapare al limbajului `%s'" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "limbaj C:\n" " -k,--keep=CARACTERE Permite CARACTERE in iruri single-token , " "pstreaz rezultatele\n" " -i,--ignore=CARACTERE Permite CARACTERE n iruri single-token, " "renun la rezultate\n" " -u,--strip-underscore Scoate underscore-ul din faa irurilor single-" "token\n" #: libidu/scanners.c:460 #, fuzzy, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "limbaj C:\n" " -k,--keep=CARACTERE Permite CARACTERE in iruri single-token , " "pstreaz rezultatele\n" " -i,--ignore=CARACTERE Permite CARACTERE n iruri single-token, " "renun la rezultate\n" " -u,--strip-underscore Scoate underscore-ul din faa irurilor single-" "token\n" #: libidu/scanners.c:471 #, fuzzy, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "limbaj C:\n" " -k,--keep=CARACTERE Permite CARACTERE in iruri single-token , " "pstreaz rezultatele\n" " -i,--ignore=CARACTERE Permite CARACTERE n iruri single-token, " "renun la rezultate\n" " -u,--strip-underscore Scoate underscore-ul din faa irurilor single-" "token\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "gunoi: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "gunoi: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Limbaj de asamblare:\n" " -c,--comment=CARACTERE Oricare din CARACTERE ncepe un comentariu pn " "la sfrit de linie\n" " -k,--keep=CARACTERE Accept CARACTERE n tokens, i pstreaz " "rezultatul\n" " -i,--ignore=CARACTERE Accept CARACTERE n tokens, i renun la " "rezultat\n" " -u,--strip-underscore Scoate underscore-ul din faa tokens\n" " -n,--no-cpp Nu interpreta directivele C pre-processor\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Limbaj text:\n" " -i,--include=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca " "i constitueni token\n" " -x,--exclude=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca " "i delimitatori token\n" #: libidu/scanners.c:1334 #, fuzzy, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Limbaj text:\n" " -i,--include=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca " "i constitueni token\n" " -x,--exclude=CLAS-CARACTERE Trateaz caracterele din CLAS-CARACTERE ca " "i delimitatori token\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "nu pot citi directorul `%s' (.`' din `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "not: `%s' a fost %s, nu %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "fiier" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "director" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "avertisment: `%s' i `%s' sunt acelai fiier, dar au produs scanri " "diferite!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "not: parametrul de scan schimbat n `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "nu pot schimba directorul de lucru" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "nu pot face chdir la `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "nu pot face chdir n `%s' din `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "nu pot face lstat `%s' din `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "nu pot face stat `%s' din `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "ncercai `%s --help' pentru mai multe informaii.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Folosire: %s [OPIUNE] NUME_FIIER [NUME_FIIER2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Listeaz identificatorii ce apar n NUME_FIIER,sau dac NUME_FIIER este\n" "dat de asemenea listeaz identificatorii care apar n ambele fiiere.\n" "\n" " -f, --file=FIIER numele de fiier al bazei de date ID\n" " --help afieaz acest ajutor i iese\n" " --version afieaz informaii despre versiune i iese\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "nici un parametru de nume fiier" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "prea muli parametri de nume fiiere" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "nu pot localiza `ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' este ambiguu" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "nu am gsit `%s'" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Folosire: %s [OPIUNE]... [TIPAR]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Tiprete numele fiiere constituente care se potrivesc TIPARului,\n" "utiliznd globale(wildcards) stil shell.\n" " -f, --file=FIIER nume fiier al bazei de date ID\n" " -S, --separator=STIL STIL e unul din `braces', `space' sau `newline'\n" " --help afieaz acest ajutor i iese\n" " --version afieaz informaii versiune i iese\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Folosire: %s [OPIUNE]... PATTERN...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Interogheaz baza de date ID i raporteaz rezultatele.\n" "Implicit, outputul const n linii multiple, fiecare linie coninnd\n" "identificatorul ce s-a potrivit urmat de lista de nume fiiere n care\n" "se regsete.\n" "\n" " -f, --file=FIIER nume fiier al bazei de date ID\n" "\n" " -i, --ignore-case corespunde TIPARului caz insenzitiv\n" " -l, --literal corespunde TIPARului ca ir literal\n" " -r, --regexp corespunde TIPARului ca expresie regulat\n" " -w, --word corespunde TIPARului ca i cuvnt delimitat\n" " -s, --substring corespunde TIPARului ca subir\n" " Not: Dac TIPAR conine expresie regulat extins meta-\n" " caractere, este interpretat ca expresie regular subir.\n" " n caz contrar, TIPAR este interpretat ca un cuvnt literal.\n" "\n" " -k, --key=STIL STIL e unul din `token', `pattern' sau `none'\n" " -R, --result=STIL STIL este unul din `filenames', `grep', `edit' sau " "`none'\n" " -S, --separator=STIL STIL e unul din `braces', `space' sau `newline' i\n" " se aplic fiierelor numai cnd `--" "result=nume_fiiere'\n" " Opiunile STIL de mai sus controleaz cte rezultate ale\n" " interogrii sunt prezentate.\n" " Implicite sunt: --key=token --result=nume_fiiere --separator=" "%s\n" "\n" " -F, --frequency=FREQ gsete tokens care se regsesc de FREQ ori, unde\n" " FREQ e un interval exprimat sub forma `N..M'.\n" " Dac N este omis, va fi implicit 1,\n" " dac M este omis, va fi implicit MAX_USHRT\n" " -a, --ambiguous=LEN gsete tokens ale cror nume sunt ambigue pentru\n" " LEN caractere\n" " -x, --hex gsete doar numerele exprimate ca hexazecimal\n" " -d, --decimal gsete doar numerele exprimate ca zecimal\n" " -o, --octal gsete doar numerele exprimate ca octal\n" " Implicit gsete numerele care se potrivesc de orice fel" "(radix).\n" "\n" " --help afieaz acest ajutor i iese\n" " --version afieaz informaii despre versiune i iese\n" #: src/lid.c:283 msgid "braces" msgstr "acolade" #: src/lid.c:283 msgid "space" msgstr "spaiu" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "not: folosirea lui `-e' este nvechit, folosii `-r' n loc" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Toi identificatorii nu sunt ambigui n primele %d caractere\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "stil `--key' invalid: `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "stil `--result' invalid: `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "nu pot gsi expresia regulat: memorie plin" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "editare? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "nu pot face fork" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "nu pot executa `%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Folosire: %s [OPIUNE]... [FIIER]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Construiete o baz de date de identificatori.\n" " -o, --output=FIIER_IEIRE nume fiier output al bazei de date ID\n" " -f, --file=FIIER_IEIRE sinonim cu --output\n" " -i, --include=LANGS include limbaje n LANGS (implicit: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude limbaje din LANGS\n" " -l, --lang-option=L:OPT returneaz OPT ca implicit L (vezi mai jos)\n" " -m, --lang-map=MAPFILE folosete MAPFILE ca nume fiiere mapare n limbaj " "surs\n" " -d, --default-lang=LANG consider LANG limbajul surs implicit\n" " -p, --prune=NUME exclude fiierele meionate i/sau directoarele\n" " -v, --verbose raporteaz statistici pe fiier\n" " -s, --statistics raporteaz statistici la sfritul rulrii\n" "\n" " --help afieaz acest ajutor i iese\n" " --version afieaz informaii despre versiune i iese\n" "\n" "FIIER poate fi un nume fiier, sau un director pentru cutare recursiv.\n" "Dac nu este dat nici un FIIER, directorul curent este cutat implicit.\n" "Notai c opiunile `--include' i `--exclude' sunt reciproc exclusive.\n" "\n" "Urmtorii parametri se aplic n cazul scannerelor specfice ale limbajelor:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "nu pot crea `%s' n `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "nu pot modifica `%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "nu pot stabili `%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nou(i) = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nume=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Numr=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "ir(uri)=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Literal(e)=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Comentariu(i)=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Fiiere=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Tokens=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Octei=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Mulime(heap)=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Output=%ld (%ld tok, %ld gsite)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Freq=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sortare tokens...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Scriere `%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "nu pot crea `%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "nivel %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Tiprete toate tokens gsite ntr-un fiier surs.\n" " -i, --include=LANGS include limbaje n LANGS (implicit: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude limbaje din LANGS\n" " -l, --lang-option=L:OPT paseaz OPT ca implicit pentru limbajul L (vezi \n" "mai jos)\n" " -m, --lang-map=MAPFILE folosete MAPFILE pentru nume fiiere mapare n\n" "limbaj surs\n" " -d, --default-lang=LANG consider LANG limbaj surs implicit\n" " -p, --prune=NUME exclude fiierele menionate i/sau directoarele\n" " --help afieaz acest ajutor i iese\n" " --version afieaz informaii versiune i iese\n" "\n" "Urmtorii parametri se aplic pentru scannerele specifice ale limbajelor:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opiune ilegal -- %c\n" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/pl.po�������������������������������������������������������������������0000664�0000000�0000000�00000073250�12166360012�013000� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Polish translation for idutils. # Copyright (C) 1997, 2007, 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the idutils package. # Wojciech Marek Gazka <wgalazka@chem.uw.edu.pl>, 1997. # Jakub Bogusz <qboosh@pld-linux.org>, 2007-2010. # msgid "" msgstr "" "Project-Id-Version: idutils 4.5\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2010-06-18 19:49+0200\n" "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8-bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "bd zapisu" #: lib/error.c:188 msgid "Unknown system error" msgstr "Nieznany bd systemowy" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opcja '%s' jest niejednoznaczna\n" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: opcja '--%s' nie moe mie argumentw\n" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: opcja '%c%s' nie moe mie argumentw\n" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: opcja '%s' musi mie argument\n" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: nieznana opcja '--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: nieznana opcja '%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: bdna opcja -- '%c'\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcja musi mie argument -- '%c'\n" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: opcja '-W %s' jest niejednoznaczna\n" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: opcja '-W %s' nie moe mie argumentw\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: opcja '-W %s' musi mie argument\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "pami wyczerpana" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "nnie udao si zapisa biecego katalogu roboczego" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "nie udao si wrci do pocztkowego katalogu roboczego" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "`" #: lib/quotearg.c:312 msgid "'" msgstr "'" #: lib/regcomp.c:131 msgid "Success" msgstr "Sukces" #: lib/regcomp.c:134 msgid "No match" msgstr "Nic nie pasuje" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "Bdne wyraenie regularne" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "Bdny znak sortowany" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "Bdna nazwa klasy znakw" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "Koczcy znak `\\'" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "Bdne odniesienie wstecz" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Niesparowane [ lub [^" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Niesparowane ( lub \\(" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "Niesparowane \\{" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Bdna zawarto \\{\\}" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "Bdny koniec zakresu" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "Pami wyczerpana" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Bdne poprzedzajce wyraenie regularne" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Przedwczesny koniec wyraenia regularnego" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "Wyraenie regularne zbyt due" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Niesparowane ) lub \\)" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "Brak poprzedniego wyraenia regularnego" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "bdny styl `--separator': `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "nie mona okreli io_size acucha!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "nie mona otworzy `%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' nie jest plikiem ID! (bdna liczba magiczna)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' jest w wersji %d, ten program obsuguje tylko %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "nieobsugiwany rozmiar w io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "nieznany typ we/wy: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "" "nie mona przydzieli %ld bajtw na tablic haszujc: pami wyczerpana" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Obcienie=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Ponownie mieszanie=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Kolizje=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "nieobsugiwany rozmiar w io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "nierozpoznany jzyk: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "nie mona przydzieli obstack dla argumentw jzyka: pami wyczerpana" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "nie mona przydzieli argumentw jzyka: pami wyczerpana" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "oczekiwano nazwy jzyka zakoczonej `%s' w pliku `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "nie mona otworzy pliku mapowa jzyka `%s'" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "nie mona uzyska rozmiaru pliku mapowa `%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "nie mona odczyta pliku mapowa `%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "nie mona odczyta caego pliku mapowa `%s'" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Jzyk C:\n" " -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " zachowanie wyniku\n" " -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " pominicie wyniku\n" " -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw\n" " jednoznacznikowych\n" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Jzyk C++:\n" " -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " zachowanie wyniku\n" " -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " pominicie wyniku\n" " -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw\n" " jednoznacznikowych\n" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Jzyk Java:\n" " -k,--keep=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " zachowanie wyniku\n" " -i,--ignore=ZNAKI Dopuszczenie ZNAKW w acuchach " "jednoznacznikowych,\n" " pominicie wyniku\n" " -u,--strip-underscore Usunicie wiodcego podkrelenia z acuchw\n" " jednoznacznikowych\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "mie: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "mie: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Jzyk asemblera:\n" " -c,--comment=ZNAKI Kady ze ZNAKW rozpoczyna komentarz do koca " "linii\n" " -k,--keep=ZNAKI Dopuszczenie ZNAKW w znacznikach, zachowanie " "wyniku\n" " -i,--ignore=ZNAKI Dopuszczenie ZNAKW w znacznikach, pominicie " "wyniku\n" " -u,--strip-underscore Usunicie wiodcego podkrelenia ze znacznikw\n" " -n,--no-cpp Nie obsugiwanie dyrektyw preprocesora C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Jzyk tekstowy:\n" " -i,--include=KLASA-ZNAKW Traktowanie znakw z KLASY jako skadnikw\n" " znacznikw\n" " -x,--exclude=KLASA-ZNAKW Traktowanie znakw z KLASY jako separatorw\n" " znacznikw\n" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Jzyk Perl:\n" " -i,--include=KLASA-ZNAKW Traktowanie znakw z KLASY jako skadnikw\n" " znacznikw\n" " -x,--exclude=KLASA-ZNAKW Traktowanie znakw z KLASY jako separatorw\n" " znacznikw\n" " -d,--dtags Doczenie znacznikw dokumentacji\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "Jzyk Lisp:\n" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "nie mona odczyta katalogu `%s' (`.' z `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "uwaga: `%s' byo %s, teraz jest %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "plikiem" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "katalogiem" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "uwaga: `%s' i `%s' to ten sam plik, ale uzyskany w rnych przebiegach!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "uwaga: parametry przeszukiwania zmienione dla `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "nie mona miesza opcji --include i --exclude" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "nie mona uzyska biecego katalogu" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "nie mona wykona chdir do `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "nie mona wykona chdir do `%s' z `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "nie mona wykona lstat `%s' z `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "nie mona wykona stat `%s' z `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "`%s --help' pozwoli uzyska wicej informacji.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Skadnia: %s [OPCJA] NAZWA_PLIKU [NAZWA_PLIKU_2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Wypisanie identyfikatorw wystpujcych w NAZWIE_PLIKU lub, jeli podano\n" "take NAZW_PLIKU_2, wystpujcych w obu nazwach.\n" "\n" " -f, --file=PLIK nazwa pliku bazy danych ID\n" " --help wywietlenie tego opisu i zakoczenie\n" " --version wywietlenie informacji o wersji i zakoczenie\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" "\n" "Prosz zgasza bdy na adres " #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "brak argumentw plikowych" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "zbyt duo argumentw plikowych" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "nie mona odnale `ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' jest niejednoznaczny" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "nie znaleziono `%s'" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Skadnia: %s [OPCJA]... [WZORZEC]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Wypisanie pasujcych do WZORCA skadowych nazw plikw\n" "przy uyciu masek w stylu powoki.\n" " -f, --file=PLIK nazwa pliku bazy danych ID\n" " -S, --separator=STYL STYL to jeden z `braces' (nawiasy), " "`space' (spacja),\n" " `newline' (nowa linia)\n" " --help wywietlenie tego opisu i zakoczenie\n" " --version wywietlenie informacji o wersji i zakoczenie\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Skadnia: %s [OPCJA]... WZORZEC...\n" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Odpytanie bazy danych ID i zgoszenie wynikw.\n" "Domylnie wyjcie skada si z wielu linii, z ktrych kada zawiera " "pasujcy\n" "identyfikator, po ktrym nastpuje lista nazw plikw, w ktrych wystpuje.\n" "\n" " -f, --file=PLIK nazwa pliku bazy danych ID\n" "\n" " -i, --ignore-case dopasowywanie WZORCA z pominiciem wielkoci liter\n" " -l, --literal dopasowywanie WZORCA jako dokadnego acucha\n" " -r, --regexp dopasowywanie WZORCA jako wyraenia regularnego\n" " -w, --word dopasowywanie WZORCA jako ograniczonego sowa\n" " -s, --substring dopasowywanie WZORCA jako podcigu\n" " Uwaga: jeli WZORZEC zawiera metaznaki rozszerzonych wyrae\n" " regularnych, jest interpretowany jako podcig wyraenia " "regularnego.\n" " W przeciwnym wypadku WZORZEC jest interpretowany jako dokadne " "sowo.\n" "\n" " -k, --key=STYL STYL to jeden z: `token', `pattern' (wzorzec) lub\n" " `none' (brak)\n" " -R, --result=STYL STYL to jeden z: `filenames' (nazwy plikw), " "`grep',\n" " `edit' lub `none' (brak)\n" " -S, --separator=STYL STYL to jeden z `braces' (nawiasy), " "`space' (spacja)\n" " lub `newline' (nowa linia) i dotyczy tylko nazw\n" " plikw kiedy `--result=filenames'\n" " Powysze opcje STYLU okrelaj sposb prezentacji wynikw " "zapyta.\n" " Domylne to --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=ILE szukanie znacznikw wystpujcych ILE razy, gdzie " "ILE\n" " to przedzia wyraony jako `N..M'. Jeli pominito " "N,\n" " zakadane jest 1; jeli pominito M, zakadane " "jest\n" " MAX_USHRT\n" " -a, --ambiguous=ILE szukanie znacznikw o nazwach niejednoznacznych na " "ILU\n" " znakach\n" " -x, --hex szukanie tylko liczb wyraonych szesnastkowo\n" " -d, --decimal szukanie tylko liczb wyraonych dziesitnie\n" " -o, --octal szukanie tylko liczb wyraonych semkowo\n" " Domylnie szukanie dopasowuje liczby o dowolnej podstawie.\n" "\n" " --help wywietlenie tego opisu i zakoczenie\n" " --version wywietlenie informacji o wersji i zakoczenie\n" #: src/lid.c:283 msgid "braces" msgstr "braces" #: src/lid.c:283 msgid "space" msgstr "space" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "uwaga: uycie `-e' jest przestarzae, prosz uywa `-r'" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "" "Wszystkie identyfikatory s niejednoznaczne w zakresie pierwszych %d znakw\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "bdny styl `--key': `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "bdny styl `--result': `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "nie mona dopasowa wyraenia regularnego: pami wyczerpana" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "modyfikowa? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "nie mona wykona fork" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "nie mona wykona exec `%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Skadnia: %s [OPCJA]... [PLIK]...\n" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Budowanie bazy danych identyfikatorw.\n" " -o, --output=WYJCIE nazwa pliku wyjciowego bazy danych ID\n" " -f, --file=WYJCIE synonim --output\n" " -i, --include=JZYKI doczenie jzykw do JZYKW (domylnie:\n" " \"C C++ asm\")\n" " -x, --exclude=JZYKI wykluczenie jzykw z JZYKW\n" " -l, --lang-option=J:OPC przekazanie OPCji jako domylnej dla jzyka J\n" " (p. niej)\n" " -m, --lang-map=MAPA uycie pliku MAPY do mapowania nazwplikw na " "jzyki\n" " rdowe\n" " -d, --default-lang=JZYK uycie JZYKA jako domylnego jzyka rdowego\n" " -p, --prune=NAZWY wykluczenie plikw i/lub katalogw o tych nazwach\n" " -v, --verbose informowanie o statystykach dla kadego pliku\n" " -s, --statistics informowanie o statystykach na kocu dziaania\n" "\n" " --files0-from=P tokenizowanie tylko plikw okrelonych przez\n" " nazwy zakoczone znakiem NUL z pliku P\n" "\n" " --help wywietlenie tego opisu i zakoczenie\n" " --version wywietlenie informacji o wersji i zakoczenie\n" "\n" "PLIK moe by nazw pliku lub nazw katalogu do rekurencyjnego " "przeszukania.\n" "Jeli nie podano PLIKU, domylnie przeszukiwany jest katalog biecy.\n" "Uwaga: opcje `--include' i `--exclude' wzajemnie si wykluczaj.\n" "\n" "Nastpujce argumenty odnosz si do skanerw dla poszczeglnych jzykw:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "nadmiarowy argument %s" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "argumenty dotyczce plikw nie mog by czone z --files0-from" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "nie mona otworzy %s do odczytu" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "%s: bd odczytu" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" "przy odczycie nazw plikw ze standardowego wejcia, nazwa pliku %s jest " "niedozwolona" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "bdna nazwa pliku zerowej dugoci" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "nie ma nic do zrobienia" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "nie mona utworzy `%s' w `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "nie mona zmodyfikowa `%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "nie mona wykona stat na `%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nowy = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nazwa=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Numer=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "acuch=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Litera=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Komentarz=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Pliki=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Znaczniki=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bajty=%ld Kb, " #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Sterta=%llu+%llu Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Wynik=%ld (%ld tok, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Czsto=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Sortowanie znacznikw...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Zapisuj `%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "nie mona utworzy `%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "ograniczenie wewntrzne: offset 2^32 lub wikszy" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "bd podczas zamykania `%s'" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "poziom %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Wypisanie wszystkich znacznikw znalezionych w pliku rdowym.\n" " -i, --include=JZYKI doczenie jzykw do JZYKW (domylnie:\n" " \"C C++ asm\")\n" " -x, --exclude=JZYKI wykluczenie jzykw z JZYKW\n" " -l, --lang-option=J:OPC przekazanie OPCji jako domylnej dla jzyka J\n" " (p. poniej)\n" " -m, --lang-map=MAPA uycie pliku MAPY do mapowania nazw plikw na " "jzyki\n" " rdowe\n" " -d, --default-lang=JZYK uycie JZYKA jako domylnego jzyka rdowego\n" " -p, --prune=NAZWY wykluczenie plikw i/lub katalogw o tych nazwach\n" "\n" " --files0-from=P tokenizowanie tylko plikw okrelonych przez\n" " nazwy zakoczone znakiem NUL z pliku P\n" "\n" " --help wywietlenie tego opisu i zakoczenie\n" " --version wywietlenie informacji o wersji i zakoczenie\n" "\n" "Nastpujce argumenty odnosz si do skanerw dla poszczeglnych jzykw:\n" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/nl.gmo������������������������������������������������������������������0000664�0000000�0000000�00000053570�12166360012�013145� 0����������������������������������������������������������������������������������������������������ustar ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4�����L������ ����� �� ���* �����8 ��,���T ��,��� ��'��� ��-��� �� ��� ��(���% ��(���N �����w ����� ����� ����� ����� ��A��� ��e�� ��������������-�����$������� ���7�� ���D�����P�����d�����{������������$���������������������������(�� ���1�����?�����U�� ���f�����q�����z�� ���������������#���������9����?�������5%�� ���P%�����\%�� ���o%�����|%�����%�� ���2&�����?&��&���R&�����y&�����&�����&�����&�� ���&��(���&��!���&�� ���'��#���='�����a'�����r'�����t'��%���'��.���'�����'�����'��9���'��6���+(��.���b(�����(�����(�����(�����(��(���(�����)�� ���()�����3)�����S)�����o)�����)��0���)��)���)�����)����� *��!���*��)���;*��(���e*��!���*�����*�����*�����*�� ���*�����*�����+�����%+��-���6+�����d+��3���i+��-���+�����+�����+��!���,�����(,�� ���F,�� ���Q,��2���_,�����,�����,�����,�� ���,��'���,��(��� -��3���5-�����i-�����o-��*���-�����-�����-��"���-��#��� .��D���/.��>���t.�� ���.����.�� ���o0�����0�����0��)���0��)���0��&���1��*���81��$���c1��'���1��'���1�����1�����1�����2�����#2�����'2��C���B2��y��2�����4�����8������9�����9�����:�����:����� ;�����;�����1;�����K;�����e;�����;��*���;�����;�����;�����;�����<��A��<�����6>�����G>�� ���b>�� ���>�����>�� ���>�� ���>��'���>�����>��(���?����?��z�� C��}��D�����L�� ���%L�����2L�����JL�����[L�����bL�� ���L����� M��&���"M�����IM�����_M�����rM�����M�� ���M��2���M��#���M��&���M��%���$N�����JN�����aN�����eN��/���|N��0���N�����N�� ���N��B���N��B���@O��D���O�����O��'���O����� P�����#P��5���BP�����xP�����P��2���P�����P�����P��0���Q��<���DQ��2���Q�����Q�����Q��%���Q��&���R��1���/R��$���aR��$���R��0���R�����R�����R�����R�����S�����0S��-���HS�����vS��6���~S��1���S��"���S��%��� T��(���0T��#���YT�� ���}T�����T��.���T�����T�� ���T��%���U�����-U��.���DU��.���sU��B���U�����U��"���U��&���V�����6V�����LV��*���aV��+���V��\���V��V���W�� ���lW�����O���s���7���C���F��� �����������I���\���������������h�������w���5���*�������R�������������z�������x���1�����������������g���r���f���c�������0����������Q���)�������K����������l�������V���Y���#���G�������N�������;���!���W�������t������o������<���X�������-���A������M�����������`���,��������� �������a���{���D���������|������� ���v���b��� ���&���~�������P���?������(���E���3���$���n�������������'���9���[���q������J�������m����������������p������T���]�����������S���d���L���/���k������� �������������"���:�������y������%����������4���@���������������^�������.���=������i���6�����������e���Z���>�����������U���H���B���j�������8����������}��� ������_��������������+����������u���2�������� Report bugs to � new = %d/%d�%s: invalid option -- '%c' �%s: option '%c%s' doesn't allow an argument �%s: option '--%s' doesn't allow an argument �%s: option '--%s' requires an argument �%s: option '-W %s' doesn't allow an argument �%s: option '-W %s' is ambiguous �%s: option '-W %s' requires an argument �%s: option requires an argument -- '%c' �%s: read error�%s: unrecognized option '%c%s' �%s: unrecognized option '--%s' �'�, Freq=%ld/%ld=%.2f �All identifiers are non-ambiguous within the first %d characters �Assembly language: -c,--comment=CHARS Any of CHARS starts a comment until end-of-line -k,--keep=CHARS Allow CHARS in tokens, and keep the result -i,--ignore=CHARS Allow CHARS in tokens, and toss the result -u,--strip-underscore Strip a leading underscore from tokens -n,--no-cpp Don't handle C pre-processor directives �Build an identifier database. -o, --output=OUTFILE file name of ID database output -f, --file=OUTFILE synonym for --output -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories -v, --verbose report per file statistics -s, --statistics report statistics at end of run --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `--include' and `--exclude' options are mutually-exclusive. The following arguments apply to the language-specific scanners: �Bytes=%ld Kb, �C language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �C++ language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Collisions=%ld/%ld=%.0f%%�Comment=%ld �Files=%ld, �Heap=%llu+%llu Kb, �Invalid back reference�Invalid character class name�Invalid collation character�Invalid content of \{\}�Invalid preceding regular expression�Invalid range end�Invalid regular expression�Java language: -k,--keep=CHARS Allow CHARS in single-token strings, keep the result -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result -u,--strip-underscore Strip a leading underscore from single-token strings �Lisp language: �List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. -f, --file=FILE file name of ID database --help display this help and exit --version output version information and exit �Literal=%ld, �Load=%ld/%ld=%.0f%%, �Memory exhausted�Name=%ld, �No match�No previous regular expression�Number=%ld, �Output=%ld (%ld tok, %ld hit) �Perl language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters -d,--dtags Include documentation tags �Premature end of regular expression�Print all tokens found in a source file. -i, --include=LANGS include languages in LANGS (default: "C C++ asm") -x, --exclude=LANGS exclude languages in LANGS -l, --lang-option=L:OPT pass OPT as a default for language L (see below) -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language -d, --default-lang=LANG make LANG the default source language -p, --prune=NAMES exclude the named files and/or directories --files0-from=F tokenize only the files specified by NUL-terminated names in file F --help display this help and exit --version output version information and exit The following arguments apply to the language-specific scanners: �Print constituent file names that match PATTERN, using shell-style wildcards. -f, --file=FILE file name of ID database -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' --help display this help and exit --version output version information and exit �Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. -f, --file=FILE file name of ID database -i, --ignore-case match PATTERN case insensitively -l, --literal match PATTERN as a literal string -r, --regexp match PATTERN as a regular expression -w, --word match PATTERN as a delimited word -s, --substring match PATTERN as a substring Note: If PATTERN contains extended regular expression meta- characters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. -k, --key=STYLE STYLE is one of `token', `pattern' or `none' -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none' -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and only applies to file names when `--result=filenames' The above STYLE options control how query results are presented. Defaults are --key=token --result=filenames --separator=%s -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars -x, --hex only find numbers expressed as hexadecimal -d, --decimal only find numbers expressed as decimal -o, --octal only find numbers expressed as octal By default, searches match numbers of any radix. --help display this help and exit --version output version information and exit �Regular expression too big�Rehash=%d, �Sorting tokens... �String=%ld, �Success�Text language: -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters �Tokens=%ld, �Trailing backslash�Try `%s --help' for more information. �Unknown system error�Unmatched ( or \(�Unmatched ) or \)�Unmatched [ or [^�Unmatched \{�Usage: %s [OPTION] FILENAME [FILENAME2] �Usage: %s [OPTION]... PATTERN... �Usage: %s [OPTION]... [FILE]... �Usage: %s [OPTION]... [PATTERN]... �Writing `%s'... �`�`%s' is ambiguous�`%s' is not an ID file! (bad magic #)�`%s' is version %d, but I only grok version %d�`%s' not found�braces�can't allocate %ld bytes for hash table: memory exhausted�can't allocate language args obstack: memory exhausted�can't allocate language args: memory exhausted�can't chdir to `%s'�can't chdir to `%s' from `%s'�can't create `%s'�can't create `%s' in `%s'�can't determine the io_size of a string!�can't exec `%s'�can't fork�can't get size of map file `%s'�can't get working directory�can't locate `ID'�can't lstat `%s' from `%s'�can't match regular-expression: memory exhausted�can't mix --include and --exclude options�can't modify `%s'�can't open `%s'�can't open language map file `%s'�can't read directory `%s' (`.' from `%s')�can't read entire language map file `%s'�can't read language map file `%s'�can't stat `%s'�can't stat `%s' from `%s'�cannot open %s for reading�directory�edit? [y1-9^S/nq] �error closing `%s'�extra operand %s�failed to return to initial working directory�file�file operands cannot be combined with --files0-from�internal limitation: offset of 2^32 or larger�invalid `--key' style: `%s'�invalid `--result' style: `%s'�invalid `--separator' style: `%s'�invalid zero-length file name�junk: `%c'�junk: `\%03o'�language name expected following `%s' in file `%s'�level %d: %ld/%ld = %.0f%% �memory exhausted�no file name arguments�nothing to do�notice: `%s' was a %s, but is now a %s!�notice: scan parameters changed for `%s'�notice: use of `-e' is deprecated, use `-r' instead�space�too many file name arguments�unable to record current working directory�unknown I/O type: %d�unrecognized language: `%s'�unsupported size in io_read (): %d�unsupported size in io_write (): %d�warning: `%s' and `%s' are the same file, but yield different scans!�when reading file names from stdin, no file name of %s allowed�write error�Project-Id-Version: idutils 4.5 Report-Msgid-Bugs-To: bug-idutils@gnu.org POT-Creation-Date: 2012-02-03 11:55+0100 PO-Revision-Date: 2010-06-19 11:37+0200 Last-Translator: Benno Schulenberg <benno@vertaalt.nl> Language-Team: Dutch <vertaling@vrijschrift.org> Language: nl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Lokalize 1.0 Plural-Forms: nplurals=2; plural=(n != 1); � Rapporteer programmafouten aan � nieuw = %d/%d�%s: ongeldige optie -- '%c' �%s: optie '%c%s' staat geen argument toe �%s: optie '--%s' staat geen argument toe �%s: optie '--%s' vereist een argument �%s: optie '-W %s' staat geen argument toe �%s: optie '-W %s' is niet eenduidig �%s: optie '-W %s' vereist een argument �%s: optie vereist een argument -- '%c' �%s: fout bij lezen�%s: onbekende optie '%c%s' �%s: onbekende optie '--%s' �’�, Frequentie=%ld/%ld=%.2f �Alle variabelenamen van zijn eenduidig binnen de eerste %d tekens. �Assembeertaal: -c,--comment=TEKENS elk van deze tekens begint een commentaarregel -k,--keep=TEKENS toegestane tekens in namen, resultaat houden -i,--ignore=TEKENS toegestane tekens in namen, resultaat wegdoen -u,--strip-underscore liggende streepjes aan begin van namen verwijderen -n,--no-cpp opdrachten voor C-pre-processor niet behandelen �Een gegevensbank met namen aanmaken. -d, --default-lang=TAAL deze taal de standaardtaal maken -f, --file=BESTAND gegevensbank opslaan in dit bestand -i, --include=TALEN deze talen begrijpen (standaard is "C C++ asm") -x, --exclude=TALEN deze talen niet begrijpen -l, --lang-option=TAAL:OPTIE voor deze taal standaard deze optie gebruiken -m, --lang-map=KAART talenkaartbestand dat bestandsnamen aan talen koppelt -o, --output=BESTAND gegevensbank opslaan in dit bestand -p, --prune=NAMEN deze bestanden en/of mappen overslaan -s, --statistics statistieken rapporteren aan het eind over het geheel -v, --verbose statistieken per bestand rapporteren --files0-from=BSTND alleen de bestanden doornemen die genoemd staan in BESTND (met NUL-tekens als scheiding) --help deze hulptekst tonen en stoppen --version versie-informatie tonen en stoppen BESTAND kan een bestandsnaam zijn, of een map om recursief te doorzoeken. Als geen BESTAND opgegeven is, wordt standaard de huidige map doorzocht. De opties '--include' en '--exclude' kunnen niet samen gebruikt worden. De volgende opties gelden voor taalspecifieke scanners: �Bytes=%ld kB, �C: -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat houden -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat wegdoen -u,--strip-underscore liggende streepjes voor naamtekenreeksen verwijderen �C++: -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat houden -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat wegdoen -u,--strip-underscore liggende streepjes voor naamtekenreeksen verwijderen �Botsingen=%ld/%ld=%.0f%%�Commentaar=%ld �Bestanden=%ld, �Heap=%llu+%llu kB, �Ongeldige terugverwijzing�Ongeldige tekenklassenaam�Ongeldig samengesteld teken�Ongeldige inhoud van \{\}�Ongeldige voorafgaande reguliere expressie�Ongeldig bereikeinde�Ongeldige reguliere expressie�Java: -k,--keep=TEKENS toegestane tekens in naamtekenreeks, resultaat houden -i,--ignore=TEKENS toegestane tekens in naamtekenreeks, resultaat wegdoen -u,--strip-underscore liggende streepjes voor naamtekenreeksen verwijderen �Lisp: �Een lijst tonen van de namen die in BESTANDSNAAM voorkomen; als een tweede bestand gegeven is, dan alleen die namen tonen die in beide bestanden voorkomen. -f, --file=BESTAND deze ID-gegevensbank gebruiken --help deze hulptekst tonen en stoppen --version versie-informatie tonen en stoppen �Letterlijk=%ld, �Belasting=%ld/%ld=%.0f%%, �Onvoldoende geheugen beschikbaar�Naam=%ld, �Geen overeenkomsten�Geen eerdere reguliere expressie�Nummer=%ld, �Uitvoer=%ld (%ld tokens, %ld gevonden) �Perl: -i,--include=TEKENKLASSE tekens van deze klasse zijn naambouwstenen -x,--exclude=TEKENKLASSE tekens van deze klasse zijn naamscheiders -d,--dtags documentatie-tags meenemen �Voortijdig einde van reguliere expressie�Alle namen tonen die in een programmatekstbestand voorkomen. -d, --default-lang=TAAL deze taal de standaardtaal maken -i, --include=TALEN deze talen begrijpen (standaard is "C C++ asm") -x, --exclude=TALEN deze talen niet begrijpen -l, --lang-option=TAAL:OPTIE voor deze taal standaard deze optie gebruiken -m, --lang-map=KAART talenkaartbestand dat bestandsnamen aan talen koppelt -p, --prune=NAMEN deze bestanden en/of mappen overslaan --files0-from=BSTND alleen de bestanden doornemen die genoemd staan in BESTND (met NUL-tekens als scheiding) --help deze hulptekst tonen en stoppen --version versie-informatie tonen en stoppen De volgende opties gelden voor taalspecifieke scanners: �Die bestandsnamen in de gegevensbank tonen die overeenkomen met PATROON. (PATROON gebruikt jokertekens zoals die van de shell.) -f, --file=BESTAND deze ID-gegevensbank gebruiken -S, --separator=STIJL bestandsnamenstijl: 'braces', 'space' of 'newline' --help deze hulptekst tonen en stoppen --version versie-informatie tonen en stoppen �Een ID-gegevensbank doorzoeken naar PATROON en de resultaten rapporteren. Bij normale uitvoer begint elke regel met een gevonden naam, gevolgd door een lijst van bestandsnamen waar deze naam in voorkomt. -f, --file=BESTAND deze ID-gegevensbank gebruiken -i, --ignore-case verschillen in hoofd- en kleine letters negeren -l, --literal PATROON is een letterlijke tekenreeks -r, --regexp PATROON is een reguliere expressie -w, --word PATROON komt alleen overeen met een heel woord -s, --substring PATROON komt ook overeen met een deel van een woord Als het PATROON metatekens van uitgebreide reguliere expressies bevat, dan wordt het begrepen als een reguliere expressie. Als het niet zulke tekens bevat, dan wordt het begrepen als een letterlijke tekenreeks. -k, --key=STIJL sleutelstijl: 'token', 'pattern' of 'none' -R, --result=STIJL rapportagestijl: 'filenames', 'grep', 'edit' of 'none' -S, --separator=STIJL bestandsnamenstijl: 'braces', 'space' of 'newline' Bovenstaande stijlopties bepalen hoe de zoekresultaten gepresenteerd worden. De standaardwaarden zijn: --key=token --result=filenames --separator=%s -F, --frequency=FREQ de namen rapporteren die met deze frequentie voorkomen; de frequentie is een bereik op te geven als 'N..M'; als N ontbreekt is het 1, als M ontbreekt is het MAX_USHRT -a, --ambiguous=LENG de namen rapporteren die niet eenduidig zijn bij dit aantal tekens -x, --hex alleen hexadecimale getallen rapporteren -d, --decimal alleen decimale getallen rapporteren -o, --octal alleen octale getallen rapporteren Standaard worden getallen van alle grondtallen gerapporteerd. --help deze hulptekst tonen en stoppen --version versie-informatie tonen en stoppen �Reguliere expressie is te groot�Herhash=%d, �Sorteren van tokens... �Tekenreeks=%ld, �Gelukt�Gewone tekst: -i,--include=TEKENKLASSE tekens van deze klasse zijn naambouwstenen -x,--exclude=TEKENKLASSE tekens van deze klasse zijn naamscheiders �Tokens=%ld, �Backslash aan het eind�Typ '%s --help' voor meer informatie. �Onbekende systeemfout�Ongepaarde ( of \(�Ongepaarde ) of \)�Ongepaarde [ of [^�Ongepaarde \{�Gebruik: %s [OPTIE] BESTANDSNAAM [BESTANDSNAAM2] �Gebruik: %s [OPTIE]... PATROON... �Gebruik: %s [OPTIE]... [BESTAND]... �Gebruik: %s [OPTIE]... [PATROON]... �Schrijven van '%s'... �‘�'%s' is niet eenduidig�'%s' is geen ID-bestand: onjuist magisch nummer�'%s' is versie %d, maar ik lust alleen versie %d�'%s' is niet gevonden�accolades�kan %ld bytes voor hashtabel niet reserveren: onvoldoende geheugen�kan geen ruimte voor objectstapel reserveren: onvoldoende geheugen�kan geen ruimte voor taalargumenten reserveren: onvoldoende geheugen�kan niet naar map '%s' gaan�kan niet naar map '%s' gaan vanuit '%s'�kan '%s' niet aanmaken�kan '%s' niet aanmaken in '%s'�kan van een tekenreeks de 'io_size' niet vaststellen!�kan '%s' niet uitvoeren�kan geen nieuw proces starten�kan grootte van taalkaartbestand '%s' niet bepalen�kan huidige map niet bepalen�kan 'ID' niet vinden�kan de status van '%s' niet opvragen vanuit '%s'�kan reguliere expressie niet verwerken: onvoldoende geheugen�'--include'- en '--exclude'-opties gaan niet samen�kan '%s' niet veranderen�kan '%s' niet openen�kan taalkaartbestand '%s' niet openen�kan map '%s' niet lezen ('.' van '%s')�kan het taalkaartbestand '%s' niet volledig lezen�kan taalkaartbestand '%s' niet lezen�kan de status van '%s' niet opvragen�kan de status van '%s' niet opvragen vanuit '%s'�kan %s niet openen om te lezen�map�bewerken? [j1-9^S/nq] �fout bij sluiten van '%s'�overtollig argument: %s�kan niet terugkeren naar de initiële werkmap�bestand�bestandsargumenten gaan niet samen met '--files0-from'�innerlijke begrenzing: positie van 2^32 of groter�ongeldige stijl voor '--key': '%s'�ongeldige stijl voor '--result': '%s'�ongeldige stijl voor '--separator': '%s'�ongeldige bestandsnaam (lengte nul)�rommel: '%c'�rommel: '\%03o'�taalnaam werd verwacht na '%s' in bestand '%s'�niveau %d: %ld/%ld = %.0f%% �onvoldoende geheugen beschikbaar�ontbrekende bestandsnaam als argument�er is niets om te doen�opmerking: '%s' was een %s, maar is nu een %s!�opmerking: parameters voor '%s' zijn veranderd�opmerking: optie '-e' is verouderd; gebruik '-r' in plaats daarvan�spatie�te veel bestandsnamen als argument�kan de huidige werkmap niet vastleggen�onbekend I/O-type: %d�onbekende taal: '%s'�niet-ondersteunde grootte in io_read(): %d�niet-ondersteunde grootte in io_write(): %d�waarschuwing: '%s' en '%s' zijn hetzelfde bestand, maar leveren verschillende resultaten op!�bij het lezen van bestandsnamen van standaardinvoer is bestandsnaam %s niet toegestaan�schrijffout�����������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/pt_BR.po����������������������������������������������������������������0000664�0000000�0000000�00000070437�12166360012�013377� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# id-utils: translation to Brazilian Portuguese (pt_BR) # Copyright (C) 2002 Free Software Foundation, Inc. # Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002. # msgid "" msgstr "" "Project-Id-Version: id-utils 3.2d\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2002-10-24 23:41-0300\n" "Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n" "Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opo `%s' ambgua\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: opo `--%s' no permite argumentos\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: option `%c%s' no permite argumentos\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: opo `%s' exige um argumento\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opo desconhecida `--%s'\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opo desconhecida `%c%s'\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opo invlida -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opo exige um argumento -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: opo `%s' ambgua\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: opo `--%s' no permite argumentos\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: opo `%s' exige um argumento\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "impossvel descobrir o diretrio de trabalho" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "impossvel descobrir o diretrio de trabalho" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, fuzzy, c-format msgid "invalid `--separator' style: `%s'" msgstr "estilo invlido para `--key': `%s'" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "impossvel determinar o tamanho_es de uma string!" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "impossvel abrir `%s'" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "`%s' no um arquivo ID! (n mgico errado)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "`%s' tem verso %d, mas s possvel fazer grok da verso %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "tamanho no suportado de io_read(): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "tipo desconhecido de E/S: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "impossvel alocar %ld bytes para a tabela hash: memria esgotada" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Load=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Rehash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Colises=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "tamanho no suportado de io_write(): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "linguagem no reconhecida: `%s'" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "impossvel alocar argumentos de linguagem na pilha: memria esgotada" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "impossvel alocar argumentos de linguagem: memria esgotada" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "linguagem no esperada aps `%s' no arquivo `%s'" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "impossvel abrir arquivo de mapa de linguagem `%s'" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "impossvel descobrir o tamanho do arquivo de mapa `%s'" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "impossvel ler do arquivo de mapa de linguagem `%s'" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "impossvel ler todo o arquivo de mapa de linguagem `%s'" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguagem C:\n" " -k,--keep=CHARS Permite CHARS em strings de token nica,\n" " mantm o resultado\n" " -i,--ignore=CHARS Permite CHARS em strings de token nica,\n" " descarta o resultado\n" " -u,--strip-underscore Remove o sublinhado inicial de strings de\n" " token nica\n" #: libidu/scanners.c:460 #, fuzzy, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguagem C:\n" " -k,--keep=CHARS Permite CHARS em strings de token nica,\n" " mantm o resultado\n" " -i,--ignore=CHARS Permite CHARS em strings de token nica,\n" " descarta o resultado\n" " -u,--strip-underscore Remove o sublinhado inicial de strings de\n" " token nica\n" #: libidu/scanners.c:471 #, fuzzy, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguagem C:\n" " -k,--keep=CHARS Permite CHARS em strings de token nica,\n" " mantm o resultado\n" " -i,--ignore=CHARS Permite CHARS em strings de token nica,\n" " descarta o resultado\n" " -u,--strip-underscore Remove o sublinhado inicial de strings de\n" " token nica\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "refugo: `%c'" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "refugo: `\\%03o'" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Linguagem Assembly:\n" " -c,--comment=CHARS Qualquer um dos CHARS inicia um comentrio at\n" " o final da linha\n" " -k,--keep=CHARS Permite CHARS em palavras-chave, mantm o " "resultado\n" " -i,--ignore=CHARS Permite CHARS em palavras-chave, descarta o " "resultado\n" " -u,--strip-underscore Remove o sublinhado inicial de palavras-chave\n" " -n,--no-cpp No processa diretivas de pre-processador C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Linguagem Texto:\n" " -i,--include=CHAR-CLASS Trata os caracteres de CHAR-CLASS como parte\n" " de token\n" " -x,--exclude=CHAR-CLASS Trata os caracteres de CHAR-CLASS como " "delimitador\n" " de token\n" #: libidu/scanners.c:1334 #, fuzzy, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Linguagem Texto:\n" " -i,--include=CHAR-CLASS Trata os caracteres de CHAR-CLASS como parte\n" " de token\n" " -x,--exclude=CHAR-CLASS Trata os caracteres de CHAR-CLASS como " "delimitador\n" " de token\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "impossvel ler o diretrio `%s' (`.' de `%s')" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "nota: `%s' era um %s, mas agora um %s!" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "arquivo" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "diretrio" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "aviso: `%s' e `%s' so o mesmo arquivo, mas resultam em leituras diferentes!" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "nota: parmetros de leitura alterados para `%s'" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "impossvel descobrir o diretrio de trabalho" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "impossvel executar chdir para `%s'" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "impossvel executar chdir para `%s' de `%s'" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "impossvel executar lstat `%s' de `%s'" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "impossvel executar stat `%s' de `%s'" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Tente `%s --help' para mais informaes.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Uso: %s [OPO] NOMEARQ [NOMEARQ2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Lista identificadores que ocorrem em NOMEARQ, ou se NOMEARQ2 tambm\n" "for fornecido, lista os identificadores que ocorrem em ambos os arquivos.\n" "\n" " -f, --file=ARQ nome do arquivo do banco de dados de ID\n" " --help exibe esta ajuda e sai\n" " --version mostra informaes de verso e sai\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "sem argumentos de nome de arquivo" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "muitos argumentos de nome de arquivo" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "impossvel localizar `ID'" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "`%s' ambguo" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "`%s' no encontrado" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Uso: %s [OPO]... [PADRO]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Imprime os nomes de arquivos que correspondem ao PADRO,\n" "usando coringas estilo shell.\n" " -f, --file=ARQ nome de arquivo do banco de dados de IDs\n" " -S, --separator=ESTILO ESTILO pode ser `braces' (chaves), " "`space' (espao)\n" " ou `newline' (nova linha)\n" " --help exibe esta ajuda e sai\n" " --version mostra informaes de verso e sai\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Uso: %s [OPO]... PADRO...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Consulta o banco de dados de IDs e reporta os resultados.\n" "Por padro, a sada consiste em linhas mltiplas, cada linha contendo o\n" "identificador encontrado seguido pela lista de nomes de arquivos em que\n" "elas ocorrem.\n" "\n" " -f, --file=ARQ nome de arquivo do banco de dados de IDs\n" "\n" " -i, --ignore-case combina com PADRO, sem diferenciar\n" " maisculas/minsculas\n" " -l, --literal combina com PADRO como uma string literal\n" " -r, --regexp combina com PADRO como uma expresso regular\n" " -w, --word combina com PADRO como uma palavra delimitada\n" " -s, --substring combina com PADRO como uma substring\n" " Nota: se o PADRO contm metacaracteres extendidos de expresso\n" " regular, ele interpretado como uma sbstring de expresso " "regular.\n" " Caso contrrio, PADRO interpretado como uma palavra literal.\n" "\n" " -k, --key=ESTILO ESTILO pode ser `token', `pattern' (padro) ou\n" " `none' (nenhum)\n" " -R, --result=ESTILO ESTILO pode ser `filenames' (nomes de arquivos),\n" " `grep', `edit' ou `none' (nenhum)\n" " -S, --separator=ESTILO ESTILO pode ser `braces' (chaves), " "`space' (espao)\n" " ou `newline' (nova linha) e se aplica apenas aos\n" " nomes de arquivos quando `--result=filenames'\n" " As opes de ESTILO acima controlam como os resultados da " "consulta\n" " so apresentados.\n" " Os padres so --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ acha palavras-chave que ocorrem FREQ vezes, onde " "FREQ\n" " uma faixa expressada como `N..M'. Se N for " "omitido,\n" " padro 1, se M for omitido, o padro MAX_USHRT\n" " -a, --ambiguous=COMP acha palavras-chave cujos nomes so ambguos para\n" " COMP caracteres\n" "\n" " -x, --hex encontra apenas nmeros expressos na base " "hexadecimal\n" " -d, --decimal encontra apenas nmeros expressos na base decimal\n" " -o, --octal encontra apenas nmeros expressos na base octal\n" " Por padro, as buscas encontram nmeros em qualquer base.\n" "\n" " --help exibe esta ajuda e sai\n" " --version mostra informaes de verso e sai\n" #: src/lid.c:283 msgid "braces" msgstr "chaves" #: src/lid.c:283 msgid "space" msgstr "espao" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "nota: uso de `-e' obsoleto, use `-r' no lugar" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "" "Todos os identificadores so no-ambguos nos primeiros %d caracteres\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "estilo invlido para `--key': `%s'" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "estilo invlido para `--result': `%s'" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "impossvel procurar com expresso regular: memria esgotada" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "editar? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "impossvel bifurcar" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "impossvel executar `%s'" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Uso: %s [OPO]... [ARQUIVO]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Constri um banco de dados de identificadores.\n" " -o, --output=ARQSAIDA nome de arquivo de sada do banco de dados de IDs\n" " -f, --file=ARQSAIDA sinnimo para --output\n" " -i, --include=LANGS inclui as linguagens em LANGS (padro: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclui as linguagens em LANGS\n" " -l, --lang-option=L:OPC passa OPC como padro para linguagem L (veja " "abaixo)\n" " -m, --lang-map=ARQMAPA usa ARQMAPA para mapear nomes de arquivo em\n" " linguagem fonte\n" " -d, --default-lang=LANG faz LANG a linguagem padro de fonte\n" " -p, --prune=NOMES exclui os arquivos nomeados e/ou diretrios\n" " -v, --verbose reporta estatsticas para cada arquivo\n" " -s, --statistics reporta estatsticas no final da execuo\n" "\n" " --help exibe esta ajuda e sai\n" " --version mostra informaes de verso e sai\n" "\n" "ARQUIVO pode ser um nome de arquivo ou um diretrio a examinar " "recursivamente.\n" "Se nenhum ARQUIVO for informado, o diretrio atual examinado por padro.\n" "Note que as opes `--include' e `--exclude' so mutuamente exclusivas.\n" "\n" "Os seguintes argumentos aplicam-se aos scanners especficos de linguagem:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "impossvel criar `%s' em `%s'" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "impossvel modificar `%s'" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "impossvel mostrar as estatsiticas de `%s'" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " novo = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nome=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Nmero=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "String=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Literal=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Comentrio=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "Arquivos=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Palavras-Chave=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Bytes=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Sada=%ld (%ld tok, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Freq=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Ordenando palavras-chave...\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Gravando `%s'...\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "impossvel criar `%s'" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "nvel %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Imprime todas as palavras-chave encontrdas em um arquivo fonte.\n" " -i, --include=LANGS inclui as linguagens em LANGS (padro: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclui as linguagens em LANGS\n" " -l, --lang-option=L:OPC passa OPC como padro para linguagem L (veja " "abaixo)\n" " -m, --lang-map=ARQMAPA usa ARQMAPA para mapear nomes de arquivo em\n" " linguagem fonte\n" " -d, --default-lang=LANG faz LANG a linguagem padro de fonte\n" " -p, --prune=NOMES exclui os arquivos nomeados e/ou diretrios\n" " --help exibe esta ajuda e sai\n" " --version mostra informaes de verso e sai\n" "\n" "Os seguintes argumentos aplicam-se aos scanners especficos de linguagem:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opo ilegal -- %c\n" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/idutils.pot�������������������������������������������������������������0000664�0000000�0000000�00000044244�12166360012�014227� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: GNU idutils 4.6\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" #: lib/getopt.c:624 lib/getopt.c:628 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: lib/getopt.c:637 lib/getopt.c:642 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: lib/getopt.c:685 lib/getopt.c:704 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "" #: lib/getopt.c:742 lib/getopt.c:745 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: lib/getopt.c:753 lib/getopt.c:756 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: lib/getopt.c:805 lib/getopt.c:808 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" #: lib/getopt.c:934 lib/getopt.c:950 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: lib/getopt.c:974 lib/getopt.c:992 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: lib/getopt.c:1013 lib/getopt.c:1031 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, c-format msgid "unable to record current working directory" msgstr "" #: lib/openat-die.c:57 #, c-format msgid "failed to return to initial working directory" msgstr "" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, c-format msgid "invalid `--separator' style: `%s'" msgstr "" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "" #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "" #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" #: libidu/scanners.c:460 #, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" #: libidu/scanners.c:471 #, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" #: libidu/scanners.c:1334 #, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "" #: src/lid.c:247 #, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" #: src/lid.c:283 msgid "braces" msgstr "" #: src/lid.c:283 msgid "space" msgstr "" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "" #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "" #: src/mkid.c:166 #, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr "" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "" #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "" #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "" #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "" #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "" #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "" #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "" #: src/mkid.c:658 #, c-format msgid "Heap=%llu+%llu Kb, " msgstr "" #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr "" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "" #: src/xtokid.c:88 #, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/Rules-quot��������������������������������������������������������������0000664�0000000�0000000�00000003400�11434330764�014026� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/it.po�������������������������������������������������������������������0000664�0000000�0000000�00000070353�12166360012�013002� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Italian localization for id-utils. # Copyright (C) 2003 Free Software Foundation, Inc. # Marco Parrone <marc0@autistici.org>, 2003. # msgid "" msgstr "" "Project-Id-Version: id-utils 3.2d\n" "Report-Msgid-Bugs-To: bug-idutils@gnu.org\n" "POT-Creation-Date: 2012-02-03 11:55+0100\n" "PO-Revision-Date: 2003-08-28 21:45+0200\n" "Last-Translator: Marco Parrone <marc0@autistici.org>\n" "Language-Team: Italian <tp@lists.linux.it>\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: lib/closeout.c:112 msgid "write error" msgstr "" #: lib/error.c:188 msgid "Unknown system error" msgstr "" #: lib/getopt.c:547 lib/getopt.c:576 #, fuzzy, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: l'opzione %s ambigua\n" #: lib/getopt.c:624 lib/getopt.c:628 #, fuzzy, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: l'opzione --%s non permette un argomento\n" #: lib/getopt.c:637 lib/getopt.c:642 #, fuzzy, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: l'opzione %c%s non permette un argomento\n" #: lib/getopt.c:685 lib/getopt.c:704 #, fuzzy, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: l'opzione %s richiede un argomento\n" #: lib/getopt.c:742 lib/getopt.c:745 #, fuzzy, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: l'opzione --%s non riconosciuta\n" #: lib/getopt.c:753 lib/getopt.c:756 #, fuzzy, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: l'opzione %c%s non riconosciuta\n" #: lib/getopt.c:805 lib/getopt.c:808 #, fuzzy, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opzione non valida -- %c\n" #: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106 #, fuzzy, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" #: lib/getopt.c:934 lib/getopt.c:950 #, fuzzy, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: l'opzione %s ambigua\n" #: lib/getopt.c:974 lib/getopt.c:992 #, fuzzy, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: l'opzione --%s non permette un argomento\n" #: lib/getopt.c:1013 lib/getopt.c:1031 #, fuzzy, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: l'opzione %s richiede un argomento\n" #: lib/obstack.c:413 lib/obstack.c:415 lib/xalloc-die.c:34 msgid "memory exhausted" msgstr "" #: lib/openat-die.c:38 #, fuzzy, c-format msgid "unable to record current working directory" msgstr "impossibile ottenere la directory di lavoro" #: lib/openat-die.c:57 #, fuzzy, c-format msgid "failed to return to initial working directory" msgstr "impossibile ottenere la directory di lavoro" #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left #. quotation mark suitable for the locale, and similarly for #. "'". For example, a French Unicode local should translate #. these to U+00AB (LEFT-POINTING DOUBLE ANGLE #. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE #. QUOTATION MARK), respectively. #. #. If the catalog has no translation, we will try to #. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and #. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the #. current locale is not Unicode, locale_quoting_style #. will quote 'like this', and clocale_quoting_style will #. quote "like this". You should always include translations #. for "`" and "'" even if U+2018 and U+2019 are appropriate #. for your locale. #. #. If you don't know what to put here, please see #. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages> #. and use glyphs suitable for your language. #: lib/quotearg.c:311 msgid "`" msgstr "" #: lib/quotearg.c:312 msgid "'" msgstr "" #: lib/regcomp.c:131 msgid "Success" msgstr "" #: lib/regcomp.c:134 msgid "No match" msgstr "" #: lib/regcomp.c:137 msgid "Invalid regular expression" msgstr "" #: lib/regcomp.c:140 msgid "Invalid collation character" msgstr "" #: lib/regcomp.c:143 msgid "Invalid character class name" msgstr "" #: lib/regcomp.c:146 msgid "Trailing backslash" msgstr "" #: lib/regcomp.c:149 msgid "Invalid back reference" msgstr "" #: lib/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" #: lib/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" #: lib/regcomp.c:158 msgid "Unmatched \\{" msgstr "" #: lib/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" #: lib/regcomp.c:164 msgid "Invalid range end" msgstr "" #: lib/regcomp.c:167 msgid "Memory exhausted" msgstr "" #: lib/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" #: lib/regcomp.c:173 msgid "Premature end of regular expression" msgstr "" #: lib/regcomp.c:176 msgid "Regular expression too big" msgstr "" #: lib/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" #: lib/regcomp.c:700 msgid "No previous regular expression" msgstr "" #: libidu/fnprint.c:137 #, fuzzy, c-format msgid "invalid `--separator' style: `%s'" msgstr "stile --key non valido: %s" #: libidu/idfile.c:106 #, c-format msgid "can't determine the io_size of a string!" msgstr "impossibile determinare l'io_size di una stringa" #: libidu/idread.c:49 src/lid.c:596 src/mkid.c:588 src/xtokid.c:340 #, c-format msgid "can't open `%s'" msgstr "impossibile aprire %s" #: libidu/idread.c:68 #, c-format msgid "`%s' is not an ID file! (bad magic #)" msgstr "%s non un file ID (numero magic errato)" #: libidu/idread.c:70 #, c-format msgid "`%s' is version %d, but I only grok version %d" msgstr "la versione di %s %d, ma conosciuta solo la versione %d" #: libidu/idread.c:190 #, c-format msgid "unsupported size in io_read (): %d" msgstr "dimensione non supportata in io_read (): %d" #: libidu/idread.c:200 libidu/idwrite.c:169 #, c-format msgid "unknown I/O type: %d" msgstr "tipo di I/O sconosciuto: %d" #: libidu/idu-hash.c:51 #, c-format msgid "can't allocate %ld bytes for hash table: memory exhausted" msgstr "impossibile allocare %ld byte per la tabella hash: memoria esaurita" #: libidu/idu-hash.c:264 #, c-format msgid "Load=%ld/%ld=%.0f%%, " msgstr "Caricati=%ld/%ld=%.0f%%, " #: libidu/idu-hash.c:266 #, c-format msgid "Rehash=%d, " msgstr "Rehash=%d, " #: libidu/idu-hash.c:267 #, c-format msgid "Collisions=%ld/%ld=%.0f%%" msgstr "Collisioni=%ld/%ld=%.0f%%" #: libidu/idwrite.c:158 #, c-format msgid "unsupported size in io_write (): %d" msgstr "dimensione non supportata in io_write (): %d" #: libidu/scanners.c:108 #, c-format msgid "unrecognized language: `%s'" msgstr "linguaggio non riconosciuto: %s" #: libidu/scanners.c:168 #, c-format msgid "can't allocate language args obstack: memory exhausted" msgstr "" "impossibile allocare obstack per gli argomenti del linguaggio: memoria " "esaurita" #: libidu/scanners.c:222 libidu/scanners.c:291 #, c-format msgid "can't allocate language args: memory exhausted" msgstr "impossibile allocare gli argomenti del linguaggio: memoria esaurita" #: libidu/scanners.c:230 #, c-format msgid "language name expected following `%s' in file `%s'" msgstr "era previsto il nome di un linguaggio dopo %s nel file %s" #: libidu/scanners.c:285 #, c-format msgid "can't open language map file `%s'" msgstr "impossibile aprire il file della mappa dei linguaggi %s" #: libidu/scanners.c:287 #, c-format msgid "can't get size of map file `%s'" msgstr "impossibile ottenere la dimensione del file mappa %s" #: libidu/scanners.c:297 #, c-format msgid "can't read language map file `%s'" msgstr "impossibile leggere il file della mappa dei linguaggi %s" #: libidu/scanners.c:300 #, c-format msgid "can't read entire language map file `%s'" msgstr "impossibile leggere l'intero file della mappa dei linguaggi %s" #: libidu/scanners.c:449 #, c-format msgid "" "C language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguaggio C:\n" " -k,--keep=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, mantiene il risultato\n" " -i,--ignore=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, scarta il risultato\n" " -u,--strip-underscore Rimuove un underscore dall'inizio della stringa di " "un simbolo singolo\n" #: libidu/scanners.c:460 #, fuzzy, c-format msgid "" "C++ language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguaggio C:\n" " -k,--keep=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, mantiene il risultato\n" " -i,--ignore=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, scarta il risultato\n" " -u,--strip-underscore Rimuove un underscore dall'inizio della stringa di " "un simbolo singolo\n" #: libidu/scanners.c:471 #, fuzzy, c-format msgid "" "Java language:\n" " -k,--keep=CHARS Allow CHARS in single-token strings, keep the " "result\n" " -i,--ignore=CHARS Allow CHARS in single-token strings, toss the " "result\n" " -u,--strip-underscore Strip a leading underscore from single-token " "strings\n" msgstr "" "Linguaggio C:\n" " -k,--keep=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, mantiene il risultato\n" " -i,--ignore=CARATTERI Permette CARATTERI nella stringa di un simbolo " "singolo, scarta il risultato\n" " -u,--strip-underscore Rimuove un underscore dall'inizio della stringa di " "un simbolo singolo\n" #: libidu/scanners.c:754 libidu/scanners.c:1023 libidu/scanners.c:1226 #: libidu/scanners.c:1496 #, c-format msgid "junk: `%c'" msgstr "rifiutato: %c" #: libidu/scanners.c:756 libidu/scanners.c:1025 libidu/scanners.c:1228 #: libidu/scanners.c:1498 #, c-format msgid "junk: `\\%03o'" msgstr "rifiutato: \\%03o" #: libidu/scanners.c:858 #, c-format msgid "" "Assembly language:\n" " -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n" " -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n" " -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n" " -u,--strip-underscore Strip a leading underscore from tokens\n" " -n,--no-cpp Don't handle C pre-processor directives\n" msgstr "" "Linguaggio Assembly:\n" " -c,--comment=CARATTERI Ognuno tra CARATTERI inizia un commento fino a fine " "linea\n" " -k,--keep=CARATTERI Permette CARATTERI nei simboli, mantiene il " "risultato\n" " -i,--ignore=CARATTERI Permette CARATTERI nei simboli, scarta il " "risultato\n" " -u,--strip-underscore Rimuove un underscore dall'inizio dei simboli " "singoli\n" " -n,--no-cpp Non elabora le direttive per il pre-processore C\n" #: libidu/scanners.c:1129 #, c-format msgid "" "Text language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" msgstr "" "Linguaggio testo:\n" " -i,--include=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-" "CARATTERI come costituenti di un simbolo\n" " -x,--exclude=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-" "CARATTERI come delimitatori di un simbolo\n" #: libidu/scanners.c:1334 #, fuzzy, c-format msgid "" "Perl language:\n" " -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token " "constituents\n" " -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token " "delimiters\n" " -d,--dtags Include documentation tags\n" msgstr "" "Linguaggio testo:\n" " -i,--include=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-" "CARATTERI come costituenti di un simbolo\n" " -x,--exclude=CLASSE-DI-CARATTERI Tratta i caratteri di CLASSE-DI-" "CARATTERI come delimitatori di un simbolo\n" #: libidu/scanners.c:1597 #, c-format msgid "Lisp language:\n" msgstr "" #: libidu/walker.c:122 #, c-format msgid "can't read directory `%s' (`.' from `%s')" msgstr "impossibile leggere la directory %s (. da %s)" #: libidu/walker.c:189 #, c-format msgid "notice: `%s' was a %s, but is now a %s!" msgstr "nota: %s era un %s, ma ora un %s" #: libidu/walker.c:190 libidu/walker.c:191 msgid "file" msgstr "file" #: libidu/walker.c:190 libidu/walker.c:191 msgid "directory" msgstr "directory" #: libidu/walker.c:320 #, c-format msgid "warning: `%s' and `%s' are the same file, but yield different scans!" msgstr "" "attenzione: %s e %s sono lo stesso file, ma corrispondono a scansioni " "differenti" #: libidu/walker.c:414 #, c-format msgid "notice: scan parameters changed for `%s'" msgstr "nota: sono cambiati i parametri di scansione per %s" #: libidu/walker.c:496 libidu/walker.c:504 #, c-format msgid "can't mix --include and --exclude options" msgstr "" #: libidu/walker.c:614 #, c-format msgid "can't get working directory" msgstr "impossibile ottenere la directory di lavoro" #: libidu/walker.c:669 #, c-format msgid "can't chdir to `%s'" msgstr "impossibile fare chdir in %s" #: libidu/walker.c:674 #, c-format msgid "can't chdir to `%s' from `%s'" msgstr "impossibile fare chdir in %s da %s" #: libidu/walker.c:735 #, c-format msgid "can't lstat `%s' from `%s'" msgstr "impossibile fare lstat %s da %s" #: libidu/walker.c:743 #, c-format msgid "can't stat `%s' from `%s'" msgstr "impossibile fare stat %s da %s" #: src/fid.c:72 src/fnid.c:51 src/lid.c:235 src/mkid.c:129 src/xtokid.c:55 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Provare %s --help per maggiori informazioni.\n" #: src/fid.c:80 #, c-format msgid "Usage: %s [OPTION] FILENAME [FILENAME2]\n" msgstr "Uso: %s [OPZIONI] FILENAME [FILENAME2]\n" #: src/fid.c:83 #, c-format msgid "" "List identifiers that occur in FILENAME, or if FILENAME2 is\n" "also given list the identifiers that occur in both files.\n" "\n" " -f, --file=FILE file name of ID database\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Elenca gli identificatori che occorrono in FILENAME, o se viene\n" "fornito anche FILENAME2 elenca gli identificatori che occorrono in\n" "entrambi i file.\n" "\n" " -f, --file=FILE nome del file del database degli ID\n" " --help mostra questo aiuto ed esce\n" " --version mostra informazioni sulla versione ed esce\n" #: src/fid.c:91 src/fnid.c:80 src/lid.c:284 src/mkid.c:192 src/xtokid.c:106 #, c-format msgid "" "\n" "Report bugs to " msgstr "" #: src/fid.c:149 #, c-format msgid "no file name arguments" msgstr "nessun nome di file come argomento" #: src/fid.c:154 #, c-format msgid "too many file name arguments" msgstr "troppi nomi di file come argomenti" #: src/fid.c:161 src/fnid.c:155 src/lid.c:439 #, c-format msgid "can't locate `ID'" msgstr "impossibile localizzare ID" #: src/fid.c:244 #, c-format msgid "`%s' is ambiguous" msgstr "%s ambiguo" #: src/fid.c:250 #, c-format msgid "`%s' not found" msgstr "%s non trovato" #: src/fnid.c:68 #, c-format msgid "Usage: %s [OPTION]... [PATTERN]...\n" msgstr "Uso: %s [OPZIONI]... [PATTERN]...\n" #: src/fnid.c:72 #, c-format msgid "" "Print constituent file names that match PATTERN,\n" "using shell-style wildcards.\n" " -f, --file=FILE file name of ID database\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "Visualizza i nomi di file costituenti che soddisfano PATTERN,\n" "usando caratteri jolly in stile shell.\n" " -f, --file=FILE nome del file del database degli ID\n" " -S, --separator=STILE STILE pu essere braces, space o newline\n" " --help mostra questo aiuto ed esce\n" " --version mostra informazioni sulla versione ed esce\n" #: src/lid.c:243 #, c-format msgid "Usage: %s [OPTION]... PATTERN...\n" msgstr "Uso: %s [OPZIONI]... PATTERN...\n" #: src/lid.c:247 #, fuzzy, c-format msgid "" "Query ID database and report results.\n" "By default, output consists of multiple lines, each line containing the\n" "matched identifier followed by the list of file names in which it occurs.\n" "\n" " -f, --file=FILE file name of ID database\n" "\n" " -i, --ignore-case match PATTERN case insensitively\n" " -l, --literal match PATTERN as a literal string\n" " -r, --regexp match PATTERN as a regular expression\n" " -w, --word match PATTERN as a delimited word\n" " -s, --substring match PATTERN as a substring\n" " Note: If PATTERN contains extended regular expression meta-\n" " characters, it is interpreted as a regular expression " "substring.\n" " Otherwise, PATTERN is interpreted as a literal word.\n" "\n" " -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n" " -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or " "`none'\n" " -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n" " only applies to file names when `--" "result=filenames'\n" " The above STYLE options control how query results are " "presented.\n" " Defaults are --key=token --result=filenames --separator=%s\n" "\n" " -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n" " is a range expressed as `N..M'. If N is omitted, " "it\n" " defaults to 1, if M is omitted it defaults to " "MAX_USHRT\n" " -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n" "\n" " -x, --hex only find numbers expressed as hexadecimal\n" " -d, --decimal only find numbers expressed as decimal\n" " -o, --octal only find numbers expressed as octal\n" " By default, searches match numbers of any radix.\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" msgstr "" "F un'interrogazione sul database ID e riporta i risultati.\n" "In modo predefinito, l'output consiste di pi linee, ogni linea contiene\n" "l'identificatore trovato seguito dalla lista dei file in cui compare.\n" "\n" " -f, --file=FILE nome del file del database ID\n" "\n" " -i, --ignore-case riconosce PATTERN non distinguendo tra maiuscole\n" " e minuscole\n" " -l, --literal riconosce PATTERN come una stringa letterale\n" " -r, --regexp riconosce PATTERN come un'espressione regolare\n" " -w, --word riconosce PATTERN come una parola delimitata\n" " -s, --substring riconosce PATTERN come una sotto-stringa\n" " Nota: se PATTERN contiene metacaratteri estesi di un'espressione\n" " regolare, viene interpretato come una sotto-stringa di\n" " espressione regolare.\n" " In caso contrario, PATTERN viene interpretato come una\n" " parola letterale.\n" "\n" " -k, --key=STILE STILE pu essere token, pattern o none\n" " -R, --result=STILE STILE pu essere filenames, grep, edit o " "none\n" " -S, --separator=STILE STILE pu essere braces, space o newline e\n" " si applica solo ai nomi di file quando viene fornito " "--result=filenames\n" " Le precedenti opzioni STILE controllano come vengono " "presentati i risultati di un'interrogazione.\n" " In modo predefinito sono --key=token --result=filenames --" "separator=%s\n" " -F, --frequency=FREQ trova identificatori che compaiono FREQ volte, dove\n" " FREQ un intervallo espresso come N..M. Se N " "viene\n" " omesso, viene considerato 1, se M viene omesso, " "viene\n" " considerato MAX_USHRT\n" " -a, --ambiguous=LUN trova identificatori i cui nomi sono ambigui per " "LUN\n" " caratteri\n" " -x, --hex trova solo numeri espressi come esadecimali\n" " -d, --decimal trova solo numeri espressi come decimali\n" " -o, --octal trova solo numeri espressi come ottali\n" " In modo predefinito, la ricerca trova numeri di ogni radice.\n" "\n" " --help mostra questo aiuto ed esce\n" " --version mostra informazioni sulla versione ed esce\n" #: src/lid.c:283 msgid "braces" msgstr "braces" #: src/lid.c:283 msgid "space" msgstr "space" #: src/lid.c:377 #, c-format msgid "notice: use of `-e' is deprecated, use `-r' instead" msgstr "nota: l'uso di -e sconsigliato, usare -r piuttosto" #: src/lid.c:460 #, c-format msgid "All identifiers are non-ambiguous within the first %d characters\n" msgstr "Nessun identificatore ambiguo nei primi %d caratteri\n" #: src/lid.c:495 #, c-format msgid "invalid `--key' style: `%s'" msgstr "stile --key non valido: %s" #: src/lid.c:507 #, c-format msgid "invalid `--result' style: `%s'" msgstr "stile --result non valido: %s" #: src/lid.c:608 src/lid.c:929 #, c-format msgid "can't match regular-expression: memory exhausted" msgstr "impossibile riconoscere l'espressione regolare: memoria esaurita" #: src/lid.c:697 #, c-format msgid "edit? [y1-9^S/nq] " msgstr "modificare? [y1-9^S/nq] " #: src/lid.c:766 #, c-format msgid "can't fork" msgstr "impossibile fare il fork" #: src/lid.c:788 #, c-format msgid "can't exec `%s'" msgstr "impossibile eseguire %s" #: src/mkid.c:162 src/xtokid.c:84 #, c-format msgid "Usage: %s [OPTION]... [FILE]...\n" msgstr "Uso: %s [OPZIONE]... [FILE]...\n" #: src/mkid.c:166 #, fuzzy, c-format msgid "" "Build an identifier database.\n" " -o, --output=OUTFILE file name of ID database output\n" " -f, --file=OUTFILE synonym for --output\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" " -v, --verbose report per file statistics\n" " -s, --statistics report statistics at end of run\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" " --version output version information and exit\n" "\n" "FILE may be a file name, or a directory name to recursively search.\n" "If no FILE is given, the current directory is searched by default.\n" "Note that the `--include' and `--exclude' options are mutually-exclusive.\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Costruisce un database di identificatori.\n" " -o, --output=OUTFILE nome del file di output del database ID\n" " -f, --file=OUTFILE sinonimo per --output\n" " -i, --include=LINGUAGGI include i linguaggi in LINGUAGGI (predefiniti: " "\"C C++ asm\")\n" " -x, --exclude=LINGUAGGI esclude i linguaggi in LINGUAGGI\n" " -l, --lang-options=L:OP passa OP come un valore predefinito per il " "linguaggio L (vedere sotto)\n" " -m, --lang-map=FILEMAPPA usa FILEMAPPA per associare i nomi dei file ai " "linguaggi sorgenti\n" " -d, --default-lang=LING usa LING come linguaggio sorgente predefinito\n" " -p, --prune=NOMI esclude i file e/o directory in NOMI\n" " -v, --verbose riporta le statistiche per ogni file\n" " -s, --statistics riporta le statistiche alla fine dell'esecuzione\n" "\n" " --help mostra questo aiuto ed esce\n" " --version mostra informazioni sulla versione ed esce\n" "\n" "FILE dovrebbe essere un nome di file, o quello di una directory in cui\n" "cercare ricorsivamente. Se non viene fornito nessun FILE, in modo\n" "predefinito la ricerca viene effettuata nella directory corrente.\n" "Notare che le opzioni --include e --exclude sono mutualmente\n" "esclusive.\n" "\n" "I seguenti argomenti sono per gli scanner specifici ai linguaggi:\n" #: src/mkid.c:308 src/xtokid.c:194 #, c-format msgid "extra operand %s" msgstr "" #: src/mkid.c:310 src/xtokid.c:196 msgid "file operands cannot be combined with --files0-from" msgstr "" #: src/mkid.c:315 src/xtokid.c:201 #, c-format msgid "cannot open %s for reading" msgstr "" #: src/mkid.c:349 src/xtokid.c:234 #, c-format msgid "%s: read error" msgstr "" #: src/mkid.c:363 src/xtokid.c:248 #, c-format msgid "when reading file names from stdin, no file name of %s allowed" msgstr "" #: src/mkid.c:377 src/mkid.c:385 src/xtokid.c:262 src/xtokid.c:270 msgid "invalid zero-length file name" msgstr "" #: src/mkid.c:439 #, c-format msgid "nothing to do" msgstr "" #: src/mkid.c:489 #, c-format msgid "can't create `%s' in `%s'" msgstr "impossibile creare %s in %s" #: src/mkid.c:494 #, c-format msgid "can't modify `%s'" msgstr "impossibile modificare %s" #: src/mkid.c:571 #, c-format msgid "can't stat `%s'" msgstr "impossibile fare stat %s" #: src/mkid.c:640 #, c-format msgid " new = %d/%d" msgstr " nuovo = %d/%d" #: src/mkid.c:649 #, c-format msgid "Name=%ld, " msgstr "Nome=%ld, " #: src/mkid.c:650 #, c-format msgid "Number=%ld, " msgstr "Numero=%ld, " #: src/mkid.c:651 #, c-format msgid "String=%ld, " msgstr "Stringa=%ld, " #: src/mkid.c:652 #, c-format msgid "Literal=%ld, " msgstr "Letterale=%ld, " #: src/mkid.c:653 #, c-format msgid "Comment=%ld\n" msgstr "Commento=%ld\n" #: src/mkid.c:655 #, c-format msgid "Files=%ld, " msgstr "File=%ld, " #: src/mkid.c:656 #, c-format msgid "Tokens=%ld, " msgstr "Simboli=%ld, " #: src/mkid.c:657 #, c-format msgid "Bytes=%ld Kb, " msgstr "Byte=%ld Kb, " #: src/mkid.c:658 #, fuzzy, c-format msgid "Heap=%llu+%llu Kb, " msgstr "Heap=%d+%d Kb, " #: src/mkid.c:663 #, c-format msgid "Output=%ld (%ld tok, %ld hit)\n" msgstr "Output=%ld (%ld tok, %ld hit)\n" #: src/mkid.c:667 #, c-format msgid ", Freq=%ld/%ld=%.2f\n" msgstr ", Freq=%ld/%ld=%.2f\n" #: src/mkid.c:691 #, c-format msgid "Sorting tokens...\n" msgstr "Ordinamento dei simboli in corso.\n" #: src/mkid.c:699 #, c-format msgid "Writing `%s'...\n" msgstr "Scrittura di %s in corso.\n" #: src/mkid.c:702 #, c-format msgid "can't create `%s'" msgstr "impossibile creare %s" #: src/mkid.c:714 src/mkid.c:724 src/mkid.c:771 #, c-format msgid "internal limitation: offset of 2^32 or larger" msgstr "" #: src/mkid.c:779 #, c-format msgid "error closing `%s'" msgstr "" #: src/mkid.c:867 #, c-format msgid "level %d: %ld/%ld = %.0f%%\n" msgstr "livello %d: %ld/%ld = %.0f%%\n" #: src/xtokid.c:88 #, fuzzy, c-format msgid "" "Print all tokens found in a source file.\n" " -i, --include=LANGS include languages in LANGS (default: \"C C++ asm" "\")\n" " -x, --exclude=LANGS exclude languages in LANGS\n" " -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n" " -m, --lang-map=MAPFILE use MAPFILE to map file names onto source " "language\n" " -d, --default-lang=LANG make LANG the default source language\n" " -p, --prune=NAMES exclude the named files and/or directories\n" "\n" " --files0-from=F tokenize only the files specified by\n" " NUL-terminated names in file F\n" "\n" " --help display this help and exit\n" "\t\t --version output version information and exit\n" "\n" "The following arguments apply to the language-specific scanners:\n" msgstr "" "Visualizza tutti i simboli trovati in un file sorgente.\n" " -i, --include=LINGUAGGI include i linguaggi in LINGUAGGI (predefinito: \"C " "C++ asm\")\n" " -x, --exclude=LINGUAGGI esclude i linguaggi in LINGUAGGI\n" " -l, --lang-option=L:OP passa OP come un valore predefinito per il " "linguaggio L\n" " -m, --lang-map=FILEMAPPA usa FILEMAPPA per associare nomi di file e " "linguaggio sorgente\n" " -d, --default-lang=LING rende LING il linguaggio sorgente predefinito\n" " -p, --prune=NOMI esclude i file e/o directory in NOMI\n" " --help mostra questo aiuto ed esce\n" " --version mostra informazioni sulla versione ed esce\n" "\n" "I seguenti argomenti sono per gli scanner specifici ai linguaggi:\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opzione illecita -- %c\n" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/po/stamp-po����������������������������������������������������������������0000664�0000000�0000000�00000000012�10623104751�013474� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������timestamp ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/aclocal.m4�����������������������������������������������������������������0000664�0000000�0000000�00000132353�12166360012�013247� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# generated automatically by aclocal 1.11a -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68.136-a1a00],, [m4_warning([this file was generated for autoconf 2.68.136-a1a00. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11a' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11a], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11a])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008, 2011 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 14 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 17 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 11 # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [AC_PREREQ([2.60])dnl # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) AC_ARG_VAR([EMACS], [the Emacs editor command]) AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) AC_ARG_WITH([lispdir], [AS_HELP_STRING([--with-lispdir], [override the default lisp directory])], [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], [ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' ]) lispdir="$am_cv_lispdir" ]) AC_SUBST([lispdir]) ])# AM_PATH_LISPDIR AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: `make V=1')]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: `make V=0')])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few `make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using `$V' instead of `$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar <conftest.tar]) grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/00gnulib.m4]) m4_include([m4/alloca.m4]) m4_include([m4/asm-underscore.m4]) m4_include([m4/autobuild.m4]) m4_include([m4/btowc.m4]) m4_include([m4/calloc.m4]) m4_include([m4/chdir-long.m4]) m4_include([m4/close-stream.m4]) m4_include([m4/close.m4]) m4_include([m4/closedir.m4]) m4_include([m4/closeout.m4]) m4_include([m4/codeset.m4]) m4_include([m4/configmake.m4]) m4_include([m4/d-ino.m4]) m4_include([m4/dirent_h.m4]) m4_include([m4/dirfd.m4]) m4_include([m4/dirname.m4]) m4_include([m4/double-slash-root.m4]) m4_include([m4/dup.m4]) m4_include([m4/dup2.m4]) m4_include([m4/eealloc.m4]) m4_include([m4/environ.m4]) m4_include([m4/errno_h.m4]) m4_include([m4/error.m4]) m4_include([m4/exponentd.m4]) m4_include([m4/exponentf.m4]) m4_include([m4/exponentl.m4]) m4_include([m4/extensions.m4]) m4_include([m4/fchdir.m4]) m4_include([m4/fcntl-o.m4]) m4_include([m4/fcntl.m4]) m4_include([m4/fcntl_h.m4]) m4_include([m4/fdopen.m4]) m4_include([m4/fdopendir.m4]) m4_include([m4/fflush.m4]) m4_include([m4/filenamecat.m4]) m4_include([m4/float_h.m4]) m4_include([m4/fnmatch.m4]) m4_include([m4/fopen.m4]) m4_include([m4/fpending.m4]) m4_include([m4/fpieee.m4]) m4_include([m4/fprintf-posix.m4]) m4_include([m4/fpurge.m4]) m4_include([m4/freading.m4]) m4_include([m4/freopen.m4]) m4_include([m4/frexp.m4]) m4_include([m4/frexpl.m4]) m4_include([m4/fseek.m4]) m4_include([m4/fseeko.m4]) m4_include([m4/fstat.m4]) m4_include([m4/fstatat.m4]) m4_include([m4/ftell.m4]) m4_include([m4/ftello.m4]) m4_include([m4/getcwd-abort-bug.m4]) m4_include([m4/getcwd-path-max.m4]) m4_include([m4/getcwd.m4]) m4_include([m4/getdelim.m4]) m4_include([m4/getdtablesize.m4]) m4_include([m4/getopt.m4]) m4_include([m4/getpagesize.m4]) m4_include([m4/gettext.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnu-make.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) m4_include([m4/iconv.m4]) m4_include([m4/include_next.m4]) m4_include([m4/inline.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttostr.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/inttypes_h.m4]) m4_include([m4/isnand.m4]) m4_include([m4/isnanf.m4]) m4_include([m4/isnanl.m4]) m4_include([m4/iswblank.m4]) m4_include([m4/langinfo_h.m4]) m4_include([m4/largefile.m4]) m4_include([m4/lcmessage.m4]) m4_include([m4/ldexpl.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libunistring-base.m4]) m4_include([m4/localcharset.m4]) m4_include([m4/locale-fr.m4]) m4_include([m4/locale-ja.m4]) m4_include([m4/locale-tr.m4]) m4_include([m4/locale-zh.m4]) m4_include([m4/locale_h.m4]) m4_include([m4/localename.m4]) m4_include([m4/lock.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lseek.m4]) m4_include([m4/lstat.m4]) m4_include([m4/malloc.m4]) m4_include([m4/malloca.m4]) m4_include([m4/manywarnings.m4]) m4_include([m4/math_h.m4]) m4_include([m4/mbchar.m4]) m4_include([m4/mbiter.m4]) m4_include([m4/mbrtowc.m4]) m4_include([m4/mbsinit.m4]) m4_include([m4/mbsrtowcs.m4]) m4_include([m4/mbstate_t.m4]) m4_include([m4/mbtowc.m4]) m4_include([m4/memchr.m4]) m4_include([m4/mempcpy.m4]) m4_include([m4/memrchr.m4]) m4_include([m4/mmap-anon.m4]) m4_include([m4/mode_t.m4]) m4_include([m4/msvc-inval.m4]) m4_include([m4/msvc-nothrow.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/nl_langinfo.m4]) m4_include([m4/nls.m4]) m4_include([m4/nocrash.m4]) m4_include([m4/open.m4]) m4_include([m4/openat.m4]) m4_include([m4/opendir.m4]) m4_include([m4/pathmax.m4]) m4_include([m4/perl.m4]) m4_include([m4/po.m4]) m4_include([m4/posix-shell.m4]) m4_include([m4/printf-frexp.m4]) m4_include([m4/printf-frexpl.m4]) m4_include([m4/printf-posix-rpl.m4]) m4_include([m4/printf.m4]) m4_include([m4/progtest.m4]) m4_include([m4/putenv.m4]) m4_include([m4/quote.m4]) m4_include([m4/quotearg.m4]) m4_include([m4/readdir.m4]) m4_include([m4/realloc.m4]) m4_include([m4/regex.m4]) m4_include([m4/rewinddir.m4]) m4_include([m4/save-cwd.m4]) m4_include([m4/setenv.m4]) m4_include([m4/setlocale.m4]) m4_include([m4/signbit.m4]) m4_include([m4/size_max.m4]) m4_include([m4/snprintf.m4]) m4_include([m4/sprintf-posix.m4]) m4_include([m4/ssize_t.m4]) m4_include([m4/stat.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/stdio_h.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strcase.m4]) m4_include([m4/strcasestr.m4]) m4_include([m4/strdup.m4]) m4_include([m4/strerror.m4]) m4_include([m4/strerror_r.m4]) m4_include([m4/string_h.m4]) m4_include([m4/strings_h.m4]) m4_include([m4/strndup.m4]) m4_include([m4/strnlen.m4]) m4_include([m4/strsep.m4]) m4_include([m4/symlink.m4]) m4_include([m4/sys_ioctl_h.m4]) m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_stat_h.m4]) m4_include([m4/sys_types_h.m4]) m4_include([m4/thread.m4]) m4_include([m4/threadlib.m4]) m4_include([m4/time_h.m4]) m4_include([m4/ungetc.m4]) m4_include([m4/unistd-safer.m4]) m4_include([m4/unistd_h.m4]) m4_include([m4/vasnprintf.m4]) m4_include([m4/vfprintf-posix.m4]) m4_include([m4/warn-on-use.m4]) m4_include([m4/warnings.m4]) m4_include([m4/wchar_h.m4]) m4_include([m4/wchar_t.m4]) m4_include([m4/wcrtomb.m4]) m4_include([m4/wctob.m4]) m4_include([m4/wctomb.m4]) m4_include([m4/wctype_h.m4]) m4_include([m4/wcwidth.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/xalloc.m4]) m4_include([m4/xgetcwd.m4]) m4_include([m4/xsize.m4]) m4_include([m4/xstrndup.m4]) m4_include([m4/yield.m4]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/maint.mk�������������������������������������������������������������������0000664�0000000�0000000�00000157725�12166360012�013062� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*-Makefile-*- # This Makefile fragment tries to be general-purpose enough to be # used by many projects via the gnulib maintainer-makefile module. ## Copyright (C) 2001-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 <http://www.gnu.org/licenses/>. # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk # Diagnostic for continued use of deprecated variable. # Remove in 2013 ifneq ($(build_aux),) $(error "$(ME): \ set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)") endif # Do not save the original name or timestamp in the .tar.gz file. # Use --rsyncable if available. gzip_rsyncable := \ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \ && printf %s --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) # You can override this variable in cfg.mk to set your own regexp # matching files to ignore. VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ # This is to preprocess robustly the output of $(VC_LIST), so that even # when $(srcdir) is a pathological name like "....", the leading sed command # removes only the intended prefix. _dot_escaped_srcdir = $(subst .,\.,$(srcdir)) # Post-process $(VC_LIST) output, prepending $(srcdir)/, but only # when $(srcdir) is not ".". ifeq ($(srcdir),.) _prepend_srcdir_prefix = else _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|' endif # In order to be able to consistently filter "."-relative names, # (i.e., with no $(srcdir) prefix), this definition is careful to # remove any $(srcdir) prefix, and to restore what it removes. _sc_excl = \ $(if $(exclude_file_name_regexp--$@),$(exclude_file_name_regexp--$@),^$$) VC_LIST_EXCEPT = \ $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ $(_prepend_srcdir_prefix) ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version endif PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null) VERSION_REGEXP = $(subst .,\.,$(VERSION)) PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION)) ifeq ($(VC),$(GIT)) this-vc-tag = v$(VERSION) this-vc-tag-regexp = v$(VERSION_REGEXP) else tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') tag-this-version = $(subst .,_,$(VERSION)) this-vc-tag = $(tag-package)-$(tag-this-version) this-vc-tag-regexp = $(this-vc-tag) endif my_distdir = $(PACKAGE)-$(VERSION) # Old releases are stored here. release_archive_dir ?= ../release # Override gnu_rel_host and url_dir_list in cfg.mk if these are not right. # Use alpha.gnu.org for alpha and beta releases. # Use ftp.gnu.org for stable releases. gnu_ftp_host-alpha = alpha.gnu.org gnu_ftp_host-beta = alpha.gnu.org gnu_ftp_host-stable = ftp.gnu.org gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE)) ifeq ($(gnu_rel_host),ftp.gnu.org) url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE) else url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE) endif # Override this in cfg.mk if you are using a different format in your # NEWS file. today = $(shell date +%Y-%m-%d) # Select which lines of NEWS are searched for $(news-check-regexp). # This is a sed line number spec. The default says that we search # lines 1..10 of NEWS for $(news-check-regexp). # If you want to search only line 3 or only lines 20-22, use "3" or "20,22". news-check-lines-spec ?= 1,10 news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' # Prevent programs like 'sort' from considering distinct strings to be equal. # Doing it here saves us from having to set LC_ALL elsewhere in this file. export LC_ALL = C ## --------------- ## ## Sanity checks. ## ## --------------- ## _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk') # Collect the names of rules starting with 'sc_'. syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ $(srcdir)/$(ME) $(_cfg_mk))) .PHONY: $(syntax-check-rules) ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0) local-checks-available += $(syntax-check-rules) else local-checks-available += no-vc-detected no-vc-detected: @echo "No version control files detected; skipping syntax check" endif .PHONY: $(local-checks-available) # Arrange to print the name of each syntax-checking rule just before running it. $(syntax-check-rules): %: %.m sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules)) .PHONY: $(sc_m_rules_) $(sc_m_rules_): @echo $(patsubst sc_%.m, %, $@) @date +%s.%N > .sc-start-$(basename $@) # Compute and print the elapsed time for each syntax-check rule. sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules)) .PHONY: $(sc_z_rules_) $(sc_z_rules_): %.z: % @end=$$(date +%s.%N); \ start=$$(cat .sc-start-$*); \ rm -f .sc-start-$*; \ awk -v s=$$start -v e=$$end \ 'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null # The patsubst here is to replace each sc_% rule with its sc_%.z wrapper # that computes and prints elapsed time. local-check := \ $(patsubst sc_%, sc_%.z, \ $(filter-out $(local-checks-to-skip), $(local-checks-available))) syntax-check: $(local-check) # _sc_search_regexp # # This macro searches for a given construct in the selected files and # then takes some action. # # Parameters (shell variables): # # prohibit | require # # Regular expression (ERE) denoting either a forbidden construct # or a required construct. Those arguments are exclusive. # # in_vc_files | in_files # # grep-E-style regexp denoting the files to check. If no files # are specified the default are all the files that are under # version control. # # containing | non_containing # # Select the files (non) containing strings matching this regexp. # If both arguments are specified then CONTAINING takes # precedence. # # with_grep_options # # Extra options for grep. # # ignore_case # # Ignore case. # # halt # # Message to display before to halting execution. # # Finally, you may exempt files based on an ERE matching file names. # For example, to exempt from the sc_space_tab check all files with the # .diff suffix, set this Make variable: # # exclude_file_name_regexp--sc_space_tab = \.diff$ # # Note that while this functionality is mostly inherited via VC_LIST_EXCEPT, # when filtering by name via in_files, we explicitly filter out matching # names here as well. # By default, _sc_search_regexp does not ignore case. export ignore_case = _ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :) define _sc_say_and_exit dummy=; : so we do not need a semicolon before each use; \ { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; }; endef define _sc_search_regexp dummy=; : so we do not need a semicolon before each use; \ \ : Check arguments; \ test -n "$$prohibit" && test -n "$$require" \ && { msg='Cannot specify both prohibit and require' \ $(_sc_say_and_exit) } || :; \ test -z "$$prohibit" && test -z "$$require" \ && { msg='Should specify either prohibit or require' \ $(_sc_say_and_exit) } || :; \ test -n "$$in_vc_files" && test -n "$$in_files" \ && { msg='Cannot specify both in_vc_files and in_files' \ $(_sc_say_and_exit) } || :; \ test "x$$halt" != x \ || { msg='halt not defined' $(_sc_say_and_exit) }; \ \ : Filter by file name; \ if test -n "$$in_files"; then \ files=$$(find $(srcdir) | grep -E "$$in_files" \ | grep -Ev '$(exclude_file_name_regexp--$@)'); \ else \ files=$$($(VC_LIST_EXCEPT)); \ if test -n "$$in_vc_files"; then \ files=$$(echo "$$files" | grep -E "$$in_vc_files"); \ fi; \ fi; \ \ : Filter by content; \ test -n "$$files" && test -n "$$containing" \ && { files=$$(grep -l "$$containing" $$files); } || :; \ test -n "$$files" && test -n "$$non_containing" \ && { files=$$(grep -vl "$$non_containing" $$files); } || :; \ \ : Check for the construct; \ if test -n "$$files"; then \ if test -n "$$prohibit"; then \ grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ else \ grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \ | grep . \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ fi \ else :; \ fi || :; endef sc_avoid_if_before_free: @$(srcdir)/$(_build-aux)/useless-if-before-free \ $(useless_free_options) \ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \ { echo '$(ME): found useless "if" before "free" above' 1>&2; \ exit 1; } || : sc_cast_of_argument_to_free: @prohibit='\<free *\( *\(' halt="don't cast free argument" \ $(_sc_search_regexp) sc_cast_of_x_alloc_return_value: @prohibit='\*\) *x(m|c|re)alloc\>' \ halt="don't cast x*alloc return value" \ $(_sc_search_regexp) sc_cast_of_alloca_return_value: @prohibit='\*\) *alloca\>' \ halt="don't cast alloca return value" \ $(_sc_search_regexp) sc_space_tab: @prohibit='[ ] ' \ halt='found SPACE-TAB sequence; remove the SPACE' \ $(_sc_search_regexp) # Don't use *scanf or the old ato* functions in "real" code. # They provide no error checking mechanism. # Instead, use strto* functions. sc_prohibit_atoi_atof: @prohibit='\<([fs]?scanf|ato([filq]|ll)) *\(' \ halt='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q' \ $(_sc_search_regexp) # Use STREQ rather than comparing strcmp == 0, or != 0. sc_prohibit_strcmp: @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \ $$($(VC_LIST_EXCEPT)) \ | grep -vE ':# *define STRN?EQ\(' && \ { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \ 1>&2; exit 1; } || : # Pass EXIT_*, not number, to usage, exit, and error (when exiting) # Convert all uses automatically, via these two commands: # git grep -l '\<exit *(1)' \ # | grep -vEf .x-sc_prohibit_magic_number_exit \ # | xargs --no-run-if-empty \ # perl -pi -e 's/(^|[^.])\b(exit ?)\(1\)/$1$2(EXIT_FAILURE)/' # git grep -l '\<exit *(0)' \ # | grep -vEf .x-sc_prohibit_magic_number_exit \ # | xargs --no-run-if-empty \ # perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/' sc_prohibit_magic_number_exit: @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,' \ halt='use EXIT_* values rather than magic number' \ $(_sc_search_regexp) # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use '0' instead. sc_error_exit_success: @prohibit='error *\(EXIT_SUCCESS,' \ in_vc_files='\.[chly]$$' \ halt='found error (EXIT_SUCCESS' \ $(_sc_search_regexp) # "FATAL:" should be fully upper-cased in error messages # "WARNING:" should be fully upper-cased, or fully lower-cased sc_error_message_warn_fatal: @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '"Warning|"Fatal|"fatal' && \ { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \ exit 1; } || : # Error messages should not start with a capital letter sc_error_message_uppercase: @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '"[A-Z]' \ | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \ { echo '$(ME): found capitalized error message' 1>&2; \ exit 1; } || : # Error messages should not end with a period sc_error_message_period: @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '[^."]\."' && \ { echo '$(ME): found error message ending in period' 1>&2; \ exit 1; } || : sc_file_system: @prohibit=file''system \ ignore_case=1 \ halt='found use of "file''system"; spell it "file system"' \ $(_sc_search_regexp) # Don't use cpp tests of this symbol. All code assumes config.h is included. sc_prohibit_have_config_h: @prohibit='^# *if.*HAVE''_CONFIG_H' \ halt='found use of HAVE''_CONFIG_H; remove' \ $(_sc_search_regexp) # Nearly all .c files must include <config.h>. However, we also permit this # via inclusion of a package-specific header, if cfg.mk specified one. # config_h_header must be suitable for grep -E. config_h_header ?= <config\.h> sc_require_config_h: @require='^# *include $(config_h_header)' \ in_vc_files='\.c$$' \ halt='the above files do not include <config.h>' \ $(_sc_search_regexp) # You must include <config.h> before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ grep '^# *include\>' $$i | sed 1q \ | grep -E '^# *include $(config_h_header)' > /dev/null \ || { echo $$i; fail=1; }; \ done; \ test $$fail = 1 && \ { echo '$(ME): the above files include some other header' \ 'before <config.h>' 1>&2; exit 1; } || :; \ else :; \ fi sc_prohibit_HAVE_MBRTOWC: @prohibit='\bHAVE_MBRTOWC\b' \ halt="do not use $$prohibit; it is always defined" \ $(_sc_search_regexp) # To use this "command" macro, you must first define two shell variables: # h: the header name, with no enclosing <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`; \ if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ { echo "$(ME): the above files include $$h but don't use it" \ 1>&2; exit 1; } || :; \ else :; \ fi endef # Prohibit the inclusion of assert.h without an actual use of assert. sc_prohibit_assert_without_use: @h='assert.h' re='\<assert *\(' $(_sc_header_without_use) # Prohibit the inclusion of close-stream.h without an actual use. sc_prohibit_close_stream_without_use: @h='close-stream.h' re='\<close_stream *\(' $(_sc_header_without_use) # Prohibit the inclusion of getopt.h without an actual use. sc_prohibit_getopt_without_use: @h='getopt.h' re='\<getopt(_long)? *\(' $(_sc_header_without_use) # Don't include quotearg.h unless you use one of its functions. sc_prohibit_quotearg_without_use: @h='quotearg.h' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use) # Don't include quote.h unless you use one of its functions. sc_prohibit_quote_without_use: @h='quote.h' re='\<quote(_n)? *\(' $(_sc_header_without_use) # Don't include this header unless you use one of its functions. sc_prohibit_long_options_without_use: @h='long-options.h' re='\<parse_long_options *\(' \ $(_sc_header_without_use) # Don't include this header unless you use one of its functions. sc_prohibit_inttostr_without_use: @h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \ $(_sc_header_without_use) # Don't include this header unless you use one of its functions. sc_prohibit_ignore_value_without_use: @h='ignore-value.h' re='\<ignore_(value|ptr) *\(' \ $(_sc_header_without_use) # Don't include this header unless you use one of its functions. sc_prohibit_error_without_use: @h='error.h' \ re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\ $(_sc_header_without_use) # Don't include xalloc.h unless you use one of its functions. # Consider these symbols: # perl -lne '/^# *define (\w+)\(/ and print $1' lib/xalloc.h|grep -v '^__'; # perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/xalloc.h # Divide into two sets on case, and filter each through this: # | sort | perl -MRegexp::Assemble -le \ # 'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed 's/\?://g' # Note this was produced by the above: # _xa1 = \ #x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup) # But we can do better, in at least two ways: # 1) take advantage of two "dup"-suffixed strings: # x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup) # 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable # "char|[cmz]" # x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) _xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) _xa2 = X([CZ]|N?M)ALLOC sc_prohibit_xalloc_without_use: @h='xalloc.h' \ re='\<($(_xa1)|$(_xa2)) *\('\ $(_sc_header_without_use) # Extract function names: # perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h _hash_re = \ clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning _hash_fn = \<($(_hash_re)) *\( _hash_struct = (struct )?\<[Hh]ash_(table|tuning)\> sc_prohibit_hash_without_use: @h='hash.h' \ re='$(_hash_fn)|$(_hash_struct)'\ $(_sc_header_without_use) sc_prohibit_cloexec_without_use: @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ $(_sc_header_without_use) sc_prohibit_posixver_without_use: @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use) sc_prohibit_same_without_use: @h='same.h' re='\<same_name *\(' $(_sc_header_without_use) sc_prohibit_hash_pjw_without_use: @h='hash-pjw.h' \ re='\<hash_pjw\>' \ $(_sc_header_without_use) sc_prohibit_safe_read_without_use: @h='safe-read.h' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \ $(_sc_header_without_use) sc_prohibit_argmatch_without_use: @h='argmatch.h' \ re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \ $(_sc_header_without_use) sc_prohibit_canonicalize_without_use: @h='canonicalize.h' \ re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \ $(_sc_header_without_use) sc_prohibit_root_dev_ino_without_use: @h='root-dev-ino.h' \ re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \ $(_sc_header_without_use) sc_prohibit_openat_without_use: @h='openat.h' \ re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \ $(_sc_header_without_use) # Prohibit the inclusion of c-ctype.h without an actual use. ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\ |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper sc_prohibit_c_ctype_without_use: @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \ $(_sc_header_without_use) _empty = _sp = $(_empty) $(_empty) # The following list was generated by running: # man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \ # | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt _sig_functions = \ bsd_signal kill killpg pthread_kill pthread_sigmask raise sigaction \ sigaddset sigaltstack sigdelset sigemptyset sigfillset sighold sigignore \ siginterrupt sigismember signal sigpause sigpending sigprocmask sigqueue \ sigrelse sigset sigsuspend sigtimedwait sigwait sigwaitinfo _sig_function_re = $(subst $(_sp),|,$(strip $(_sig_functions))) # The following were extracted from "man signal.h" manually. _sig_types_and_consts = \ MINSIGSTKSZ SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK \ SA_RESETHAND SA_RESTART SA_SIGINFO SIGEV_NONE SIGEV_SIGNAL \ SIGEV_THREAD SIGSTKSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SS_DISABLE \ SS_ONSTACK mcontext_t pid_t sig_atomic_t sigevent siginfo_t sigset_t \ sigstack sigval stack_t ucontext_t # generated via this: # perl -lne '/^#ifdef (SIG\w+)/ and print $1' lib/sig2str.c|sort -u|fmt -70 _sig_names = \ SIGABRT SIGALRM SIGALRM1 SIGBUS SIGCANCEL SIGCHLD SIGCLD SIGCONT \ SIGDANGER SIGDIL SIGEMT SIGFPE SIGFREEZE SIGGRANT SIGHUP SIGILL \ SIGINFO SIGINT SIGIO SIGIOT SIGKAP SIGKILL SIGKILLTHR SIGLOST SIGLWP \ SIGMIGRATE SIGMSG SIGPHONE SIGPIPE SIGPOLL SIGPRE SIGPROF SIGPWR \ SIGQUIT SIGRETRACT SIGSAK SIGSEGV SIGSOUND SIGSTKFLT SIGSTOP SIGSYS \ SIGTERM SIGTHAW SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 \ SIGUSR2 SIGVIRT SIGVTALRM SIGWAITING SIGWINCH SIGWIND SIGWINDOW \ SIGXCPU SIGXFSZ _sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts))) # Prohibit the inclusion of signal.h without an actual use. sc_prohibit_signal_without_use: @h='signal.h' \ re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \ $(_sc_header_without_use) # Don't include stdio--.h unless you use one of its functions. sc_prohibit_stdio--_without_use: @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\(' \ $(_sc_header_without_use) # Don't include stdio-safer.h unless you use one of its functions. sc_prohibit_stdio-safer_without_use: @h='stdio-safer.h' re='\<((f(re)?|p)open|tmpfile)_safer *\(' \ $(_sc_header_without_use) # Prohibit the inclusion of strings.h without a sensible use. # Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible. sc_prohibit_strings_without_use: @h='strings.h' \ re='\<(strn?casecmp|ffs(ll)?)\>' \ $(_sc_header_without_use) # Get the list of symbol names with this: # perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt _intprops_names = \ TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \ TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \ INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND \ INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW \ INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW \ INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW \ INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \ INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW \ INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW _intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names))) # Prohibit the inclusion of intprops.h without an actual use. sc_prohibit_intprops_without_use: @h='intprops.h' \ re='\<($(_intprops_syms_re)) *\(' \ $(_sc_header_without_use) _stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t # Prohibit the inclusion of stddef.h without an actual use. sc_prohibit_stddef_without_use: @h='stddef.h' \ re='\<($(_stddef_syms_re))\>' \ $(_sc_header_without_use) _de1 = dirfd|(close|(fd)?open|read|rewind|seek|tell)dir(64)?(_r)? _de2 = (versionsort|struct dirent|getdirentries|alphasort|scandir(at)?)(64)? _de3 = MAXNAMLEN|DIR|ino_t|d_ino|d_fileno|d_namlen _dirent_syms_re = $(_de1)|$(_de2)|$(_de3) # Prohibit the inclusion of dirent.h without an actual use. sc_prohibit_dirent_without_use: @h='dirent.h' \ re='\<($(_dirent_syms_re))\>' \ $(_sc_header_without_use) # Prohibit the inclusion of verify.h without an actual use. sc_prohibit_verify_without_use: @h='verify.h' \ re='\<(verify(true|expr)?|static_assert) *\(' \ $(_sc_header_without_use) # Don't include xfreopen.h unless you use one of its functions. sc_prohibit_xfreopen_without_use: @h='xfreopen.h' re='\<xfreopen *\(' $(_sc_header_without_use) sc_obsolete_symbols: @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ halt='do not use HAVE''_FCNTL_H or O'_NDELAY \ $(_sc_search_regexp) # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ # Each nonempty ChangeLog line must start with a year number, or a TAB. sc_changelog: @prohibit='^[^12 ]' \ in_vc_files='^ChangeLog$$' \ halt='found unexpected prefix in a ChangeLog' \ $(_sc_search_regexp) # Ensure that each .c file containing a "main" function also # calls set_program_name. sc_program_name: @require='set_program_name *\(m?argv\[0\]\);' \ in_vc_files='\.c$$' \ containing='\<main *(' \ halt='the above files do not call set_program_name' \ $(_sc_search_regexp) # Ensure that each .c file containing a "main" function also # calls bindtextdomain. sc_bindtextdomain: @require='bindtextdomain *\(' \ in_vc_files='\.c$$' \ containing='\<main *(' \ halt='the above files do not call bindtextdomain' \ $(_sc_search_regexp) # Require that the final line of each test-lib.sh-using test be this one: # Exit $fail # Note: this test requires GNU grep's --label= option. Exit_witness_file ?= tests/test-lib.sh Exit_base := $(notdir $(Exit_witness_file)) sc_require_test_exit_idiom: @if test -f $(srcdir)/$(Exit_witness_file); then \ die=0; \ for i in $$(grep -l -F 'srcdir/$(Exit_base)' \ $$($(VC_LIST) tests)); do \ tail -n1 $$i | grep '^Exit .' > /dev/null \ && : || { die=1; echo $$i; } \ done; \ test $$die = 1 && \ { echo 1>&2 '$(ME): the final line in each of the above is not:'; \ echo 1>&2 'Exit something'; \ exit 1; } || :; \ fi sc_trailing_blank: @prohibit='[ ]$$' \ halt='found trailing blank(s)' \ $(_sc_search_regexp) # Match lines like the following, but where there is only one space # between the options and the description: # -D, --all-repeated[=delimit-method] print all duplicate lines\n longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)? sc_two_space_separator_in_usage: @prohibit='^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \ halt='help2man requires at least two spaces between an option and its description'\ $(_sc_search_regexp) # A regexp matching function names like "error" that may be used # to emit translatable messages. _gl_translatable_diag_func_re ?= error # Look for diagnostics that aren't marked for translation. # This won't find any for which error's format string is on a separate line. sc_unmarked_diagnostics: @grep -nE \ '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \ $$($(VC_LIST_EXCEPT)) \ | grep -Ev '(_|ngettext ?)\(' && \ { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \ exit 1; } || : # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) sc_useless_cpp_parens: @prohibit='^# *if .*defined *\(' \ halt='found useless parentheses in cpp directive' \ $(_sc_search_regexp) # List headers for which HAVE_HEADER_H is always true, assuming you are # using the appropriate gnulib module. CAUTION: for each "unnecessary" # #if HAVE_HEADER_H that you remove, be sure that your project explicitly # requires the gnulib module that guarantees the usability of that header. gl_assured_headers_ = \ cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g' # Convert the list of names to upper case, and replace each space with "|". az_ = abcdefghijklmnopqrstuvwxyz AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ gl_header_upper_case_or_ = \ $$($(gl_assured_headers_) \ | tr $(az_)/.- $(AZ_)___ \ | tr -s ' ' '|' \ ) sc_prohibit_always_true_header_tests: @or=$(gl_header_upper_case_or_); \ re="HAVE_($$or)_H"; \ prohibit='\<'"$$re"'\>' \ halt=$$(printf '%s\n' \ 'do not test the above HAVE_<header>_H symbol(s);' \ ' with the corresponding gnulib module, they are always true') \ $(_sc_search_regexp) # ================================================================== gl_other_headers_ ?= \ intprops.h \ openat.h \ stat-macros.h # Perl -lne code to extract "significant" cpp-defined symbols from a # gnulib header file, eliminating a few common false-positives. # The exempted names below are defined only conditionally in gnulib, # and hence sometimes must/may be defined in application code. gl_extract_significant_defines_ = \ /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\ && $$2 !~ /(?:rpl_|_used_without_)/\ && $$1 !~ /^(?:NSIG|ENODATA)$$/\ && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\ and print $$1 # Create a list of regular expressions matching the names # of macros that are guaranteed to be defined by parts of gnulib. define def_sym_regex gen_h=$(gl_generated_headers_); \ (cd $(gnulib_dir)/lib; \ for f in *.in.h $(gl_other_headers_); do \ test -f $$f \ && perl -lne '$(gl_extract_significant_defines_)' $$f; \ done; \ ) | sort -u \ | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/' endef # Don't define macros that we already get from gnulib header files. sc_prohibit_always-defined_macros: @if test -d $(gnulib_dir); then \ case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \ echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \ esac; \ $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \ && { echo '$(ME): define the above via some gnulib .h file' \ 1>&2; exit 1; } || :; \ fi # ================================================================== # Prohibit checked in backup files. sc_prohibit_backup_files: @$(VC_LIST) | grep '~$$' && \ { echo '$(ME): found version controlled backup file' 1>&2; \ exit 1; } || : # Require the latest GPL. sc_GPL_version: @prohibit='either ''version [^3]' \ halt='GPL vN, N!=3' \ $(_sc_search_regexp) # Require the latest GFDL. Two regexp, since some .texi files end up # line wrapping between 'Free Documentation License,' and 'Version'. _GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any) sc_GFDL_version: @prohibit='$(_GFDL_regexp)' \ halt='GFDL vN, N!=3' \ $(_sc_search_regexp) # Don't use Texinfo's @acronym{}. # http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$ sc_texinfo_acronym: @prohibit='@acronym\{' \ in_vc_files='$(texinfo_suffix_re_)' \ halt='found use of Texinfo @acronym{}' \ $(_sc_search_regexp) cvs_keywords = \ Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State sc_prohibit_cvs_keyword: @prohibit='\$$($(cvs_keywords))\$$' \ halt='do not use CVS keyword expansion' \ $(_sc_search_regexp) # This Perl code is slightly obfuscated. Not only is each "$" doubled # because it's in a Makefile, but the $$c's are comments; we cannot # use "#" due to the way the script ends up concatenated onto one line. # It would be much more concise, and would produce better output (including # counts) if written as: # perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ... # but that would be far less efficient, reading the entire contents # of each file, rather than just the last two bytes of each. # In addition, while the code below detects both blank lines and a missing # newline at EOF, the above detects only the former. # # This is a perl script that is expected to be the single-quoted argument # to a command-line "-le". The remaining arguments are file names. # Print the name of each file that does not end in exactly one newline byte. # I.e., warn if there are blank lines (2 or more newlines), or if the # last byte is not a newline. However, currently we don't complain # about any file that contains exactly one byte. # Exit nonzero if at least one such file is found, otherwise, exit 0. # Warn about, but otherwise ignore open failure. Ignore seek/read failure. # # Use this if you want to remove trailing empty lines from selected files: # perl -pi -0777 -e 's/\n\n+$/\n/' files... # require_exactly_one_NL_at_EOF_ = \ foreach my $$f (@ARGV) \ { \ open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next; \ my $$p = sysseek (F, -2, 2); \ my $$c = "seek failure probably means file has < 2 bytes; ignore"; \ my $$last_two_bytes; \ defined $$p and $$p = sysread F, $$last_two_bytes, 2; \ close F; \ $$c = "ignore read failure"; \ $$p && ($$last_two_bytes eq "\n\n" \ || substr ($$last_two_bytes,1) ne "\n") \ and (print $$f), $$fail=1; \ } \ END { exit defined $$fail } sc_prohibit_empty_lines_at_EOF: @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \ || { echo '$(ME): empty line(s) or no newline at EOF' \ 1>&2; exit 1; } || : # Make sure we don't use st_blocks. Use ST_NBLOCKS instead. # This is a bit of a kludge, since it prevents use of the string # even in comments, but for now it does the job with no false positives. sc_prohibit_stat_st_blocks: @prohibit='[.>]st_blocks' \ halt='do not use st_blocks; use ST_NBLOCKS' \ $(_sc_search_regexp) # Make sure we don't define any S_IS* macros in src/*.c files. # They're already defined via gnulib's sys/stat.h replacement. sc_prohibit_S_IS_definition: @prohibit='^ *# *define *S_IS' \ halt='do not define S_IS* macros; include <sys/stat.h>' \ $(_sc_search_regexp) # Perl block to convert a match to FILE_NAME:LINENO:TEST, # that is shared by two definitions below. perl_filename_lineno_text_ = \ -e ' {' \ -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \ -e ' ($$v = $$&) =~ s/\n/\\n/g;' \ -e ' print "$$ARGV:$$n:$$v\n";' \ -e ' }' prohibit_doubled_word_RE_ ?= \ /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims prohibit_doubled_word_ = \ -e 'while ($(prohibit_doubled_word_RE_))' \ $(perl_filename_lineno_text_) # Define this to a regular expression that matches # any filename:dd:match lines you want to ignore. # The default is to ignore no matches. ignore_doubled_word_match_RE_ ?= ^$$ sc_prohibit_doubled_word: @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \ | grep -vE '$(ignore_doubled_word_match_RE_)' \ | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || : # A regular expression matching undesirable combinations of words like # "can not"; this matches them even when the two words appear on different # lines, but not when there is an intervening delimiter like "#" or "*". prohibit_undesirable_word_seq_RE_ ?= \ /\bcan\s+not\b/gims prohibit_undesirable_word_seq_ = \ -e 'while ($(prohibit_undesirable_word_seq_RE_))' \ $(perl_filename_lineno_text_) # Define this to a regular expression that matches # any filename:dd:match lines you want to ignore. # The default is to ignore no matches. ignore_undesirable_word_sequence_RE_ ?= ^$$ sc_prohibit_undesirable_word_seq: @perl -n -0777 $(prohibit_undesirable_word_seq_) \ $$($(VC_LIST_EXCEPT)) \ | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \ && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || : _ptm1 = use "test C1 && test C2", not "test C1 -''a C2" _ptm2 = use "test C1 || test C2", not "test C1 -''o C2" # Using test's -a and -o operators is not portable. # We prefer test over [, since the latter is spelled [[ in configure.ac. sc_prohibit_test_minus_ao: @prohibit='(\<test| \[+) .+ -[ao] ' \ halt='$(_ptm1); $(_ptm2)' \ $(_sc_search_regexp) # Avoid a test bashism. sc_prohibit_test_double_equal: @prohibit='(\<test| \[+) .+ == ' \ containing='#! */bin/[a-z]*sh' \ halt='use "test x = x", not "test x =''= x"' \ $(_sc_search_regexp) # Each program that uses proper_name_utf8 must link with one of the # ICONV libraries. Otherwise, some ICONV library must appear in LDADD. # The perl -0777 invocation below extracts the possibly-multi-line # definition of LDADD from the appropriate Makefile.am and exits 0 # when it contains "ICONV". sc_proper_name_utf8_requires_ICONV: @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\ if test "x$$progs" != x; then \ fail=0; \ for p in $$progs; do \ dir=$$(dirname "$$p"); \ perl -0777 \ -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \ $$dir/Makefile.am && continue; \ base=$$(basename "$$p" .c); \ grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \ done; \ test $$fail = 1 && \ { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \ exit 1; } || :; \ fi # Warn about "c0nst struct Foo const foo[]", # but not about "char const *const foo" or "#define const const". sc_redundant_const: @prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \ halt='redundant "const" in declarations' \ $(_sc_search_regexp) sc_const_long_option: @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \ | grep -Ev 'const struct option|struct option const' && { \ echo 1>&2 '$(ME): add "const" to the above declarations'; \ exit 1; } || : NEWS_hash = \ $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ $(srcdir)/NEWS \ | perl -0777 -pe \ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ | md5sum - \ | sed 's/ .*//') # Ensure that we don't accidentally insert an entry into an old NEWS block. sc_immutable_NEWS: @if test -f $(srcdir)/NEWS; then \ test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \ { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \ fi # Update the hash stored above. Do this after each release and # for any corrections to old entries. update-NEWS-hash: NEWS perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \ $(srcdir)/cfg.mk # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. # However, there is still one case in which @VAR@ use is not just # legitimate, but actually required: when augmenting an automake-defined # variable with a prefix. For example, gettext uses this: # MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ # otherwise, makeinfo would put German or French (current locale) # navigation hints in the otherwise-English documentation. # # Allow the package to add exceptions via a hook in cfg.mk; # for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. _makefile_at_at_check_exceptions ?= sc_makefile_at_at_check: @perl -ne '/\@[A-Z_0-9]+\@/' \ -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/' \ -e ''$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \ | grep -E $(news-check-regexp) >/dev/null; then \ :; \ else \ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ exit 1; \ fi sc_makefile_TAB_only_indentation: @prohibit='^ [ ]{8}' \ in_vc_files='akefile|\.mk$$' \ halt='found TAB-8-space indentation' \ $(_sc_search_regexp) sc_m4_quote_check: @prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \ in_vc_files='(^configure\.ac|\.m4)$$' \ halt='quote the first arg to AC_DEF*' \ $(_sc_search_regexp) fix_po_file_diag = \ 'you have changed the set of files with translatable diagnostics;\n\ apply the above patch\n' # Verify that all source files using _() are listed in po/POTFILES.in. po_file ?= $(srcdir)/po/POTFILES.in generated_files ?= $(srcdir)/lib/*.[ch] sc_po_check: @if test -f $(po_file); then \ grep -E -v '^(#|$$)' $(po_file) \ | grep -v '^src/false\.c$$' | sort > $@-1; \ files=; \ for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \ test -r $$file || continue; \ case $$file in \ *.m4|*.mk) continue ;; \ *.?|*.??) ;; \ *) continue;; \ esac; \ case $$file in \ *.[ch]) \ base=`expr " $$file" : ' \(.*\)\..'`; \ { test -f $$base.l || test -f $$base.y; } && continue;; \ esac; \ files="$$files $$file"; \ done; \ grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ rm -f $@-1 $@-2; \ fi # Sometimes it is useful to change the PATH environment variable # in Makefiles. When doing so, it's better not to use the Unix-centric # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'. msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead' sc_makefile_path_separator_check: @prohibit='PATH[=].*:' \ in_vc_files='akefile|\.mk$$' \ halt=$(msg) \ $(_sc_search_regexp) # Check that 'make alpha' will not fail at the end of the process, # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release) # and is read-only. writable-files: if test -d $(release_archive_dir); then \ for file in $(DIST_ARCHIVES); do \ for p in ./ $(release_archive_dir)/; do \ test -e $$p$$file || continue; \ test -w $$p$$file \ || { echo ERROR: $$p$$file is not writable; fail=1; }; \ done; \ done; \ test "$$fail" && exit 1 || : ; \ else :; \ fi v_etc_file = $(gnulib_dir)/lib/version-etc.c sample-test = tests/sample-test texi = doc/$(PACKAGE).texi # Make sure that the copyright date in $(v_etc_file) is up to date. # Do the same for the $(sample-test) and the main doc/.texi file. sc_copyright_check: @require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \ in_files=$(v_etc_file) \ halt='out of date copyright in $(v_etc_file); update it' \ $(_sc_search_regexp) @require='# Copyright \(C\) '$$(date +%Y)' Free' \ in_vc_files=$(sample-test) \ halt='out of date copyright in $(sample-test); update it' \ $(_sc_search_regexp) @require='Copyright @copyright\{\} .*'$$(date +%Y)' Free' \ in_vc_files=$(texi) \ halt='out of date copyright in $(texi); update it' \ $(_sc_search_regexp) # If tests/help-version exists and seems to be new enough, assume that its # use of init.sh and path_prepend_ is correct, and ensure that every other # use of init.sh is identical. # This is useful because help-version cross-checks prog --version # with $(VERSION), which verifies that its path_prepend_ invocation # sets PATH correctly. This is an inexpensive way to ensure that # the other init.sh-using tests also get it right. _hv_file ?= $(srcdir)/tests/help-version _hv_regex_weak ?= ^ *\. .*/init\.sh" # Fix syntax-highlighters " _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh" sc_cross_check_PATH_usage_in_tests: @if test -f $(_hv_file); then \ grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \ || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \ exit 0; }; \ grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \ || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \ exit 1; }; \ good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \ grep -LFx "$$good" \ $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \ | grep . && \ { echo "$(ME): the above files use path_prepend_ inconsistently" \ 1>&2; exit 1; } || :; \ fi # BRE regex of file contents to identify a test script. _test_script_regex ?= \<init\.sh\> # In tests, use "compare expected actual", not the reverse. sc_prohibit_reversed_compare_failure: @prohibit='\<compare [^ ]+ ([^ ]*exp|/dev/null)' \ containing='$(_test_script_regex)' \ halt='reversed compare arguments' \ $(_sc_search_regexp) # #if HAVE_... will evaluate to false for any non numeric string. # That would be flagged by using -Wundef, however gnulib currently # tests many undefined macros, and so we can't enable that option. # So at least preclude common boolean strings as macro values. sc_Wundef_boolean: @prohibit='^#define.*(yes|no|true|false)$$' \ in_files='$(CONFIG_INCLUDE)' \ halt='Use 0 or 1 for macro values' \ $(_sc_search_regexp) # Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might # not be constant, or might overflow a stack. In general, use PATH_MAX as # a limit, not an array or alloca size. sc_prohibit_path_max_allocation: @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX' \ halt='Avoid stack allocations of size PATH_MAX' \ $(_sc_search_regexp) sc_vulnerable_makefile_CVE-2009-4029: @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \ in_files=$$(find $(srcdir) -name Makefile.in) \ halt=$$(printf '%s\n' \ 'the above files are vulnerable; beware of running' \ ' "make dist*" rules, and upgrade to fixed automake' \ ' see http://bugzilla.redhat.com/542609 for details') \ $(_sc_search_regexp) vc-diff-check: (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || : if test -s vc-diffs; then \ cat vc-diffs; \ echo "Some files are locally modified:" 1>&2; \ exit 1; \ else \ rm vc-diffs; \ fi rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib gnulib-version = $$(cd $(gnulib_dir) && git describe) bootstrap-tools ?= autoconf,automake,gnulib # If it's not already specified, derive the GPG key ID from # the signed tag we've just applied to mark this release. gpg_key_ID ?= \ $$(git cat-file tag v$(VERSION) \ | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \ | sed -n '/^\[GNUPG:\] ERRSIG /{s///;s/ .*//p;q}') translation_project_ ?= coordinator@translationproject.org # Make info-gnu the default only for a stable release. ifeq ($(RELEASE_TYPE),stable) announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT) announcement_mail_headers_ ?= \ To: info-gnu@gnu.org \ Cc: $(announcement_Cc_) \ Mail-Followup-To: $(PACKAGE_BUGREPORT) else announcement_Cc_ ?= $(translation_project_) announcement_mail_headers_ ?= \ To: $(PACKAGE_BUGREPORT) \ Cc: $(announcement_Cc_) endif announcement: NEWS ChangeLog $(rel-files) @$(srcdir)/$(_build-aux)/announce-gen \ --mail-headers='$(announcement_mail_headers_)' \ --release-type=$(RELEASE_TYPE) \ --package=$(PACKAGE) \ --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --gpg-key-id=$(gpg_key_ID) \ --news=$(srcdir)/NEWS \ --bootstrap-tools=$(bootstrap-tools) \ --gnulib-version=$(gnulib-version) \ --no-print-checksums \ $(addprefix --url-dir=, $(url_dir_list)) ## ---------------- ## ## Updating files. ## ## ---------------- ## ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org upload_dest_dir_ ?= $(PACKAGE) emit_upload_commands: @echo ===================================== @echo ===================================== @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\" @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\" @echo " $(rel-files)" @echo '# send the ~/announce-$(my_distdir) e-mail' @echo ===================================== @echo ===================================== define emit-commit-log printf '%s\n' 'maint: post-release administrivia' '' \ '* NEWS: Add header line for next release.' \ '* .prev-version: Record previous version.' \ '* cfg.mk (old_NEWS_hash): Auto-update.' endef .PHONY: no-submodule-changes no-submodule-changes: if test -d $(srcdir)/.git; then \ diff=$$(cd $(srcdir) && git submodule -q foreach \ git diff-index --name-only HEAD) \ || exit 1; \ case $$diff in '') ;; \ *) echo '$(ME): submodule files are locally modified:'; \ echo "$$diff"; exit 1;; esac; \ else \ : ; \ fi submodule-checks ?= no-submodule-changes public-submodule-commit # Ensure that each sub-module commit we're using is public. # Without this, it is too easy to tag and release code that # cannot be built from a fresh clone. .PHONY: public-submodule-commit public-submodule-commit: $(AM_V_GEN)if test -d $(srcdir)/.git; then \ cd $(srcdir) && \ git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \ = '$$(git merge-base origin $$sha1)' \ || { echo '$(ME): found non-public submodule commit' >&2; \ exit 1; }; \ else \ : ; \ fi # This rule has a high enough utility/cost ratio that it should be a # dependent of "check" by default. However, some of us do occasionally # commit a temporary change that deliberately points to a non-public # submodule commit, and want to be able to use rules like "make check". # In that case, run e.g., "make check gl_public_submodule_commit=" # to disable this test. gl_public_submodule_commit ?= public-submodule-commit check: $(gl_public_submodule_commit) .PHONY: alpha beta stable ALL_RECURSIVE_TARGETS += alpha beta stable alpha beta stable: $(local-check) writable-files $(submodule-checks) test $@ = stable \ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ || : $(MAKE) vc-diff-check $(MAKE) news-check $(MAKE) distcheck $(MAKE) dist XZ_OPT=-9ev $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@ $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ # Override this in cfg.mk if you follow different procedures. release-prep-hook ?= release-prep gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?] .PHONY: release-prep release-prep: case $$RELEASE_TYPE in alpha|beta|stable) ;; \ *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac $(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir) if test -d $(release_archive_dir); then \ ln $(rel-files) $(release_archive_dir); \ chmod a-w $(rel-files); \ fi echo $(VERSION) > $(prev_version_file) $(MAKE) update-NEWS-hash perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS $(emit-commit-log) > .ci-msg $(VC) commit -F .ci-msg -a rm .ci-msg # Override this with e.g., -s $(srcdir)/some_other_name.texi # if the default $(PACKAGE)-derived name doesn't apply. gendocs_options_ ?= .PHONY: web-manual web-manual: @test -z "$(manual_title)" \ && { echo define manual_title in cfg.mk 1>&2; exit 1; } || : @cd '$(srcdir)/doc'; \ $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \ -o '$(abs_builddir)/doc/manual' \ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ "$(PACKAGE_NAME) - $(manual_title)" @echo " *** Upload the doc/manual directory to web-cvs." # Code Coverage init-coverage: $(MAKE) $(AM_MAKEFLAGS) clean lcov --directory . --zerocounters COVERAGE_CCOPTS ?= "-g --coverage" COVERAGE_OUT ?= doc/coverage build-coverage: $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check mkdir -p $(COVERAGE_OUT) lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \ --capture gen-coverage: genhtml --output-directory $(COVERAGE_OUT) \ $(COVERAGE_OUT)/$(PACKAGE).info \ --highlight --frames --legend \ --title "$(PACKAGE_NAME)" coverage: init-coverage build-coverage gen-coverage # Update gettext files. PACKAGE ?= $(shell basename $(PWD)) PO_DOMAIN ?= $(PACKAGE) POURL = http://translationproject.org/latest/$(PO_DOMAIN)/ PODIR ?= po refresh-po: rm -f $(PODIR)/*.po && \ echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \ wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \ echo 'en@boldquot' > $(PODIR)/LINGUAS && \ echo 'en@quot' >> $(PODIR)/LINGUAS && \ ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS # Running indent once is not idempotent, but running it twice is. INDENT_SOURCES ?= $(C_SOURCES) .PHONY: indent indent: indent $(INDENT_SOURCES) indent $(INDENT_SOURCES) # If you want to set UPDATE_COPYRIGHT_* environment variables, # put the assignments in this variable. update-copyright-env ?= # Run this rule once per year (usually early in January) # to update all FSF copyright year lists in your project. # If you have an additional project-specific rule, # add it in cfg.mk along with a line 'update-copyright: prereq'. # By default, exclude all variants of COPYING; you can also # add exemptions (such as ChangeLog..* for rotated change logs) # in the file .x-update-copyright. .PHONY: update-copyright update-copyright: grep -l -w Copyright \ $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ # This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not # overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. # NOTE: to override any _gl_TS_* default value, you must # define the variable(s) using "export" in cfg.mk. _gl_TS_dir ?= src ALL_RECURSIVE_TARGETS += sc_tight_scope sc_tight_scope: tight-scope.mk @fail=0; \ if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \ > /dev/null \ && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \ > /dev/null 2>&1; then \ echo '$(ME): skipping $@'; \ else \ $(MAKE) -s -C $(_gl_TS_dir) \ -f Makefile \ -f $(abs_top_srcdir)/cfg.mk \ -f $(abs_top_builddir)/$< \ _gl_tight_scope \ || fail=1; \ fi; \ rm -f $<; \ exit $$fail tight-scope.mk: $(ME) @rm -f $@ $@-t @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t @chmod a=r $@-t && mv $@-t $@ ifeq (a,b) # TS-start # Most functions should have static scope. # Any that don't must be marked with 'extern', but 'main' # and 'usage' are exceptions: they're always extern, but # do not need to be marked. Symbols matching '__.*' are # reserved by the compiler, so are automatically excluded below. _gl_TS_unmarked_extern_functions ?= main usage _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/ # If your project uses a macro like "XTERN", then put # the following in cfg.mk to override this default: # export _gl_TS_extern = extern|XTERN _gl_TS_extern ?= extern # The second nm|grep checks for file-scope variables with 'extern' scope. # Without gnulib's progname module, you might put program_name here. # Symbols matching '__.*' are reserved by the compiler, # so are automatically excluded below. _gl_TS_unmarked_extern_vars ?= # NOTE: the _match variables are perl expressions -- not mere regular # expressions -- so that you can extend them to match other patterns # and easily extract matched variable names. # For example, if your project declares some global variables via # a macro like this: GLOBAL(type, var_name, initializer), then you # can override this definition to automatically extract those names: # export _gl_TS_var_match = \ # /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/ _gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/ # The names of object files in (or relative to) $(_gl_TS_dir). _gl_TS_obj_files ?= *.$(OBJEXT) # Files in which to search for the one-line style extern declarations. # $(_gl_TS_dir)-relative. _gl_TS_headers ?= $(noinst_HEADERS) .PHONY: _gl_tight_scope _gl_tight_scope: $(bin_PROGRAMS) t=exceptions-$$$$; \ trap 's=$$?; rm -f $$t; exit $$s' 0; \ for sig in 1 2 3 13 15; do \ eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \ done; \ src=`for f in $(SOURCES); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ hdr=`for f in $(_gl_TS_headers); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ grep -h -A1 '^extern .*[^;]$$' $$src \ | grep -vE '^(extern |--)' | sed 's/ .*//'; \ perl -lne \ '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr; \ ) | sort -u > $$t; \ nm -e $(_gl_TS_obj_files) | sed -n 's/.* T //p'|grep -Ev -f $$t \ && { echo the above functions should have static scope >&2; \ exit 1; } || : ; \ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \ perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \ ) | sort -u > $$t; \ nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p' \ | sort -u | grep -Ev -f $$t \ && { echo the above variables should have static scope >&2; \ exit 1; } || : # TS-end endif �������������������������������������������id-utils-4.6+git20120811/src/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465164�012173� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/fid.c������������������������������������������������������������������0000664�0000000�0000000�00000015432�12166360012�013102� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fid.c -- list all tokens in the given file(s) Copyright (C) 1986, 1995-1996, 2008-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <getopt.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> #include <alloca.h> #include <error.h> #include <pathmax.h> #include <xalloc.h> #include "closeout.h" #include "xnls.h" #include "idfile.h" #include "iduglobal.h" #include "progname.h" static int get_file_index (char *file_name); static int is_hit (unsigned char const *hits, int file_number); static int is_hit_1 (unsigned char const **hits, int level, int file_number); static void skip_hits (unsigned char const **hits, int level); void usage (void) __attribute__((__noreturn__)); struct idhead idh; static int tree8_levels; /* If nonzero, display usage information and exit. */ static int show_help; /* If nonzero, print the version on standard output then exit. */ static int show_version; /* The file name of the ID database. */ static struct file_link *cw_dlink; static struct file_link **members_0; static unsigned int bits_vec_size; static char *hits_buf; static struct option const long_options[] = { { "file", required_argument, 0, 'f' }, { "help", no_argument, &show_help, 1 }, { "version", no_argument, &show_version, 1 }, {NULL, 0, NULL, 0} }; void usage (void) { fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); exit (EXIT_FAILURE); } static void __attribute__((__noreturn__)) help_me (void) { printf (_("\ Usage: %s [OPTION] FILENAME [FILENAME2]\n\ "), program_name); printf (_("\ List identifiers that occur in FILENAME, or if FILENAME2 is\n\ also given list the identifiers that occur in both files.\n\ \n\ -f, --file=FILE file name of ID database\n\ --help display this help and exit\n\ --version output version information and exit\n\ ")); printf (_("\nReport bugs to " PACKAGE_BUGREPORT "\n\n")); exit (EXIT_SUCCESS); } int main (int argc, char **argv) { int index_1 = -1; int index_2 = -1; set_program_name (argv[0]); idh.idh_file_name = 0; #if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif atexit (close_stdout); for (;;) { int optc = getopt_long (argc, argv, "f:", long_options, (int *) 0); if (optc < 0) break; switch (optc) { case 0: break; case 'f': idh.idh_file_name = optarg; break; default: usage (); } } if (show_version) { printf ("%s - %s\n", program_name, PACKAGE_VERSION); exit (EXIT_SUCCESS); } if (show_help) help_me (); argc -= optind; argv += optind; if (argc < 1) { error (0, 0, _("no file name arguments")); usage (); } if (argc > 2) { error (0, 0, _("too many file name arguments")); usage (); } /* Look for the ID database up the tree */ idh.idh_file_name = locate_id_file_name (idh.idh_file_name); if (idh.idh_file_name == 0) error (EXIT_FAILURE, errno, _("can't locate `ID'")); init_idh_obstacks (&idh); init_idh_tables (&idh); cw_dlink = get_current_dir_link (); /* Determine absolute name of the directory name to which database constituent files are relative. */ members_0 = read_id_file (idh.idh_file_name, &idh); bits_vec_size = (idh.idh_files + 7) / 4; /* more than enough */ tree8_levels = tree8_count_levels (idh.idh_files); index_1 = get_file_index ((argc--, *argv++)); if (argc) index_2 = get_file_index ((argc--, *argv++)); if (index_1 < 0) return 1; hits_buf = xmalloc (idh.idh_buf_size); fseek (idh.idh_FILE, idh.idh_tokens_offset, SEEK_SET); { int count = 0; int i; int separator = (isatty (STDOUT_FILENO) ? ' ' : '\n'); for (i = 0; i < idh.idh_tokens; i++) { unsigned char const *hits; gets_past_00 (hits_buf, idh.idh_FILE); hits = token_hits_addr (hits_buf); if (is_hit (hits, index_1) && (index_2 < 0 || is_hit (hits, index_2))) { fputs (token_string (hits_buf), stdout); putchar (separator); count++; } } if (count && separator == ' ') putchar ('\n'); } return 0; } static int get_file_index (char *file_name) { struct file_link **members; struct file_link **end = &members_0[idh.idh_files]; struct file_link *fn_flink = 0; char *file_name_buf = alloca (PATH_MAX); int has_slash = (strchr (file_name, '/') != 0); size_t file_name_length = strlen (file_name); int idx = -1; if (strstr (file_name, "./")) fn_flink = parse_file_name (file_name, cw_dlink); for (members = members_0; members < end; members++) { struct file_link *flink = *members; if (fn_flink) { if (fn_flink != flink) continue; } else if (has_slash) { size_t member_length; maybe_relative_file_name (file_name_buf, flink, cw_dlink); member_length = strlen (file_name_buf); if (file_name_length > member_length || !strequ (&file_name_buf[member_length - file_name_length], file_name)) continue; } else if (!strequ (flink->fl_name, file_name)) continue; if (idx >= 0) { error (0, 0, _("`%s' is ambiguous"), file_name); return -1; } idx = members - members_0; } if (idx < 0) error (0, 0, _("`%s' not found"), file_name); return idx; } static int is_hit (unsigned char const *hits, int file_number) { return is_hit_1 (&hits, tree8_levels, file_number); } static int is_hit_1 (unsigned char const **hits, int level, int file_number) { int file_hit = 1 << ((file_number >> (3 * --level)) & 7); int hit = *(*hits)++; int bit; if (!(file_hit & hit)) return 0; if (level == 0) return 1; for (bit = 1; (bit < file_hit) && (bit & 0xff); bit <<= 1) { if (hit & bit) skip_hits (hits, level); } return is_hit_1 (hits, level, file_number); } void skip_hits (unsigned char const **hits, int level) { int hit = *(*hits)++; int bit; if (--level == 0) return; for (bit = 1; bit & 0xff; bit <<= 1) { if (hit & bit) skip_hits (hits, level); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/fnid.c�����������������������������������������������������������������0000664�0000000�0000000�00000011344�12166360012�013256� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fnid.c -- report which files constitute an ID database Copyright (C) 1996, 2008-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <getopt.h> #include <fnmatch.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <alloca.h> #include <xalloc.h> #include <pathmax.h> #include <error.h> #include "closeout.h" #include "xnls.h" #include "idfile.h" #include "iduglobal.h" #include "progname.h" static int show_version = 0; static int show_help = 0; static struct file_link *cw_dlink; struct idhead idh; /* How shall we separate file names? */ static enum separator_style separator_style = ss_contextual; void usage (void) __attribute__((__noreturn__)); void usage (void) { fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); exit (EXIT_FAILURE); } static struct option const long_options[] = { { "file", required_argument, 0, 'f' }, { "separator", required_argument, 0, 'S' }, { "help", no_argument, &show_help, 1 }, { "version", no_argument, &show_version, 1 }, {NULL, 0, NULL, 0} }; static void __attribute__((__noreturn__)) help_me (void) { printf (_("\ Usage: %s [OPTION]... [PATTERN]...\n\ "), program_name); printf (_("\ Print constituent file names that match PATTERN,\n\ using shell-style wildcards.\n\ -f, --file=FILE file name of ID database\n\ -S, --separator=STYLE STYLE is one of `braces', `space' or `newline'\n\ --help display this help and exit\n\ --version output version information and exit\n\ ")); printf (_("\nReport bugs to " PACKAGE_BUGREPORT "\n\n")); exit (EXIT_SUCCESS); } int main (int argc, char **argv) { set_program_name (argv[0]); idh.idh_file_name = 0; #if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif atexit (close_stdout); for (;;) { int optc = getopt_long (argc, argv, "f:S:", long_options, (int *) 0); if (optc < 0) break; switch (optc) { case 0: break; case 'f': idh.idh_file_name = optarg; break; case 'S': separator_style = parse_separator_style (optarg); break; default: usage (); } } if (show_version) { printf ("%s - %s\n", program_name, PACKAGE_VERSION); exit (EXIT_SUCCESS); } if (show_help) help_me (); if (separator_style == ss_contextual) { if (isatty (STDOUT_FILENO)) separator_style = DEFAULT_SEPARATOR_STYLE; else separator_style = ss_newline; } argc -= optind; argv += optind; if (argc == 0) { static char star[] = "*"; static char *starp = star; argc = 1; argv = &starp; } /* Look for the ID database up the tree */ idh.idh_file_name = locate_id_file_name (idh.idh_file_name); if (idh.idh_file_name == 0) error (EXIT_FAILURE, errno, _("can't locate `ID'")); init_idh_obstacks (&idh); init_idh_tables (&idh); cw_dlink = get_current_dir_link (); { struct file_link **members = read_id_file (idh.idh_file_name, &idh); struct file_link **members_N = &members[idh.idh_files]; struct file_link **flinkv_0 = xmalloc (sizeof(struct file_link *) * (idh.idh_files + 1)); struct file_link **flinkv = flinkv_0; char **patv_0 = xmalloc (sizeof(char *) * (argc * 2)); char **patv_N; char **patv = patv_0; char *file_name = alloca (PATH_MAX); for ( ; argc; argc--, argv++) { char *arg = *argv; *patv++ = arg; if (*arg != '*' && *arg != '/') { char *pat = xmalloc (strlen (arg) + 2); sprintf (pat, "*/%s", arg); *patv++ = pat; } } patv_N = patv; for ( ; members < members_N; members++) { maybe_relative_file_name (file_name, *members, cw_dlink); for (patv = patv_0; patv < patv_N; patv++) { if (fnmatch (*patv, file_name, MAYBE_FNM_CASEFOLD) == 0) { *flinkv++ = *members; break; } } } *flinkv = 0; print_filenames (flinkv_0, separator_style); } return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/lid.h������������������������������������������������������������������0000664�0000000�0000000�00000000176�11434330764�013124� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������enum lid_mode { LID_MODE_AID, LID_MODE_EID, LID_MODE_GID, LID_MODE_LID }; extern enum lid_mode lid_mode; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/xtokid.c���������������������������������������������������������������0000664�0000000�0000000�00000022145�12166360012�013641� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idx.c -- simple interface for testing scanners scanners Copyright (C) 1986, 1995-1996, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <getopt.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <assert.h> #include "argv-iter.h" #include "closeout.h" #include "error.h" #include "pathmax.h" #include "progname.h" #include "quote.h" #include "quotearg.h" #include "xalloc.h" #include "xnls.h" #include "scanners.h" #include "idfile.h" #include "iduglobal.h" static void scan_files (struct idhead *idhp); static void scan_member_file (struct member_file const *member); void usage (void) __attribute__((__noreturn__)); static char *lang_map_file_name = 0; static int show_version = 0; static int show_help = 0; struct idhead idh; static struct file_link *cw_dlink; void usage (void) { fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); exit (EXIT_FAILURE); } /* For long options that have no equivalent short option, use a non-character as a pseudo short option, starting with CHAR_MAX + 1. */ enum { FILES0_FROM_OPTION = CHAR_MAX +1, }; static struct option const long_options[] = { { "include", required_argument, 0, 'i' }, { "exclude", required_argument, 0, 'x' }, { "lang-option", required_argument, 0, 'l' }, { "lang-map", required_argument, 0, 'm' }, { "default-lang", required_argument, 0, 'd' }, { "prune", required_argument, 0, 'p' }, { "help", no_argument, &show_help, 1 }, { "version", no_argument, &show_version, 1 }, { "files0-from", required_argument, NULL, FILES0_FROM_OPTION }, {NULL, 0, NULL, 0} }; static void __attribute__((__noreturn__)) help_me (void) { printf (_("\ Usage: %s [OPTION]... [FILE]...\n\ "), program_name); printf (_("\ Print all tokens found in a source file.\n\ -i, --include=LANGS include languages in LANGS (default: \"C C++ asm\")\n\ -x, --exclude=LANGS exclude languages in LANGS\n\ -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n\ -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language\n\ -d, --default-lang=LANG make LANG the default source language\n\ -p, --prune=NAMES exclude the named files and/or directories\n\ \n\ --files0-from=F tokenize only the files specified by\n\ NUL-terminated names in file F\n\ \n\ --help display this help and exit\n \ --version output version information and exit\n\ \n\ The following arguments apply to the language-specific scanners:\n\ ")); language_help_me (); printf (_("\nReport bugs to " PACKAGE_BUGREPORT "\n\n")); exit (EXIT_SUCCESS); } int main (int argc, char **argv) { bool ok; int nfiles; char *files_from = NULL; set_program_name (argv[0]); #if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif atexit (close_stdout); for (;;) { int optc = getopt_long (argc, argv, "i:x:l:m:d:p:", long_options, (int *) 0); if (optc < 0) break; switch (optc) { case 0: break; case 'i': include_languages (optarg); break; case 'x': exclude_languages (optarg); break; case 'l': language_save_arg (optarg); break; case 'm': lang_map_file_name = optarg; break; case 'd': set_default_language (optarg); break; case 'p': if (cw_dlink == 0) cw_dlink = init_walker (&idh); prune_file_names (optarg, cw_dlink); break; case FILES0_FROM_OPTION: files_from = optarg; break; default: usage (); } } if (show_version) { printf ("%s - %s\n", program_name, PACKAGE_VERSION); exit (EXIT_SUCCESS); } if (show_help) help_me (); nfiles = argc - optind; struct argv_iterator *ai; if (files_from) { /* When using --files0-from=F, you may not specify any files on the command-line. */ if (nfiles != 0) { error (0, 0, _("extra operand %s"), quote (argv[optind])); fprintf (stderr, "%s\n", _("file operands cannot be combined with --files0-from")); usage(); } if (! (strequ (files_from, "-") || freopen (files_from, "r", stdin))) error (EXIT_FAILURE, errno, _("cannot open %s for reading"), quote (files_from)); ai = argv_iter_init_stream (stdin); } else { static char *cwd_only[2]; cwd_only[0] = bad_cast ("."); cwd_only[1] = NULL; char **files = (optind < argc ? argv + optind : cwd_only); ai = argv_iter_init_argv (files); } language_getopt (); if (cw_dlink == 0) cw_dlink = init_walker (&idh); parse_language_map (lang_map_file_name); /* Walk the file and directory names given on the command line. */ ok = true; while (true) { bool skip_file = false; enum argv_iter_err ai_err; char *file_name = argv_iter (ai, &ai_err); if (ai_err == AI_ERR_EOF) break; if (!file_name) { switch (ai_err) { case AI_ERR_READ: error (0, errno, _("%s: read error"), quote (files_from)); continue; case AI_ERR_MEM: xalloc_die (); default: assert (!"unexpected error code from argv_iter"); } } if (files_from && STREQ (files_from, "-") && STREQ (file_name, "-")) { /* Give a better diagnostic in an unusual case: printf - | du --files0-from=- */ error (0, 0, _("when reading file names from stdin, " "no file name of %s allowed"), quote (file_name)); skip_file = true; } /* Report and skip any empty file names. */ if (!file_name[0]) { /* Diagnose a zero-length file name. When it's one among many, knowing the record number may help. FIXME: currently print the record number only with --files0-from=FILE. Maybe do it for argv, too? */ if (files_from == NULL) error (0, 0, "%s", _("invalid zero-length file name")); else { /* Using the standard `filename:line-number:' prefix here is not totally appropriate, since NUL is the separator, not NL, but it might be better than nothing. */ unsigned long int file_number = argv_iter_n_args (ai); error (0, 0, "%s:%lu: %s", quotearg_colon (files_from), file_number, _("invalid zero-length file name")); } skip_file = true; } if (skip_file) ok = false; else { struct file_link *flink = parse_file_name (file_name, cw_dlink); if (flink) walk_flink (flink, 0); /* FIXME: walk_flink can fail, so should return status. Then caller can continue with other arguments. */ } } argv_iter_free (ai); mark_member_file_links (&idh); obstack_init (&tokens_obstack); scan_files (&idh); exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } static void scan_files (struct idhead *idhp) { struct member_file **members_0 = (struct member_file **) hash_dump (&idhp->idh_member_file_table, 0, member_file_qsort_compare); struct member_file **end = &members_0[idhp->idh_member_file_table.ht_fill]; struct member_file **members; if (largest_member_file > MAX_LARGEST_MEMBER_FILE) largest_member_file = MAX_LARGEST_MEMBER_FILE; scanner_buffer = xmalloc (largest_member_file + 1); for (members = members_0; members < end; members++) scan_member_file (*members); free (scanner_buffer); free (members_0); } static void scan_member_file (struct member_file const *member) { struct lang_args const *lang_args = member->mf_lang_args; struct language const *lang = lang_args->la_language; get_token_func_t get_token = lang->lg_get_token; struct file_link *flink = member->mf_link; FILE *source_FILE; chdir_to_link (flink->fl_parent); source_FILE = fopen (flink->fl_name, "r"); if (source_FILE) { void const *args = lang_args->la_args_digested; int flags; struct token *token; while ((token = (*get_token) (source_FILE, args, &flags)) != NULL) { puts (TOKEN_NAME (token)); obstack_free (&tokens_obstack, token); } fclose (source_FILE); } else error (0, errno, _("can't open `%s'"), flink->fl_name); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/lid-aid.c��������������������������������������������������������������0000664�0000000�0000000�00000000070�11434330764�013643� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "lid.h" enum lid_mode lid_mode = LID_MODE_AID; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/mkid.c�����������������������������������������������������������������0000664�0000000�0000000�00000071406�12204226501�013264� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* mkid.c -- build an identifer database Copyright (C) 1986, 1995-1996, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <assert.h> #include <stdio.h> #include <errno.h> #include <getopt.h> #include <unistd.h> #include <string.h> #include <sys/stat.h> #include <limits.h> #include "alloca.h" #include "argv-iter.h" #include "closeout.h" #include "dirname.h" #include "error.h" #include "inttostr.h" #include "pathmax.h" #include "progname.h" #include "quote.h" #include "quotearg.h" #include "xalloc.h" #include "xnls.h" #include "idfile.h" #include "idu-hash.h" #include "scanners.h" #include "iduglobal.h" struct summary { struct token **sum_tokens; unsigned char const *sum_hits; struct summary *sum_parent; union { struct summary *u_kids[8]; /* when sum_level > 0 */ #define sum_kids sum_u.u_kids struct member_file *u_files[8]; /* when sum_level == 0 */ } sum_u; unsigned long sum_tokens_size; unsigned long sum_hits_count; int sum_free_index; int sum_level; }; void usage (void); static int ceil_log_8 (unsigned long n); static int ceil_log_2 (unsigned long n); static void assert_writeable (char const *file_name); static void scan_files (struct idhead const *idhp); static void scan_member_file (struct member_file const *member); static void scan_member_file_1 (get_token_func_t get_token, void const *args, FILE *source_FILE); static void report_statistics (void); static void write_id_file (struct idhead *idhp); static unsigned long token_hash_1 (void const *key); static unsigned long token_hash_2 (void const *key); static int token_hash_cmp (void const *x, void const *y); static int token_qsort_cmp (void const *x, void const *y); static void bump_current_hits_signature (void); static void init_hits_signature (int i); static void free_summary_tokens (void); static void summarize (void); static void init_summary (void); static struct summary *make_sibling_summary (struct summary *summary); static int count_vec_size (struct summary *summary, unsigned char const *tail_hits); static int count_buf_size (struct summary *summary, unsigned char const *tail_hits); static int check_hits (struct summary* summary) _GL_ATTRIBUTE_PURE; static void write_hits (FILE *fp, struct summary *summary, unsigned char const *tail_hits); static void sign_token (struct token *token); static void add_token_to_summary (struct summary *summary, struct token *token); static struct hash_table token_table; /* Miscellaneous statistics */ static unsigned long input_chars; static unsigned long name_tokens; static unsigned long number_tokens; static unsigned long string_tokens; static unsigned long literal_tokens; static unsigned long comment_tokens; static unsigned long occurrences; static unsigned long hits_length = 0; static unsigned long tokens_length = 0; static unsigned long output_length = 0; static int verbose_flag = 0; static int statistics_flag = 0; static int levels = 0; /* ceil(log(8)) of file_name_count */ static unsigned char *current_hits_signature; #define INIT_TOKENS_SIZE(level) (1 << ((level) + 13)) static struct summary *summary_root; static struct summary *summary_leaf; static char *lang_map_file_name = 0; static int show_version = 0; static int show_help = 0; struct idhead idh; static struct file_link *cw_dlink; void usage (void) __attribute__((__noreturn__)); void usage (void) { fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); exit (EXIT_FAILURE); } /* For long options that have no equivalent short option, use a non-character as a pseudo short option, starting with CHAR_MAX + 1. */ enum { FILES0_FROM_OPTION = CHAR_MAX +1, }; static struct option const long_options[] = { { "file", required_argument, 0, 'f' }, { "output", required_argument, 0, 'o' }, { "include", required_argument, 0, 'i' }, { "exclude", required_argument, 0, 'x' }, { "lang-option", required_argument, 0, 'l' }, { "lang-map", required_argument, 0, 'm' }, { "default-lang", required_argument, 0, 'd' }, { "prune", required_argument, 0, 'p' }, { "verbose", no_argument, 0, 'v' }, { "statistics", no_argument, 0, 's' }, { "help", no_argument, &show_help, 1 }, { "version", no_argument, &show_version, 1 }, { "files0-from", required_argument, NULL, FILES0_FROM_OPTION }, {NULL, 0, NULL, 0} }; static void __attribute__((__noreturn__)) help_me (void) { printf (_("\ Usage: %s [OPTION]... [FILE]...\n\ "), program_name); printf (_("\ Build an identifier database.\n\ -o, --output=OUTFILE file name of ID database output\n\ -f, --file=OUTFILE synonym for --output\n\ -i, --include=LANGS include languages in LANGS (default: \"C C++ asm\")\n\ -x, --exclude=LANGS exclude languages in LANGS\n\ -l, --lang-option=L:OPT pass OPT as a default for language L (see below)\n\ -m, --lang-map=MAPFILE use MAPFILE to map file names onto source language\n\ -d, --default-lang=LANG make LANG the default source language\n\ -p, --prune=NAMES exclude the named files and/or directories\n\ -v, --verbose report per file statistics\n\ -s, --statistics report statistics at end of run\n\ \n\ --files0-from=F tokenize only the files specified by\n\ NUL-terminated names in file F\n\ \n\ --help display this help and exit\n\ --version output version information and exit\n\ \n\ FILE may be a file name, or a directory name to recursively search.\n\ If no FILE is given, the current directory is searched by default.\n\ Note that the `--include' and `--exclude' options are mutually-exclusive.\n\ \n\ The following arguments apply to the language-specific scanners:\n\ ")); language_help_me (); printf (_("\nReport bugs to " PACKAGE_BUGREPORT "\n\n")); exit (EXIT_SUCCESS); } static void *heap_initial; static void *heap_after_walk; static void *heap_after_scan; static void *get_process_heap(void) { #if HAVE_SBRK return sbrk(0); #else return 0; #endif /* HAVE_SBRK */ } int main (int argc, char **argv) { bool ok; int nfiles; char *files_from = NULL; set_program_name (argv[0]); heap_initial = get_process_heap(); idh.idh_file_name = DEFAULT_ID_FILE_NAME; #if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif atexit (close_stdout); for (;;) { int optc = getopt_long (argc, argv, "o:f:i:x:l:m:d:p:vVs", long_options, (int *) 0); if (optc < 0) break; switch (optc) { case 0: break; case 'o': case 'f': idh.idh_file_name = optarg; break; case 'i': include_languages (optarg); break; case 'x': exclude_languages (optarg); break; case 'l': language_save_arg (optarg); break; case 'm': lang_map_file_name = optarg; break; case 'd': set_default_language (optarg); break; case 'p': if (cw_dlink == 0) cw_dlink = init_walker (&idh); prune_file_names (optarg, cw_dlink); break; case FILES0_FROM_OPTION: files_from = optarg; break; case 'V': walker_verbose_flag = 1; case 'v': verbose_flag = 1; case 's': statistics_flag = 1; break; default: usage (); } } if (show_version) { printf ("%s - %s\n", program_name, PACKAGE_VERSION); exit (EXIT_SUCCESS); } if (show_help) help_me (); nfiles = argc - optind; struct argv_iterator *ai; if (files_from) { /* When using --files0-from=F, you may not specify any files on the command-line. */ if (nfiles != 0) { error (0, 0, _("extra operand %s"), quote (argv[optind])); fprintf (stderr, "%s\n", _("file operands cannot be combined with --files0-from")); usage(); } if (! (strequ (files_from, "-") || freopen (files_from, "r", stdin))) error (EXIT_FAILURE, errno, _("cannot open %s for reading"), quote (files_from)); ai = argv_iter_init_stream (stdin); } else { static char *cwd_only[2]; cwd_only[0] = bad_cast ("."); cwd_only[1] = NULL; char **files = (optind < argc ? argv + optind : cwd_only); ai = argv_iter_init_argv (files); } language_getopt (); assert_writeable (idh.idh_file_name); if (cw_dlink == 0) cw_dlink = init_walker (&idh); parse_language_map (lang_map_file_name); /* Walk the file and directory names given on the command line. */ ok = true; while (true) { bool skip_file = false; enum argv_iter_err ai_err; char *file_name = argv_iter (ai, &ai_err); if (ai_err == AI_ERR_EOF) break; if (!file_name) { switch (ai_err) { case AI_ERR_READ: error (0, errno, _("%s: read error"), quote (files_from)); continue; case AI_ERR_MEM: xalloc_die (); default: assert (!"unexpected error code from argv_iter"); } } if (files_from && STREQ (files_from, "-") && STREQ (file_name, "-")) { /* Give a better diagnostic in an unusual case: printf - | du --files0-from=- */ error (0, 0, _("when reading file names from stdin, " "no file name of %s allowed"), quote (file_name)); skip_file = true; } /* Report and skip any empty file names. */ if (!file_name[0]) { /* Diagnose a zero-length file name. When it's one among many, knowing the record number may help. FIXME: currently print the record number only with --files0-from=FILE. Maybe do it for argv, too? */ if (files_from == NULL) error (0, 0, "%s", _("invalid zero-length file name")); else { /* Using the standard `filename:line-number:' prefix here is not totally appropriate, since NUL is the separator, not NL, but it might be better than nothing. */ unsigned long int file_number = argv_iter_n_args (ai); error (0, 0, "%s:%lu: %s", quotearg_colon (files_from), file_number, _("invalid zero-length file name")); } skip_file = true; } if (skip_file) ok = false; else { struct file_link *flink = parse_file_name (file_name, cw_dlink); if (flink) walk_flink (flink, 0); /* FIXME: walk_flink can fail, so should return status. Then caller can continue with other arguments. */ } } argv_iter_free (ai); heap_after_walk = get_process_heap(); mark_member_file_links (&idh); log_8_member_files = ceil_log_8 (idh.idh_member_file_table.ht_fill); /* hack start: when scanning a single file, log_8_member_files results 0. Adjust to 1 in this case, or xmalloc will be called for 0 bytes, and later the struct token will have no 'hits' field. This would cause a crash (see testsuite/consistency, testsuite/single_file_token_bug.c) <claudio@gnu.org 2005> */ if (log_8_member_files == 0) log_8_member_files = 1; /* hack end */ current_hits_signature = xmalloc (log_8_member_files); /* If scannable files were given, then scan them. */ if (idh.idh_member_file_table.ht_fill) { scan_files (&idh); heap_after_scan = get_process_heap(); free_summary_tokens (); free (token_table.ht_vec); chdir_to_link (cw_dlink); write_id_file (&idh); if (statistics_flag) report_statistics (); } else error (0, 0, _("nothing to do")); exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } /* Return the integer ceiling of the base-8 logarithm of N. */ static int _GL_ATTRIBUTE_CONST ceil_log_8 (unsigned long n) { int log_8 = 0; n--; while (n) { log_8++; n >>= 3; } return log_8; } /* Return the integer ceiling of the base-2 logarithm of N. */ static int _GL_ATTRIBUTE_CONST ceil_log_2 (unsigned long n) { int log_2 = 0; n--; while (n) { log_2++; n >>= 1; } return log_2; } /* Ensure that FILE_NAME can be written. If it exists, make sure it's writable. If it doesn't exist, make sure it can be created. Exit with a diagnostic if this is not so. */ static void assert_writeable (char const *filename) { if (access (filename, 06) < 0) { if (errno == ENOENT) { char *dirname = dir_name (filename); if (access (dirname, 06) < 0) error (EXIT_FAILURE, errno, _("can't create `%s' in `%s'"), base_name (filename), dirname); free(dirname); } else error (EXIT_FAILURE, errno, _("can't modify `%s'"), filename); } } /* Iterate over all eligible files (the members of the set of scannable files). Create a tree8 to store the set of files where a token occurs. */ static void scan_files (struct idhead const *idhp) { struct member_file **members_0 = (struct member_file **) hash_dump (&idhp->idh_member_file_table, 0, member_file_qsort_compare); struct member_file **end = &members_0[idhp->idh_member_file_table.ht_fill]; struct member_file **members = members_0; int n = idhp->idh_member_file_table.ht_fill; n = n * ceil_log_2 (n) * 16; if (n == 0) n = 1024; else if (n > 1024*1024) n = 1024*1024; hash_init (&token_table, n, token_hash_1, token_hash_2, token_hash_cmp); if (verbose_flag) { char offstr[INT_BUFSIZE_BOUND(off_t)]; printf ("files=%ld, largest=%s, slots=%lu\n", idhp->idh_member_file_table.ht_fill, offtostr(largest_member_file, offstr), token_table.ht_size); } init_hits_signature (0); init_summary (); obstack_init (&tokens_obstack); if (largest_member_file > MAX_LARGEST_MEMBER_FILE) largest_member_file = MAX_LARGEST_MEMBER_FILE; scanner_buffer = xmalloc (largest_member_file + 1); for (;;) { const struct member_file *member = *members++; scan_member_file (member); if (members == end) break; if (current_hits_signature[0] & 0x80) summarize (); bump_current_hits_signature (); } free (scanner_buffer); free (members_0); } /* Open a file and scan it. */ static void scan_member_file (struct member_file const *member) { struct lang_args const *lang_args = member->mf_lang_args; struct language const *lang = lang_args->la_language; get_token_func_t get_token = lang->lg_get_token; struct file_link *flink = member->mf_link; struct stat st; FILE *source_FILE; chdir_to_link (flink->fl_parent); source_FILE = fopen (flink->fl_name, "r"); if (source_FILE) { char *file_name = alloca (PATH_MAX); if (statistics_flag) { if (fstat (fileno (source_FILE), &st) < 0) { maybe_relative_file_name (file_name, flink, cw_dlink); error (0, errno, _("can't stat `%s'"), file_name); } else input_chars += st.st_size; } if (verbose_flag) { maybe_relative_file_name (file_name, flink, cw_dlink); printf ("%ld: %s: %s", member->mf_index, lang->lg_name, file_name); fflush (stdout); } scan_member_file_1 (get_token, lang_args->la_args_digested, source_FILE); if (verbose_flag) putchar ('\n'); fclose (source_FILE); } else error (0, errno, _("can't open `%s'"), flink->fl_name); } /* Iterate over all tokens in the file, and merge the file's tree8 signature into the token table entry. */ static void scan_member_file_1 (get_token_func_t get_token, void const *args, FILE *source_FILE) { struct token **slot; struct token *token; int flags; int new_tokens = 0; int distinct_tokens = 0; while ((token = (*get_token) (source_FILE, args, &flags)) != NULL) { if (*TOKEN_NAME (token) == '\0') { obstack_free (&tokens_obstack, token); continue; } slot = (struct token **) hash_find_slot (&token_table, token); if (HASH_VACANT (*slot)) { token->tok_flags = flags; token->tok_count = 1; memset (TOKEN_HITS (token), 0, log_8_member_files); sign_token (token); if (verbose_flag) { distinct_tokens++; new_tokens++; } hash_insert_at (&token_table, token, slot); } else { obstack_free (&tokens_obstack, token); token = *slot; token->tok_flags |= flags; if (token->tok_count < USHRT_MAX) token->tok_count++; if (!(TOKEN_HITS (token)[0] & current_hits_signature[0])) { sign_token (token); if (verbose_flag) distinct_tokens++; } } } if (verbose_flag) { printf (_(" new = %d/%d"), new_tokens, distinct_tokens); if (distinct_tokens != 0) printf (" = %.0f%%", 100.0 * (double) new_tokens / (double) distinct_tokens); } } static void report_statistics (void) { printf (_("Name=%ld, "), name_tokens); printf (_("Number=%ld, "), number_tokens); printf (_("String=%ld, "), string_tokens); printf (_("Literal=%ld, "), literal_tokens); printf (_("Comment=%ld\n"), comment_tokens); printf (_("Files=%ld, "), idh.idh_files); printf (_("Tokens=%ld, "), occurrences); printf (_("Bytes=%ld Kb, "), input_chars / 1024); printf (_("Heap=%llu+%llu Kb, "), (unsigned long long) ((char *) heap_after_scan - (char *) heap_after_walk) / 1024, (unsigned long long) ((char *) heap_after_walk - (char *) heap_initial) / 1024); printf (_("Output=%ld (%ld tok, %ld hit)\n"), output_length, tokens_length, hits_length); hash_print_stats (&token_table, stdout); printf (_(", Freq=%ld/%ld=%.2f\n"), occurrences, token_table.ht_fill, (double) occurrences / (double) token_table.ht_fill); } /* As the database is written, may need to adjust the file names. If we are generating the ID file in a remote directory, then adjust the file names to be relative to the location of the ID database. (This would be a common usage if you want to make a database for a directory which you have no write access to, so you cannot create the ID file.) */ static void write_id_file (struct idhead *idhp) { struct token **tokens; int i; int buf_size; int vec_size; int tok_size; int max_buf_size = 0; int max_vec_size = 0; if (verbose_flag) printf (_("Sorting tokens...\n")); assert (summary_root->sum_hits_count == token_table.ht_fill); tokens = xnrealloc (summary_root->sum_tokens, token_table.ht_fill, sizeof *tokens); qsort (tokens, token_table.ht_fill, sizeof (struct token *), token_qsort_cmp); if (verbose_flag) printf (_("Writing `%s'...\n"), idhp->idh_file_name); idhp->idh_FILE = fopen (idhp->idh_file_name, "w+b"); if (idhp->idh_FILE == NULL) error (EXIT_FAILURE, errno, _("can't create `%s'"), idhp->idh_file_name); idhp->idh_magic[0] = IDH_MAGIC_0; idhp->idh_magic[1] = IDH_MAGIC_1; idhp->idh_version = IDH_VERSION; idhp->idh_flags = IDH_COUNTS; /* write out the list of pathnames */ fseek (idhp->idh_FILE, sizeof_idhead (), 0); off_t off = ftello (idhp->idh_FILE); if (UINT32_MAX < off) error (EXIT_FAILURE, 0, _("internal limitation: offset of 2^32 or larger")); idhp->idh_flinks_offset = off; serialize_file_links (idhp); /* write out the list of identifiers */ putc ('\0', idhp->idh_FILE); putc ('\0', idhp->idh_FILE); off = ftello (idhp->idh_FILE); if (UINT32_MAX < off) error (EXIT_FAILURE, 0, _("internal limitation: offset of 2^32 or larger")); idhp->idh_tokens_offset = off; for (i = 0; i < token_table.ht_fill; i++, tokens++) { struct token *token = *tokens; occurrences += token->tok_count; if (token->tok_flags & TOK_NUMBER) number_tokens++; if (token->tok_flags & TOK_NAME) name_tokens++; if (token->tok_flags & TOK_STRING) string_tokens++; if (token->tok_flags & TOK_LITERAL) literal_tokens++; if (token->tok_flags & TOK_COMMENT) comment_tokens++; fputs (TOKEN_NAME (token), idhp->idh_FILE); putc ('\0', idhp->idh_FILE); if (token->tok_count > 0xff) token->tok_flags |= TOK_SHORT_COUNT; putc (token->tok_flags, idhp->idh_FILE); putc (token->tok_count & 0xff, idhp->idh_FILE); if (token->tok_flags & TOK_SHORT_COUNT) putc (token->tok_count >> 8, idhp->idh_FILE); vec_size = count_vec_size (summary_root, TOKEN_HITS (token) + levels); buf_size = count_buf_size (summary_root, TOKEN_HITS (token) + levels); hits_length += buf_size; tok_size = strlen (TOKEN_NAME (token)) + 1; tokens_length += tok_size; buf_size += tok_size + sizeof (token->tok_flags) + sizeof (token->tok_count) + 2; if (buf_size > max_buf_size) max_buf_size = buf_size; if (vec_size > max_vec_size) max_vec_size = vec_size; write_hits (idhp->idh_FILE, summary_root, TOKEN_HITS (token) + levels); putc ('\0', idhp->idh_FILE); putc ('\0', idhp->idh_FILE); } assert (check_hits (summary_root) == 0); idhp->idh_tokens = token_table.ht_fill; off = ftello (idhp->idh_FILE); if (UINT32_MAX < off) error (EXIT_FAILURE, 0, _("internal limitation: offset of 2^32 or larger")); output_length = off; idhp->idh_end_offset = output_length - 2; idhp->idh_buf_size = max_buf_size; idhp->idh_vec_size = max_vec_size; write_idhead (&idh); if (ferror (idhp->idh_FILE) || fclose (idhp->idh_FILE) != 0) error (EXIT_FAILURE, errno, _("error closing `%s'"), idhp->idh_file_name); } /* Define primary and secondary hash and comparison functions for the token table. */ static unsigned long _GL_ATTRIBUTE_PURE token_hash_1 (void const *key) { return_STRING_HASH_1 (TOKEN_NAME ((struct token const *) key)); } static unsigned long _GL_ATTRIBUTE_PURE token_hash_2 (void const *key) { return_STRING_HASH_2 (TOKEN_NAME ((struct token const *) key)); } static int _GL_ATTRIBUTE_PURE token_hash_cmp (void const *x, void const *y) { return_STRING_COMPARE (TOKEN_NAME ((struct token const *) x), TOKEN_NAME ((struct token const *) y)); } static int _GL_ATTRIBUTE_PURE token_qsort_cmp (void const *x, void const *y) { return_STRING_COMPARE (TOKEN_NAME (*(struct token const *const *) x), TOKEN_NAME (*(struct token const *const *) y)); } /****************************************************************************/ /* Advance the tree8 hit signature that corresponds to the file we are now scanning. */ static void bump_current_hits_signature (void) { unsigned char *hits = current_hits_signature; while (*hits & 0x80) *hits++ = 1; *hits <<= 1; } /* Initialize the tree8 hit signature for the first file we scan. */ static void init_hits_signature (int i) { unsigned char *hits = current_hits_signature; unsigned char const *end = current_hits_signature + log_8_member_files; while (hits < end) { *hits = 1 << (i & 7); i >>= 3; hits++; } } static void free_summary_tokens (void) { struct summary *summary = summary_leaf; while (summary != summary_root) { free (summary->sum_tokens); summary = summary->sum_parent; } } static void summarize (void) { unsigned char const *hits_sig = current_hits_signature; struct summary *summary = summary_leaf; do { unsigned long count = summary->sum_hits_count; unsigned char *hits = xmalloc (count + 1); unsigned int level = summary->sum_level; struct token **tokens = summary->sum_tokens; unsigned long init_size = INIT_TOKENS_SIZE (summary->sum_level); if (verbose_flag) printf (_("level %d: %ld/%ld = %.0f%%\n"), summary->sum_level, count, init_size, 100.0 * (double) count / (double) init_size); qsort (tokens, count, sizeof (struct token *), token_qsort_cmp); summary->sum_hits = hits; while (count--) { unsigned char *hit = TOKEN_HITS (*tokens++) + level; *hits++ = *hit; *hit = 0; } *hits++ = 0; if (summary->sum_parent) { free (summary->sum_tokens); summary->sum_tokens = 0; } summary = summary->sum_parent; } while (*++hits_sig & 0x80); summary_leaf = make_sibling_summary (summary_leaf); } static void init_summary (void) { unsigned long size = INIT_TOKENS_SIZE (0); summary_root = summary_leaf = xcalloc (1, sizeof(struct summary)); summary_root->sum_tokens_size = size; summary_root->sum_tokens = xmalloc (sizeof(struct token *) * size); } static struct summary * make_sibling_summary (struct summary *summary) { struct summary *parent = summary->sum_parent; size_t size; if (parent == NULL) { levels++; summary_root = summary->sum_parent = parent = xcalloc (1, sizeof(struct summary)); parent->sum_level = levels; parent->sum_kids[0] = summary; parent->sum_hits_count = summary->sum_hits_count; parent->sum_free_index = 1; size = INIT_TOKENS_SIZE (levels); if (summary->sum_tokens_size >= size) { parent->sum_tokens_size = summary->sum_tokens_size; parent->sum_tokens = summary->sum_tokens; } else { parent->sum_tokens_size = size; parent->sum_tokens = xnrealloc (summary->sum_tokens, size, sizeof *summary->sum_tokens); } summary->sum_tokens = 0; } if (parent->sum_free_index == 8) parent = make_sibling_summary (parent); summary = xcalloc (1, sizeof(struct summary)); summary->sum_level = parent->sum_level - 1; parent->sum_kids[parent->sum_free_index++] = summary; summary->sum_parent = parent; size = INIT_TOKENS_SIZE (summary->sum_level); summary->sum_tokens_size = size; summary->sum_tokens = xmalloc (sizeof(struct token *) * size); return summary; } static int _GL_ATTRIBUTE_PURE count_vec_size (struct summary *summary, unsigned char const *tail_hits) { struct summary **kids; unsigned int hits = (summary->sum_hits ? *summary->sum_hits : *tail_hits); kids = summary->sum_kids; if (*kids == NULL) { static char bits_per_nybble[] = { 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4 }; return bits_per_nybble[hits & 0xf] + bits_per_nybble[hits >> 4]; } else { int bit; int count = 0; --tail_hits; for (bit = 1; bit & 0xff; bit <<= 1, ++kids) if (bit & hits) count += count_vec_size (*kids, tail_hits); return count; } } static int _GL_ATTRIBUTE_PURE count_buf_size (struct summary *summary, unsigned char const *tail_hits) { struct summary **kids; unsigned int hits = (summary->sum_hits ? *summary->sum_hits : *tail_hits); kids = summary->sum_kids; if (*kids == NULL) return 1; else { int bit; int count = 1; --tail_hits; for (bit = 1; bit & 0xff; bit <<= 1, ++kids) if (bit & hits) count += count_buf_size (*kids, tail_hits); return count; } } /* Sanity-check hit counts. Return nonzero if there's a problem. Otherwise, return 0. */ static int check_hits (struct summary* summary) { struct summary **kids = summary->sum_kids; struct summary **end = &kids[8]; if ( ! (summary->sum_hits == NULL || *summary->sum_hits == 0)) return 1; if (end[-1] == 0) while (*--end == 0) ; while (kids < end) if (check_hits (*kids++)) return 1; return 0; } static void write_hits (FILE *fp, struct summary *summary, unsigned char const *tail_hits) { struct summary **kids; unsigned int hits = (summary->sum_hits ? *summary->sum_hits++ : *tail_hits); assert (hits); putc (hits, fp); kids = summary->sum_kids; if (*kids) { int bit; --tail_hits; for (bit = 1; (bit & 0xff) && *kids; bit <<= 1, ++kids) if (bit & hits) write_hits (fp, *kids, tail_hits); } } static void sign_token (struct token *token) { unsigned char *tok_hits = TOKEN_HITS (token); unsigned char *hits_sig = current_hits_signature; unsigned char *end = current_hits_signature + log_8_member_files; struct summary *summary = summary_leaf; while (summary) { if (*tok_hits == 0) add_token_to_summary (summary, token); if (*tok_hits & *hits_sig) break; *tok_hits |= *hits_sig; summary = summary->sum_parent; tok_hits++; hits_sig++; } while (hits_sig < end) { if (*tok_hits & *hits_sig) break; *tok_hits |= *hits_sig; tok_hits++; hits_sig++; } } static void add_token_to_summary (struct summary *summary, struct token *token) { size_t size = summary->sum_tokens_size; if (summary->sum_hits_count >= size) { summary->sum_tokens = x2nrealloc (summary->sum_tokens, &size, sizeof *summary->sum_tokens); summary->sum_tokens_size = size; } summary->sum_tokens[summary->sum_hits_count++] = token; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/Makefile.am������������������������������������������������������������0000664�0000000�0000000�00000001432�12166360012�014223� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������bin_PROGRAMS = mkid lid fid fnid xtokid aid eid gid dist_bin_SCRIPTS = defid noinst_HEADERS = lid.h aid_SOURCES = lid.c lid-aid.c eid_SOURCES = lid.c lid-eid.c gid_SOURCES = lid.c lid-gid.c lid_SOURCES = lid.c lid-lid.c AM_CPPFLAGS = -I$(top_srcdir)/lib \ -I$(top_srcdir)/libidu \ -DDATADIR=\"$(datadir)\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DLANGUAGE_MAP_FILE=\"$(datadir)/id-lang.map\" AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) LDADD = ../libidu/libidu.a ../lib/libgnu.a $(LIBINTL) ../lib/libgnu.a # Tell automake's installcheck-binPROGRAMS rule that defid # need not be checked for --help and --version support. # Otherwise, it would usually fail when gid is not already installed. AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = defid ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/Makefile.in������������������������������������������������������������0000664�0000000�0000000�00000166702�12166360012�014250� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mkid$(EXEEXT) lid$(EXEEXT) fid$(EXEEXT) fnid$(EXEEXT) \ xtokid$(EXEEXT) aid$(EXEEXT) eid$(EXEEXT) gid$(EXEEXT) subdir = src DIST_COMMON = $(dist_bin_SCRIPTS) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_aid_OBJECTS = lid.$(OBJEXT) lid-aid.$(OBJEXT) aid_OBJECTS = $(am_aid_OBJECTS) aid_LDADD = $(LDADD) am__DEPENDENCIES_1 = aid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a am_eid_OBJECTS = lid.$(OBJEXT) lid-eid.$(OBJEXT) eid_OBJECTS = $(am_eid_OBJECTS) eid_LDADD = $(LDADD) eid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a fid_SOURCES = fid.c fid_OBJECTS = fid.$(OBJEXT) fid_LDADD = $(LDADD) fid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a fnid_SOURCES = fnid.c fnid_OBJECTS = fnid.$(OBJEXT) fnid_LDADD = $(LDADD) fnid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a am_gid_OBJECTS = lid.$(OBJEXT) lid-gid.$(OBJEXT) gid_OBJECTS = $(am_gid_OBJECTS) gid_LDADD = $(LDADD) gid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a am_lid_OBJECTS = lid.$(OBJEXT) lid-lid.$(OBJEXT) lid_OBJECTS = $(am_lid_OBJECTS) lid_LDADD = $(LDADD) lid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a mkid_SOURCES = mkid.c mkid_OBJECTS = mkid.$(OBJEXT) mkid_LDADD = $(LDADD) mkid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a xtokid_SOURCES = xtokid.c xtokid_OBJECTS = xtokid.$(OBJEXT) xtokid_LDADD = $(LDADD) xtokid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ $(am__DEPENDENCIES_1) ../lib/libgnu.a am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(dist_bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(aid_SOURCES) $(eid_SOURCES) fid.c fnid.c $(gid_SOURCES) \ $(lid_SOURCES) mkid.c xtokid.c DIST_SOURCES = $(aid_SOURCES) $(eid_SOURCES) fid.c fnid.c \ $(gid_SOURCES) $(lid_SOURCES) mkid.c xtokid.c HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_bin_SCRIPTS = defid noinst_HEADERS = lid.h aid_SOURCES = lid.c lid-aid.c eid_SOURCES = lid.c lid-eid.c gid_SOURCES = lid.c lid-gid.c lid_SOURCES = lid.c lid-lid.c AM_CPPFLAGS = -I$(top_srcdir)/lib \ -I$(top_srcdir)/libidu \ -DDATADIR=\"$(datadir)\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DLANGUAGE_MAP_FILE=\"$(datadir)/id-lang.map\" AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) LDADD = ../libidu/libidu.a ../lib/libgnu.a $(LIBINTL) ../lib/libgnu.a # Tell automake's installcheck-binPROGRAMS rule that defid # need not be checked for --help and --version support. # Otherwise, it would usually fail when gid is not already installed. AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = defid all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err </dev/null \ && test -n "`cat c$${pid}_.out`" \ && test -z "`cat c$${pid}_.err`"; then :; \ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad aid$(EXEEXT): $(aid_OBJECTS) $(aid_DEPENDENCIES) $(EXTRA_aid_DEPENDENCIES) @rm -f aid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(aid_OBJECTS) $(aid_LDADD) $(LIBS) eid$(EXEEXT): $(eid_OBJECTS) $(eid_DEPENDENCIES) $(EXTRA_eid_DEPENDENCIES) @rm -f eid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(eid_OBJECTS) $(eid_LDADD) $(LIBS) fid$(EXEEXT): $(fid_OBJECTS) $(fid_DEPENDENCIES) $(EXTRA_fid_DEPENDENCIES) @rm -f fid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fid_OBJECTS) $(fid_LDADD) $(LIBS) fnid$(EXEEXT): $(fnid_OBJECTS) $(fnid_DEPENDENCIES) $(EXTRA_fnid_DEPENDENCIES) @rm -f fnid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fnid_OBJECTS) $(fnid_LDADD) $(LIBS) gid$(EXEEXT): $(gid_OBJECTS) $(gid_DEPENDENCIES) $(EXTRA_gid_DEPENDENCIES) @rm -f gid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gid_OBJECTS) $(gid_LDADD) $(LIBS) lid$(EXEEXT): $(lid_OBJECTS) $(lid_DEPENDENCIES) $(EXTRA_lid_DEPENDENCIES) @rm -f lid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lid_OBJECTS) $(lid_LDADD) $(LIBS) mkid$(EXEEXT): $(mkid_OBJECTS) $(mkid_DEPENDENCIES) $(EXTRA_mkid_DEPENDENCIES) @rm -f mkid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mkid_OBJECTS) $(mkid_LDADD) $(LIBS) xtokid$(EXEEXT): $(xtokid_OBJECTS) $(xtokid_DEPENDENCIES) $(EXTRA_xtokid_DEPENDENCIES) @rm -f xtokid$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xtokid_OBJECTS) $(xtokid_LDADD) $(LIBS) install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) installcheck-dist_binSCRIPTS: $(dist_bin_SCRIPTS) bad=0; pid=$$$$; list="$(dist_bin_SCRIPTS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err </dev/null \ && test -n "`cat c$${pid}_.out`" \ && test -z "`cat c$${pid}_.err`"; then :; \ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lid-aid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lid-eid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lid-gid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lid-lid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtokid.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS installcheck-dist_binSCRIPTS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic cscopelist ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dist_binSCRIPTS \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installcheck-dist_binSCRIPTS \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-dist_binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������id-utils-4.6+git20120811/src/lid.c������������������������������������������������������������������0000664�0000000�0000000�00000111301�12204226501�013075� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* lid.c -- primary query interface for mkid database Copyright (C) 1986, 1995-1996, 1999-2000, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <signal.h> #include <errno.h> #include <sys/types.h> #include <sys/wait.h> #include <assert.h> #include <getopt.h> #include <limits.h> #include <string.h> #include <dirname.h> #include <unistd.h> #include <termios.h> #include <alloca.h> #include <regex.h> #include <xalloc.h> #include <pathmax.h> #include <error.h> #include "closeout.h" #include "xnls.h" #include "idfile.h" #include "iduglobal.h" #include "lid.h" #include "progname.h" #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif typedef void (*report_func_t) (char const *name, struct file_link **flinkv); typedef int (*query_func_t) (char const *arg, report_func_t); enum delimiter_style { ds_bogus, ds_contextual, ds_word, ds_substring }; enum pattern_style { ps_bogus, ps_contextual, ps_literal, ps_regexp }; enum key_style { ks_bogus, ks_none, ks_token, ks_pattern }; enum result_style { rs_bogus, rs_none, rs_filenames, rs_grep, rs_edit }; enum radix { radix_oct = 1, radix_dec = 2, radix_hex = 4, radix_all = radix_dec | radix_oct | radix_hex }; void usage (void) __attribute__((__noreturn__)); static void lower_caseify (char *str); static enum key_style parse_key_style (char const *arg); static enum result_style parse_result_style (char const *arg); static query_func_t get_query_func (char *pattern); static report_func_t get_report_func (void); static void report_filenames (char const *name, struct file_link **flinkv); static void report_grep (char const *name, struct file_link **flinkv); static void report_edit (char const *name, struct file_link **flinkv); static void report_nothing (char const *name, struct file_link **flinkv); static int vector_cardinality (void *vector); static int search_flinkv (struct file_link **flinkv); static int query_literal_word (char const *pattern, report_func_t report_func); static int query_literal_prefix (char const *pattern, report_func_t report_func); static int query_regexp (char const *pattern_0, report_func_t report_func); static char const *add_regexp_word_delimiters (char const *pattern_0); static int query_number (char const *pattern, report_func_t report_func); static int query_ambiguous_prefix (unsigned int, report_func_t report_func); static int query_literal_substring (char const *pattern, report_func_t report_func); static void parse_frequency_arg (char const *arg); static int desired_frequency (char const *tok); static char const *file_regexp (char const *name_0, char const *left_delimit, char const *right_delimit); static off_t query_binary_search (char const *token); static int is_regexp (char *name); static int has_left_delimiter (char const *pattern); static int has_right_delimiter (char const *pattern); static int word_match (char const *name_0, char const *line); static int get_radix (char const *str); static int is_number (char const *str); static int stoi (char const *str); static int otoi (char const *str); static int dtoi (char const *str); static int xtoi (char const *str); static unsigned char *tree8_to_bits (unsigned char *bits_vec, unsigned char const *hits_tree8); static void tree8_to_bits_1 (unsigned char **bits_vec, unsigned char const **hits_tree8, int level); static struct file_link **tree8_to_flinkv (unsigned char const *hits_tree8); static struct file_link **bits_to_flinkv (unsigned char const *bits_vec); static void savetty (void); static void restoretty (void); static void chartty (void); #define TOLOWER(c) (isupper (c) ? tolower (c) : (c)) #define IS_ALNUM(c) (isalnum (c) || (c) == '_') /* Sorry about all the globals, but it's really cleaner this way. */ static int tree8_levels; static unsigned int bits_vec_size; struct idhead idh; static char *hits_buf_1; static char *hits_buf_2; static unsigned char *bits_vec; /* If nonzero, display usage information and exit. */ static int show_help; /* If nonzero, print the version on standard output then exit. */ static int show_version; /* Which radixes do we want? */ static int radix_flag = 0; /* If nonzero, ignore differences in alphabetic case while matching. */ static int ignore_case_flag = 0; /* How will patterns will be delimited? */ static enum delimiter_style delimiter_style = ds_contextual; /* How will patterns be interpreted? */ static enum pattern_style pattern_style = ps_contextual; /* How will keys be presented? */ static enum key_style key_style = ks_token; /* How will query results be presented? */ static enum result_style result_style = rs_filenames; /* How shall we separate file names when result_style == rs_filenames? */ static enum separator_style separator_style = ss_contextual; /* If non-zero, list identifiers that are are non-unique within this number of leading characters. */ static unsigned int ambiguous_prefix_length = 0; /* The style of report. */ static report_func_t report_function; /* The style of query. */ static query_func_t query_function; /* Lower and upper bounds on occurrence frequency. */ static unsigned int frequency_low = 1; static unsigned int frequency_high = USHRT_MAX; static struct file_link *cw_dlink; static struct file_link **members_0; static struct option const long_options[] = { { "file", required_argument, 0, 'f' }, { "frequency", required_argument, 0, 'F' }, { "ambiguous", required_argument, 0, 'a' }, { "key", required_argument, 0, 'k' }, { "result", required_argument, 0, 'R' }, { "separator", required_argument, 0, 'S' }, { "ignore-case", no_argument, 0, 'i' }, { "literal", no_argument, 0, 'l' }, { "regexp", no_argument, 0, 'r' }, { "word", no_argument, 0, 'w' }, { "substring", no_argument, 0, 's' }, { "hex", no_argument, 0, 'x' }, { "decimal", no_argument, 0, 'd' }, { "octal", no_argument, 0, 'o' }, { "help", no_argument, &show_help, 1 }, { "version", no_argument, &show_version, 1 }, {NULL, 0, NULL, 0} }; void usage (void) { fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); exit (EXIT_FAILURE); } static void __attribute__((__noreturn__)) help_me (void) { printf (_("\ Usage: %s [OPTION]... PATTERN...\n\ "), program_name); printf (_("\ Query ID database and report results.\n\ By default, output consists of multiple lines, each line containing the\n\ matched identifier followed by the list of file names in which it occurs.\n\ \n\ -f, --file=FILE file name of ID database\n\ \n\ -i, --ignore-case match PATTERN case insensitively\n\ -l, --literal match PATTERN as a literal string\n\ -r, --regexp match PATTERN as a regular expression\n\ -w, --word match PATTERN as a delimited word\n\ -s, --substring match PATTERN as a substring\n\ Note: If PATTERN contains extended regular expression meta-\n\ characters, it is interpreted as a regular expression substring.\n\ Otherwise, PATTERN is interpreted as a literal word.\n\ \n\ -k, --key=STYLE STYLE is one of `token', `pattern' or `none'\n\ -R, --result=STYLE STYLE is one of `filenames', `grep', `edit' or `none'\n\ -S, --separator=STYLE STYLE is one of `braces', `space' or `newline' and\n\ only applies to file names when `--result=filenames'\n\ The above STYLE options control how query results are presented.\n\ Defaults are --key=token --result=filenames --separator=%s\n\ \n\ -F, --frequency=FREQ find tokens that occur FREQ times, where FREQ\n\ is a range expressed as `N..M'. If N is omitted, it\n\ defaults to 1, if M is omitted it defaults to MAX_USHRT\n\ -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n\ \n\ -x, --hex only find numbers expressed as hexadecimal\n\ -d, --decimal only find numbers expressed as decimal\n\ -o, --octal only find numbers expressed as octal\n\ By default, searches match numbers of any radix.\n\ \n\ --help display this help and exit\n\ --version output version information and exit\n\ "), (separator_style == ss_braces ? _("braces") : _("space"))); printf (_("\nReport bugs to " PACKAGE_BUGREPORT "\n\n")); exit (EXIT_SUCCESS); } int main (int argc, char **argv) { set_program_name (argv[0]); idh.idh_file_name = 0; #if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif atexit (close_stdout); switch (lid_mode) { case LID_MODE_AID: /* -ils */ ignore_case_flag = REG_ICASE; pattern_style = ps_literal; delimiter_style = ds_substring; break; case LID_MODE_EID: /* -R edit */ result_style = rs_edit; break; case LID_MODE_GID: /* -R grep */ result_style = rs_grep; break; case LID_MODE_LID: break; default: abort (); } for (;;) { int optc = getopt_long (argc, argv, "f:F:a:k:R:S:ilrwsxdo", long_options, (int *) 0); if (optc < 0) break; switch (optc) { case 0: break; case 'f': idh.idh_file_name = optarg; break; case 'F': parse_frequency_arg (optarg); break; case 'a': ambiguous_prefix_length = stoi (optarg); break; case 'k': key_style = parse_key_style (optarg); break; case 'R': result_style = parse_result_style (optarg); break; case 'S': separator_style = parse_separator_style (optarg); break; case 'i': ignore_case_flag = REG_ICASE; break; case 'l': pattern_style = ps_literal; break; case 'r': pattern_style = ps_regexp; break; case 'e': pattern_style = ps_regexp; error (0, 0, _("notice: use of `-e' is deprecated, use `-r' instead")); break; case 'w': delimiter_style = ds_word; break; case 's': delimiter_style = ds_substring; break; case 'x': radix_flag |= radix_hex; break; case 'd': radix_flag |= radix_dec; break; case 'o': radix_flag |= radix_oct; break; default: usage (); } } if (show_version) { printf ("%s - %s\n", program_name, PACKAGE_VERSION); exit (EXIT_SUCCESS); } if (show_help) help_me (); if (radix_flag == 0) radix_flag = radix_all; if (separator_style == ss_contextual) { if (isatty (STDOUT_FILENO)) separator_style = DEFAULT_SEPARATOR_STYLE; else if (key_style == ks_none) separator_style = ss_newline; else separator_style = ss_space; } argc -= optind; argv += optind; if (argc == 0) { static char dot[] = "."; static char *dotp = dot; argc = 1; argv = &dotp; } /* Look for the ID database up the tree */ idh.idh_file_name = locate_id_file_name (idh.idh_file_name); if (idh.idh_file_name == 0) error (EXIT_FAILURE, errno, _("can't locate `ID'")); init_idh_obstacks (&idh); init_idh_tables (&idh); cw_dlink = get_current_dir_link (); /* Determine absolute name of the directory name to which database constituent files are relative. */ members_0 = read_id_file (idh.idh_file_name, &idh); bits_vec_size = (idh.idh_files + 7) / 4; /* more than enough */ tree8_levels = tree8_count_levels (idh.idh_files); hits_buf_1 = xmalloc (idh.idh_buf_size); hits_buf_2 = xmalloc (idh.idh_buf_size); bits_vec = xmalloc (bits_vec_size); report_function = get_report_func (); if (ambiguous_prefix_length) { if (!query_ambiguous_prefix (ambiguous_prefix_length, report_function)) fprintf (stderr, _("All identifiers are non-ambiguous within the first %d characters\n"), ambiguous_prefix_length); } else { while (argc) { char *pattern = (argc--, *argv++); if (ignore_case_flag) lower_caseify (pattern); query_function = get_query_func (pattern); (*query_function) (pattern, report_function); } } fclose (idh.idh_FILE); exit (EXIT_SUCCESS); } static void lower_caseify (char *str) { while (*str) { *str = TOLOWER (*str); str++; } } static enum key_style parse_key_style (char const *arg) { MAYBE_RETURN_PREFIX_MATCH (arg, "none", ks_none); MAYBE_RETURN_PREFIX_MATCH (arg, "token", ks_token); MAYBE_RETURN_PREFIX_MATCH (arg, "pattern", ks_pattern); error (0, 0, _("invalid `--key' style: `%s'"), arg); usage (); return ks_bogus; } static enum result_style parse_result_style (char const *arg) { MAYBE_RETURN_PREFIX_MATCH (arg, "none", rs_none); MAYBE_RETURN_PREFIX_MATCH (arg, "filenames", rs_filenames); MAYBE_RETURN_PREFIX_MATCH (arg, "grep", rs_grep); MAYBE_RETURN_PREFIX_MATCH (arg, "edit", rs_edit); error (0, 0, _("invalid `--result' style: `%s'"), arg); usage (); return rs_bogus; } static query_func_t get_query_func (char *pattern) { switch (pattern_style) { case ps_regexp: return query_regexp; case ps_literal: if (delimiter_style == ds_substring) return query_literal_substring; else return query_literal_word; default: if (is_regexp (pattern)) return query_regexp; else if (has_left_delimiter (pattern)) return query_literal_prefix; else if (delimiter_style == ds_substring) return query_literal_substring; else if (is_number (pattern)) return query_number; else if (delimiter_style == ds_word) return query_literal_word; else return query_literal_word; } } static report_func_t get_report_func (void) { switch (result_style) { case rs_filenames: return report_filenames; case rs_grep: return report_grep; case rs_edit: return report_edit; default: return report_nothing; } } static void report_filenames (char const *name, struct file_link **flinkv) { if (name && key_style != ks_none) printf ("%-14s ", name); print_filenames (flinkv, separator_style); } static void report_grep (char const *name, struct file_link **flinkv) { char line[1<<020]; char const *pattern = 0; regex_t compiled; char *file_name = alloca (PATH_MAX); if (key_style == ks_pattern) { pattern = file_regexp (name, "[^a-zA-Z0-9_\300-\377]_*", "[^a-zA-Z0-9_\300-\377]"); if (pattern) { int regcomp_errno = regcomp (&compiled, pattern, ignore_case_flag | REG_EXTENDED); if (regcomp_errno) { char buf[BUFSIZ]; regerror (regcomp_errno, &compiled, buf, sizeof (buf)); error (EXIT_FAILURE, 0, "%s", buf); } } } line[0] = ' '; /* sentinel */ while (*flinkv) { int line_number = 0; FILE *source_FILE; maybe_relative_file_name (file_name, *flinkv++, cw_dlink); source_FILE = fopen (file_name, "r"); if (source_FILE == 0) { error (0, errno, _("can't open `%s'"), file_name); continue; } while (fgets (line + 1, sizeof (line) - 1, source_FILE)) { line_number++; if (pattern) { int regexec_errno = regexec (&compiled, line, 0, 0, 0); if (regexec_errno == REG_ESPACE) error (EXIT_FAILURE, 0, _("can't match regular-expression: memory exhausted")); else if (regexec_errno) continue; } else if (word_match (name, line)) printf ("%s:%d:%s", file_name, line_number, line + 1); } fclose (source_FILE); } } static char ** get_editor_argv(char const *fullstring, int* argc) { int i; char const *mark; char **argv; char *p; static int already_called; assert(already_called == 0); /* call only once, otherwise leaks */ *argc = 1; mark = fullstring; while ((mark = strchr(mark, ' '))) { (*argc)++; mark += strspn(mark, " "); } argv = xmalloc(sizeof(char *) * (*argc + 1)); p = xstrdup(fullstring); argv[0] = strtok(p, " "); for (i = 1; i < (*argc + 1); i++) { argv[i] = strtok(NULL, " "); } already_called = 1; return argv; } static void report_edit (char const *name, struct file_link **flinkv) { static char const *editor; /* editor program name from env */ static char **editor_argv; /* editor base arguments from env */ static int editor_argc; static char const *eid_arg; static char const *eid_right_del; static char const *eid_left_del; char regexp_buf[BUFSIZ]; char ed_arg_buffer[BUFSIZ]; char const *pattern; int c; int skip; if (!editor) if (!(editor = getenv ("VISUAL"))) if (!(editor = getenv ("EDITOR"))) editor = "vi"; if (!editor_argv) editor_argv = get_editor_argv(editor, &editor_argc); if (!eid_arg) { int using_vi; using_vi = strequ ("vi", base_name (editor)) || strequ ("vim", base_name (editor)); eid_arg = getenv ("EIDARG"); if (!eid_arg) eid_arg = (using_vi ? "+1;/%s/" : ""); eid_left_del = getenv ("EIDLDEL"); if (eid_left_del == 0) eid_left_del = (using_vi ? "\\<" : ""); eid_right_del = getenv ("EIDRDEL"); if (eid_right_del == 0) eid_right_del = (using_vi ? "\\>" : ""); } report_filenames (name, flinkv); savetty (); for (;;) { /* FIXME: i18n of responses */ printf (_("edit? [y1-9^S/nq] ")); fflush (stdout); chartty (); c = (getchar () & 0177); restoretty (); switch (TOLOWER (c)) { case '/': case ('s' & 037): putchar ('/'); skip = search_flinkv (flinkv); if (skip < 0) continue; flinkv += skip; goto editit; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': putchar (c); skip = c - '0'; break; case 'y': putchar (c); skip = 0; break; case '\n': case '\r': putchar ('y'); skip = 0; break; case 'q': putchar (c); putchar ('\n'); exit (EXIT_SUCCESS); case 'n': putchar (c); putchar ('\n'); return; default: putchar (c); putchar ('\n'); continue; } putchar ('\n'); while (skip--) if (*++flinkv == 0) continue; break; } editit: if (key_style == ks_pattern) pattern = file_regexp (name, eid_left_del, eid_right_del); else pattern = 0; if (pattern == 0) { pattern = regexp_buf; sprintf (regexp_buf, "%s%s%s", eid_left_del, name, eid_right_del); } switch (fork ()) { case -1: error (EXIT_FAILURE, errno, _("can't fork")); break; case 0: { int i; char **argv = xmalloc (sizeof(char *) * (editor_argc + 2 + vector_cardinality (flinkv))); for (i = 0; i < editor_argc; i++) argv[i] = editor_argv[i]; if (*eid_arg) { sprintf (ed_arg_buffer, eid_arg, pattern); argv[i++] = ed_arg_buffer; } while (*flinkv) argv[i++] = maybe_relative_file_name (0, *flinkv++, cw_dlink); argv[i] = 0; execvp (editor_argv[0], argv); error (0, errno, _("can't exec `%s'"), editor_argv[0]); } default: { void (*oldint) (int) = signal (SIGINT, SIG_IGN); void (*oldquit) (int) = signal (SIGQUIT, SIG_IGN); while (wait (0) == -1 && errno == EINTR) ; signal (SIGINT, oldint); signal (SIGQUIT, oldquit); } break; } } static void report_nothing (char const *name, struct file_link **flinkv ATTRIBUTE_UNUSED) { if (key_style != ks_none) puts (name); } static int _GL_ATTRIBUTE_PURE vector_cardinality (void *vector) { void **v = (void **) vector; int count = 0; while (*v++) count++; return count; } static int search_flinkv (struct file_link **flinkv) { char pattern[BUFSIZ]; unsigned int count; char *file_name = alloca (PATH_MAX); char *eol; if (fgets (pattern, sizeof (pattern), stdin) == 0) return -1; eol = strchr(pattern, '\n'); if (eol) *eol = 0; for (count = 0; *flinkv; count++, flinkv++) { maybe_relative_file_name (file_name, *flinkv, cw_dlink); if (strcasestr (file_name, pattern)) return count; } return -1; } static int query_literal_word (char const *arg, report_func_t report_func) { if (ignore_case_flag) return query_literal_substring (arg, report_func); if (query_binary_search (arg) == 0) return 0; gets_past_00 (hits_buf_1, idh.idh_FILE); assert (*hits_buf_1); if (!desired_frequency (hits_buf_1)) return 0; (*report_func) (hits_buf_1, tree8_to_flinkv (token_hits_addr (hits_buf_1))); return 1; } static int query_literal_prefix (char const *arg, report_func_t report_func) { int count; unsigned int length; if (ignore_case_flag) return query_regexp (arg, report_func); if (query_binary_search (++arg) == 0) return 0; length = strlen (arg); count = 0; if (key_style != ks_token) memset (bits_vec, 0, bits_vec_size); while (gets_past_00 (hits_buf_1, idh.idh_FILE) > 0) { assert (*hits_buf_1); if (!desired_frequency (hits_buf_1)) continue; if (!strnequ (arg, hits_buf_1, length)) break; if (key_style == ks_token) (*report_func) (hits_buf_1, tree8_to_flinkv (token_hits_addr (hits_buf_1))); else tree8_to_bits (bits_vec, token_hits_addr (hits_buf_1)); count++; } if (key_style != ks_token && count) (*report_func) (--arg, bits_to_flinkv (bits_vec)); return count; } static int query_regexp (char const *pattern_0, report_func_t report_func) { int count; regex_t compiled; int regcomp_errno; char const *pattern = pattern_0; if (delimiter_style == ds_word) pattern = add_regexp_word_delimiters (pattern); regcomp_errno = regcomp (&compiled, pattern, ignore_case_flag | REG_EXTENDED); if (regcomp_errno) { char buf[BUFSIZ]; regerror (regcomp_errno, &compiled, buf, sizeof (buf)); error (EXIT_FAILURE, 0, "%s", buf); } fseek (idh.idh_FILE, idh.idh_tokens_offset, SEEK_SET); count = 0; if (key_style != ks_token) memset (bits_vec, 0, bits_vec_size); while (gets_past_00 (hits_buf_1, idh.idh_FILE) > 0) { int regexec_errno; assert (*hits_buf_1); if (!desired_frequency (hits_buf_1)) continue; regexec_errno = regexec (&compiled, hits_buf_1, 0, 0, 0); if (regexec_errno == REG_ESPACE) error (0, 0, _("can't match regular-expression: memory exhausted")); else if (regexec_errno) continue; if (key_style == ks_token) (*report_func) (hits_buf_1, tree8_to_flinkv (token_hits_addr (hits_buf_1))); else tree8_to_bits (bits_vec, token_hits_addr (hits_buf_1)); count++; } if (key_style != ks_token && count) (*report_func) (pattern, bits_to_flinkv (bits_vec)); if (pattern != pattern_0) free ((char *) pattern); return count; } static char const * add_regexp_word_delimiters (char const *pattern_0) { int length = strlen (pattern_0); int has_left = has_left_delimiter (pattern_0); int has_right = has_right_delimiter (&pattern_0[length]); if (has_left && has_right) return pattern_0; else { char *pattern = xmalloc (length + 4); if (has_left) strcpy (pattern, pattern_0); else { length += 2; strcpy (pattern, "\\<"); strcpy (pattern + 2, pattern_0); } if (!has_right) strcpy (pattern + length, "\\>"); return pattern; } } static int query_number (char const *arg, report_func_t report_func) { int count; int radix; int val; int hit_digits = 0; radix = (val = stoi (arg)) ? radix_all : get_radix (arg); fseek (idh.idh_FILE, idh.idh_tokens_offset, SEEK_SET); count = 0; if (key_style != ks_token) memset (bits_vec, 0, bits_vec_size); while (gets_past_00 (hits_buf_1, idh.idh_FILE) > 0) { if (hit_digits) { if (!isdigit (*hits_buf_1)) break; } else { if (isdigit (*hits_buf_1)) hit_digits = 1; } if (!((radix_flag ? radix_flag : radix) & get_radix (hits_buf_1)) || stoi (hits_buf_1) != val) continue; if (key_style == ks_token) (*report_func) (hits_buf_1, tree8_to_flinkv (token_hits_addr (hits_buf_1))); else tree8_to_bits (bits_vec, token_hits_addr (hits_buf_1)); count++; } if (key_style != ks_token && count) (*report_func) (arg, bits_to_flinkv (bits_vec)); return count; } /* Find identifiers that are non-unique within the first `count' characters. */ static int query_ambiguous_prefix (unsigned int limit, report_func_t report_func) { char *old = hits_buf_1; char *new = hits_buf_2; int consecutive = 0; int count = 0; char name[1024]; if (limit <= 1) usage (); assert (limit < sizeof(name)); name[0] = '^'; *new = '\0'; fseek (idh.idh_FILE, idh.idh_tokens_offset, SEEK_SET); while (gets_past_00 (old, idh.idh_FILE) > 0) { char *tmp; if (!(token_flags (old) & TOK_NAME)) continue; tmp = old; old = new; new = tmp; if (!strnequ (new, old, limit)) { if (consecutive && key_style != ks_token) { stzncpy (&name[1], old, limit - 2); (*report_func) (name, bits_to_flinkv (bits_vec)); } consecutive = 0; continue; } if (!consecutive++) { if (key_style != ks_token) tree8_to_bits (bits_vec, token_hits_addr (old)); else (*report_func) (old, tree8_to_flinkv (token_hits_addr (old))); count++; } if (key_style == ks_token) (*report_func) (new, tree8_to_flinkv (token_hits_addr (new))); else tree8_to_bits (bits_vec, token_hits_addr (new)); count++; } if (consecutive && key_style != ks_token) { stzncpy (&name[1], new, limit - 2); (*report_func) (name, bits_to_flinkv (bits_vec)); } return count; } static int query_literal_substring (char const *arg, report_func_t report_func) { int count; int arg_length = 0; char *(*strstr_func) (char const *, char const *); fseek (idh.idh_FILE, idh.idh_tokens_offset, SEEK_SET); if (delimiter_style == ds_word) arg_length = strlen (arg); count = 0; if (key_style != ks_token) memset (bits_vec, 0, bits_vec_size); strstr_func = (ignore_case_flag ? strcasestr : strstr); while (gets_past_00 (hits_buf_1, idh.idh_FILE) > 0) { char *match; assert (*hits_buf_1); if (!desired_frequency (hits_buf_1)) continue; match = (*strstr_func) (hits_buf_1, arg); if (match == 0) continue; if (delimiter_style == ds_word && (match > hits_buf_1 || strlen (hits_buf_1) > arg_length)) continue; if (key_style == ks_token) (*report_func) (hits_buf_1, tree8_to_flinkv (token_hits_addr (hits_buf_1))); else tree8_to_bits (bits_vec, token_hits_addr (hits_buf_1)); count++; } if (key_style != ks_token && count) (*report_func) (arg, bits_to_flinkv (bits_vec)); return count; } static void parse_frequency_arg (char const *arg) { int range = 0; if (strnequ (arg, "..", 2)) frequency_low = 1; else { frequency_low = atoi (arg); while (isdigit (*arg)) arg++; } if (strnequ (arg, "..", 2)) { range = 1; arg += 2; } if (*arg) frequency_high = atoi (arg); else if (range) frequency_high = USHRT_MAX; else frequency_high = frequency_low; if (frequency_low > frequency_high) { unsigned int tmp = frequency_low; frequency_low = frequency_high; frequency_high = tmp; } } static int desired_frequency (char const *tok) { unsigned int count = token_count (tok); return (frequency_low <= count && count <= frequency_high); } /* Convert the regular expression that we used to locate identifiers in the id database into one suitable for locating the identifiers in files. */ static char const * file_regexp (char const *name_0, char const *left_delimit, char const *right_delimit) { static char pat_buf[BUFSIZ]; char *name = (char *) name_0; if (query_function == query_number && key_style == ks_pattern) { sprintf (pat_buf, "%s0*[Xx]*0*%d[Ll]*%s", left_delimit, stoi (name), right_delimit); return pat_buf; } if (!is_regexp (name) && name[0] != '^') return 0; if (name[0] == '^') name_0++; else left_delimit = ""; while (*++name) ; if (*--name == '$') *name = '\0'; else right_delimit = ""; sprintf (pat_buf, "%s%s%s", left_delimit, name_0, right_delimit); return pat_buf; } static off_t query_binary_search (char const *token_0) { off_t offset = 0; off_t start = idh.idh_tokens_offset - 2; off_t end = idh.idh_end_offset; off_t anchor_offset = 0; int order = -1; while (start < end) { int c; int incr = 1; char const *token; offset = start + (end - start) / 2; fseek (idh.idh_FILE, offset, SEEK_SET); offset += skip_past_00 (idh.idh_FILE); if (offset >= end) { offset = start + 2; fseek (idh.idh_FILE, offset, SEEK_SET); } /* compare the token names */ token = token_0; while (*token == (c = getc (idh.idh_FILE)) && *token && c) { token++; incr++; } if (c && !*token && query_function == query_literal_prefix) anchor_offset = offset; order = *token - c; if (order < 0) end = offset - 2; else if (order > 0) start = offset + incr + skip_past_00 (idh.idh_FILE) - 2; else break; } if (order) { if (anchor_offset) offset = anchor_offset; else return 0; } fseek (idh.idh_FILE, offset, SEEK_SET); return offset; } /* Are there any regexp meta-characters in name?? */ static int _GL_ATTRIBUTE_PURE is_regexp (char *name) { int backslash = 0; if (*name == '^') name++; else if (strnequ (name, "\\<", 2)) name += 2; while (*name) { if (*name == '\\') { if (strchr ("<>", name[1])) return 1; name++, backslash++; } else if (strchr ("[]().*+^$", *name)) return 1; name++; } if (backslash) while (*name) { if (*name == '\\') strcpy (name, name + 1); name++; } return 0; } static int has_left_delimiter (char const *pattern) { return (*pattern == '^' || strnequ (pattern, "\\<", 2)); } static int has_right_delimiter (char const *pattern) { return (pattern[-1] == '$' || strequ (pattern - 2, "\\>")); } /* Does `name' occur in `line' delimited by non-alphanumerics?? */ static int _GL_ATTRIBUTE_PURE word_match (char const *name_0, char const *line) { char const *name = name_0; for (;;) { /* find an initial-character match */ while (*line != *name) { if (*line == '\0' || *line == '\n') return 0; line++; } /* do we have a word delimiter on the left ?? */ if (IS_ALNUM (line[-1])) { line++; continue; } /* march down both strings as long as we match */ while (*++name == *++line) ; /* is this the end of `name', is there a word delimiter ?? */ if (*name == '\0' && !IS_ALNUM (*line)) return 1; name = name_0; } } /* Use the C lexical rules to determine an ascii number's radix. The radix is returned as a bit map, so that more than one radix may apply. In particular, it is impossible to determine the radix of 0, so return all possibilities. */ static int _GL_ATTRIBUTE_PURE get_radix (char const *str) { if (!isdigit (*str)) return 0; if (*str != '0') return radix_dec; str++; if (*str == 'x' || *str == 'X') return radix_hex; while (*str && *str == '0') str++; return (*str ? radix_oct : (radix_oct | radix_dec)); } static int is_number (char const *str) { if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) { str += 2; str += strspn (str, "0123456789aAbBcCdDeEfF"); } else { size_t offn; str += (offn = strspn (str, "0123456789")); if (offn) str += strspn (str, "uUlL"); } return (*str == '\0'); } /* Convert an ascii string number to an integer. Determine the radix before converting. */ static int stoi (char const *str) { switch (get_radix (str)) { case radix_dec: return (dtoi (str)); case radix_oct: return (otoi (&str[1])); case radix_hex: return (xtoi (&str[2])); case radix_dec | radix_oct: return 0; default: return -1; } } /* Convert an ascii octal number to an integer. */ static int _GL_ATTRIBUTE_PURE otoi (char const *str) { int n = 0; while (*str >= '0' && *str <= '7') { n *= 010; n += *str++ - '0'; } while (*str && strchr ("uUlL", *str)) str++; return (*str ? -1 : n); } /* Convert an ascii decimal number to an integer. */ static int _GL_ATTRIBUTE_PURE dtoi (char const *str) { int n = 0; while (isdigit (*str)) { n *= 10; n += *str++ - '0'; } while (*str && strchr ("uUlL", *str)) str++; return (*str ? -1 : n); } /* Convert an ascii hex number to an integer. */ static int _GL_ATTRIBUTE_PURE xtoi (char const *str) { int n = 0; while (isxdigit (*str)) { n *= 0x10; if (isdigit (*str)) n += *str++ - '0'; else if (islower (*str)) n += 0xa + *str++ - 'a'; else n += 0xA + *str++ - 'A'; } while (*str && strchr ("uUlL", *str)) str++; return (*str ? -1 : n); } static unsigned char * tree8_to_bits (unsigned char *bv_0, unsigned char const *hits_tree8) { unsigned char* bv = bv_0; tree8_to_bits_1 (&bv, &hits_tree8, tree8_levels); return bv_0; } static void tree8_to_bits_1 (unsigned char **bv, unsigned char const **hits_tree8, int level) { int hits = *(*hits_tree8)++; if (--level) { int incr = 1 << ((level - 1) * 3); int bit; for (bit = 1; bit & 0xff; bit <<= 1) { if (bit & hits) tree8_to_bits_1 (bv, hits_tree8, level); else *bv += incr; } } else *(*bv)++ |= hits; } static struct file_link ** bits_to_flinkv (unsigned char const *bv) { int const reserved_flinkv_slots = 3; static struct file_link **flinkv_0; struct file_link **flinkv; struct file_link **members = members_0; struct file_link **end = &members_0[idh.idh_files]; if (flinkv_0 == 0) flinkv_0 = xmalloc (sizeof(struct file_link *) * (idh.idh_files + reserved_flinkv_slots + 2)); flinkv = &flinkv_0[reserved_flinkv_slots]; for (;;) { int hits; int bit; while (*bv == 0) { bv++; members += 8; if (members >= end) goto out; } hits = *bv++; for (bit = 1; bit & 0xff; bit <<= 1) { if (bit & hits) *flinkv++ = *members; if (++members >= end) goto out; } } out: *flinkv = 0; return &flinkv_0[reserved_flinkv_slots]; } static struct file_link ** tree8_to_flinkv (unsigned char const *hits_tree8) { memset (bits_vec, 0, bits_vec_size); return bits_to_flinkv (tree8_to_bits (bits_vec, hits_tree8)); } #if HAVE_TERMIOS_H static struct termios linemode; static struct termios charmode; static struct termios savemode; #define GET_TTY_MODES(modes) tcgetattr (0, (modes)) #define SET_TTY_MODES(modes) tcsetattr(0, TCSANOW, (modes)) #else /* not HAVE_TERMIOS_H */ #include <sys/ioctl.h> # if HAVE_TERMIO_H # include <termio.h> static struct termio linemode; static struct termio charmode; static struct termio savemode; #define GET_TTY_MODES(modes) ioctl (0, TCGETA, (modes)) #define SET_TTY_MODES(modes) ioctl (0, TCSETA, (modes)) # else /* not HAVE_TERMIO_H */ # if HAVE_SGTTY_H # include <sgtty.h> static struct sgttyb linemode; static struct sgttyb charmode; static struct sgttyb savemode; # ifdef TIOCGETP #define GET_TTY_MODES(modes) ioctl (0, TIOCGETP, (modes)) #define SET_TTY_MODES(modes) ioctl (0, TIOCSETP, (modes)) # else #define GET_TTY_MODES(modes) gtty (0, (modes)) #define SET_TTY_MODES(modes) stty (0, (modes)) # endif # else /* not HAVE_SGTTY_H */ #define GET_TTY_MODES(modes) #define SET_TTY_MODES(modes) # endif /* not HAVE_SGTTY_H */ # endif /* not HAVE_TERMIO_H */ #endif /* not HAVE_TERMIOS_H */ #if HAVE_TERMIOS_H || HAVE_TERMIO_H static void savetty (void) { GET_TTY_MODES (&savemode); charmode = linemode = savemode; charmode.c_lflag &= ~(ECHO | ICANON | ISIG); charmode.c_cc[VMIN] = 1; charmode.c_cc[VTIME] = 0; linemode.c_lflag |= (ECHO | ICANON | ISIG); linemode.c_cc[VEOF] = 'd' & 037; linemode.c_cc[VEOL] = 0377; } #else /* not (HAVE_TERMIOS_H || HAVE_TERMIO_H) */ # if HAVE_SGTTY_H static void savetty (void) { # ifdef TIOCGETP ioctl(0, TIOCGETP, &savemode); # else gtty(0, &savemode); # endif charmode = linemode = savemode; charmode.sg_flags &= ~ECHO; charmode.sg_flags |= RAW; linemode.sg_flags |= ECHO; linemode.sg_flags &= ~RAW; } # else /* not HAVE_SGTTY_H */ static void savetty (void) { } # endif /* not HAVE_SGTTY_H */ #endif /* not (HAVE_TERMIOS_H || HAVE_TERMIO_H) */ static void restoretty (void) { SET_TTY_MODES (&savemode); } static void chartty (void) { SET_TTY_MODES (&charmode); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/defid������������������������������������������������������������������0000775�0000000�0000000�00000000334�11434330764�013200� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh case $1 in --h|--he|--hel|--help|--v|--ve|--ver|--vers|--versi|--versio|--version) exec gid "$@";; esac for sym do gid $sym |egrep '(}[ ]*|:[ ]*#[ ]*define[ ]+)'$sym'|typedef\>.*[ ]+'$sym done ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/lid-lid.c��������������������������������������������������������������0000664�0000000�0000000�00000000070�11434330764�013656� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "lid.h" enum lid_mode lid_mode = LID_MODE_LID; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/lid-eid.c��������������������������������������������������������������0000664�0000000�0000000�00000000070�11434330764�013647� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "lid.h" enum lid_mode lid_mode = LID_MODE_EID; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/src/lid-gid.c��������������������������������������������������������������0000664�0000000�0000000�00000000070�11434330764�013651� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "lid.h" enum lid_mode lid_mode = LID_MODE_GID; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/��������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465166�014026� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-xalloc-die.c���������������������������������������������0000664�0000000�0000000�00000001717�12166360012�017170� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of xalloc_die() function. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson <simon@josefsson.org>, 2009. */ #include <config.h> #include "xalloc.h" #include "progname.h" int main (int argc _GL_UNUSED, char **argv) { set_program_name (argv[0]); xalloc_die (); return 0; } �������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-setlocale2.sh��������������������������������������������0000775�0000000�0000000�00000001345�12166360012�017374� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test locale names with likely unsupported encoding in Unix syntax. for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1 done # Test locale names with likely unsupported encoding in native Windows syntax. for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \ French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \ Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do # Here we use 'env' to set the LC_ALL environment variable, because on # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001. env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1 done exit 0 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-verify.c�������������������������������������������������0000664�0000000�0000000�00000003503�12166360012�016446� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test the "verify" module. Copyright (C) 2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible. */ #include <config.h> #include "verify.h" #ifndef EXP_FAIL # define EXP_FAIL 0 #endif int x; enum { a, b, c }; #if EXP_FAIL == 1 verify (x >= 0); /* should give ERROR: non-constant expression */ #endif verify (c == 2); /* should be ok */ #if EXP_FAIL == 2 verify (1 + 1 == 3); /* should give ERROR */ #endif verify (1 == 1); verify (1 == 1); /* should be ok */ enum { item = verify_true (1 == 1) * 0 + 17 /* should be ok */ }; static int function (int n) { #if EXP_FAIL == 3 verify (n >= 0); /* should give ERROR: non-constant expression */ #endif verify (c == 2); /* should be ok */ #if EXP_FAIL == 4 verify (1 + 1 == 3); /* should give ERROR */ #endif verify (1 == 1); verify (1 == 1); /* should be ok */ if (n) return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* should be ok */ #if EXP_FAIL == 5 return verify_expr (1 == 2, 5); /* should give ERROR */ #endif return 0; } int main (void) { return !(function (0) == 0 && function (1) == 8); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fstatat.c������������������������������������������������0000664�0000000�0000000�00000005006�12166360012�016610� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of fstatat. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <sys/stat.h> #include "signature.h" SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int)); #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "openat.h" #include "progname.h" #include "same-inode.h" #include "ignore-value.h" #include "macros.h" #define BASE "test-fstatat.t" #include "test-lstat.h" #include "test-stat.h" static int dfd = AT_FDCWD; /* Wrapper around fstatat to test stat behavior. */ static int do_stat (char const *name, struct stat *st) { return statat (dfd, name, st); } /* Wrapper around fstatat to test lstat behavior. */ static int do_lstat (char const *name, struct stat *st) { return lstatat (dfd, name, st); } int main (int argc _GL_UNUSED, char *argv[]) { int result; set_program_name (argv[0]); /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); /* Test behaviour for invalid file descriptors. */ { struct stat statbuf; errno = 0; ASSERT (fstatat (-1, "foo", &statbuf, 0) == -1); ASSERT (errno == EBADF); } { struct stat statbuf; errno = 0; ASSERT (fstatat (99, "foo", &statbuf, 0) == -1); ASSERT (errno == EBADF); } result = test_stat_func (do_stat, false); ASSERT (test_lstat_func (do_lstat, false) == result); dfd = open (".", O_RDONLY); ASSERT (0 <= dfd); ASSERT (test_stat_func (do_stat, false) == result); ASSERT (test_lstat_func (do_lstat, false) == result); ASSERT (close (dfd) == 0); /* FIXME - add additional tests of dfd not at current directory. */ if (result == 77) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return result; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseterr.c������������������������������������������������0000664�0000000�0000000�00000002356�12166360012�016621� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test setting the error indicator of a stream. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "fseterr.h" #include <stdio.h> #include <stdlib.h> int main () { /* All streams are initially created with the error indicator cleared. */ if (ferror (stdout)) abort (); /* Verify that fseterr() works. */ fseterr (stdout); if (!ferror (stdout)) abort (); /* Verify fseterr's effect can be undone by clearerr(). */ clearerr (stdout); if (ferror (stdout)) abort (); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/argmatch.c����������������������������������������������������0000664�0000000�0000000�00000017246�12166360012�015764� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* argmatch.c -- find a match for a string in an array Copyright (C) 1990, 1998-1999, 2001-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by David MacKenzie <djm@ai.mit.edu> Modified by Akim Demaille <demaille@inf.enst.fr> */ #include <config.h> /* Specification. */ #include "argmatch.h" #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gettext.h" #define _(msgid) gettext (msgid) #include "error.h" #include "quotearg.h" #include "quote.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif /* When reporting an invalid argument, show nonprinting characters by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use literal_quoting_style. */ #ifndef ARGMATCH_QUOTING_STYLE # define ARGMATCH_QUOTING_STYLE locale_quoting_style #endif /* Non failing version of argmatch call this function after failing. */ #ifndef ARGMATCH_DIE # include "exitfail.h" # define ARGMATCH_DIE exit (exit_failure) #endif #ifdef ARGMATCH_DIE_DECL ARGMATCH_DIE_DECL; #endif static void __argmatch_die (void) { ARGMATCH_DIE; } /* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h. Default to __argmatch_die, but allow caller to change this at run-time. */ argmatch_exit_fn argmatch_die = __argmatch_die; /* If ARG is an unambiguous match for an element of the NULL-terminated array ARGLIST, return the index in ARGLIST of the matched element, else -1 if it does not match any element or -2 if it is ambiguous (is a prefix of more than one element). If VALLIST is none null, use it to resolve ambiguities limited to synonyms, i.e., for "yes", "yop" -> 0 "no", "nope" -> 1 "y" is a valid argument, for 0, and "n" for 1. */ ptrdiff_t argmatch (const char *arg, const char *const *arglist, const char *vallist, size_t valsize) { size_t i; /* Temporary index in ARGLIST. */ size_t arglen; /* Length of ARG. */ ptrdiff_t matchind = -1; /* Index of first nonexact match. */ bool ambiguous = false; /* If true, multiple nonexact match(es). */ arglen = strlen (arg); /* Test all elements for either exact match or abbreviated matches. */ for (i = 0; arglist[i]; i++) { if (!strncmp (arglist[i], arg, arglen)) { if (strlen (arglist[i]) == arglen) /* Exact match found. */ return i; else if (matchind == -1) /* First nonexact match found. */ matchind = i; else { /* Second nonexact match found. */ if (vallist == NULL || memcmp (vallist + valsize * matchind, vallist + valsize * i, valsize)) { /* There is a real ambiguity, or we could not disambiguate. */ ambiguous = true; } } } } if (ambiguous) return -2; else return matchind; } /* Error reporting for argmatch. CONTEXT is a description of the type of entity that was being matched. VALUE is the invalid value that was given. PROBLEM is the return value from argmatch. */ void argmatch_invalid (const char *context, const char *value, ptrdiff_t problem) { char const *format = (problem == -1 ? _("invalid argument %s for %s") : _("ambiguous argument %s for %s")); error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value), quote_n (1, context)); } /* List the valid arguments for argmatch. ARGLIST is the same as in argmatch. VALLIST is a pointer to an array of values. VALSIZE is the size of the elements of VALLIST */ void argmatch_valid (const char *const *arglist, const char *vallist, size_t valsize) { size_t i; const char *last_val = NULL; /* We try to put synonyms on the same line. The assumption is that synonyms follow each other */ fputs (_("Valid arguments are:"), stderr); for (i = 0; arglist[i]; i++) if ((i == 0) || memcmp (last_val, vallist + valsize * i, valsize)) { fprintf (stderr, "\n - %s", quote (arglist[i])); last_val = vallist + valsize * i; } else { fprintf (stderr, ", %s", quote (arglist[i])); } putc ('\n', stderr); } /* Never failing versions of the previous functions. CONTEXT is the context for which argmatch is called (e.g., "--version-control", or "$VERSION_CONTROL" etc.). Upon failure, calls the (supposed never to return) function EXIT_FN. */ ptrdiff_t __xargmatch_internal (const char *context, const char *arg, const char *const *arglist, const char *vallist, size_t valsize, argmatch_exit_fn exit_fn) { ptrdiff_t res = argmatch (arg, arglist, vallist, valsize); if (res >= 0) /* Success. */ return res; /* We failed. Explain why. */ argmatch_invalid (context, arg, res); argmatch_valid (arglist, vallist, valsize); (*exit_fn) (); return -1; /* To please the compilers. */ } /* Look for VALUE in VALLIST, an array of objects of size VALSIZE and return the first corresponding argument in ARGLIST */ const char * argmatch_to_argument (const char *value, const char *const *arglist, const char *vallist, size_t valsize) { size_t i; for (i = 0; arglist[i]; i++) if (!memcmp (value, vallist + valsize * i, valsize)) return arglist[i]; return NULL; } #ifdef TEST /* * Based on "getversion.c" by David MacKenzie <djm@gnu.ai.mit.edu> */ char *program_name; /* When to make backup files. */ enum backup_type { /* Never make backups. */ no_backups, /* Make simple backups of every file. */ simple_backups, /* Make numbered backups of files that already have numbered backups, and simple backups of the others. */ numbered_existing_backups, /* Make numbered backups of every file. */ numbered_backups }; /* Two tables describing arguments (keys) and their corresponding values */ static const char *const backup_args[] = { "no", "none", "off", "simple", "never", "existing", "nil", "numbered", "t", 0 }; static const enum backup_type backup_vals[] = { no_backups, no_backups, no_backups, simple_backups, simple_backups, numbered_existing_backups, numbered_existing_backups, numbered_backups, numbered_backups }; int main (int argc, const char *const *argv) { const char *cp; enum backup_type backup_type = no_backups; program_name = (char *) argv[0]; if (argc > 2) { fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name); exit (1); } if ((cp = getenv ("VERSION_CONTROL"))) backup_type = XARGMATCH ("$VERSION_CONTROL", cp, backup_args, backup_vals); if (argc == 2) backup_type = XARGMATCH (program_name, argv[1], backup_args, backup_vals); printf ("The version control is '%s'\n", ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals)); return 0; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fgetc.c��������������������������������������������������0000664�0000000�0000000�00000004765�12166360012�016245� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fgetc() function. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fgetc, int, (FILE *)); #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "msvc-inval.h" #include "macros.h" int main (int argc, char **argv) { const char *filename = "test-fgetc.txt"; /* We don't have an fgetc() function that installs an invalid parameter handler so far. So install that handler here, explicitly. */ #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING gl_msvc_inval_ensure_handler (); #endif /* Prepare a file. */ { const char text[] = "hello world"; int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600); ASSERT (fd >= 0); ASSERT (write (fd, text, sizeof (text)) == sizeof (text)); ASSERT (close (fd) == 0); } /* Test that fgetc() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "r"); ASSERT (fp != NULL); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fgetc (fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } /* Test that fgetc() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "r"); if (fp != NULL) { errno = 0; ASSERT (fgetc (fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } { FILE *fp = fdopen (99, "r"); if (fp != NULL) { errno = 0; ASSERT (fgetc (fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } /* Clean up. */ unlink (filename); return 0; } �����������id-utils-4.6+git20120811/gnulib-tests/test-exclude.c������������������������������������������������0000664�0000000�0000000�00000006261�12166360012�016577� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test suite for exclude. Copyright (C) 2009-2012 Free Software Foundation, Inc. This file is part of the GNUlib Library. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <stdbool.h> #include <fnmatch.h> #include "exclude.h" #include "progname.h" #include "error.h" #include "argmatch.h" #ifndef FNM_CASEFOLD # define FNM_CASEFOLD 0 #endif #ifndef FNM_LEADING_DIR # define FNM_LEADING_DIR 0 #endif char const * const exclude_keywords[] = { "noescape", "pathname", "period", "leading_dir", "casefold", "anchored", "include", "wildcards", NULL }; int exclude_flags[] = { FNM_NOESCAPE, FNM_PATHNAME, FNM_PERIOD, FNM_LEADING_DIR, FNM_CASEFOLD, EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS }; ARGMATCH_VERIFY (exclude_keywords, exclude_flags); /* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL _Noreturn ARGMATCH_DIE_DECL; ARGMATCH_DIE_DECL { exit (1); } #endif int main (int argc, char **argv) { int exclude_options = 0; struct exclude *exclude = new_exclude (); set_program_name (argv[0]); if (argc == 1) error (1, 0, "usage: %s file -- words...", argv[0]); while (--argc) { char *opt = *++argv; if (opt[0] == '-') { int neg = 0; int flag; char *s = opt + 1; if (opt[1] == '-' && opt[2] == 0) { argc--; break; } if (strlen (s) > 3 && memcmp (s, "no-", 3) == 0) { neg = 1; s += 3; } flag = XARGMATCH (opt, s, exclude_keywords, exclude_flags); if (neg) exclude_options &= ~flag; else exclude_options |= flag; /* Skip this test if invoked with -leading-dir on a system that lacks support for FNM_LEADING_DIR. */ if (strcmp (s, "leading_dir") == 0 && FNM_LEADING_DIR == 0) exit (77); /* Likewise for -casefold and FNM_CASEFOLD. */ if (strcmp (s, "casefold") == 0 && FNM_CASEFOLD == 0) exit (77); } else if (add_exclude_file (add_exclude, exclude, opt, exclude_options, '\n') != 0) error (1, errno, "error loading %s", opt); } for (; argc; --argc) { char *word = *++argv; printf ("%s: %d\n", word, excluded_file_name (exclude, word)); } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello3.c������������������������������������������������0000664�0000000�0000000�00000004030�12166360012�016506� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of ftello() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include <string.h> #include "macros.h" #define TESTFILE "t-ftello3.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) goto skip; if (fwrite ("foogarsh", 1, 8, fp) < 8) goto skip; if (fclose (fp)) goto skip; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) goto skip; if (fseek (fp, -1, SEEK_END)) goto skip; ASSERT (getc (fp) == 'h'); ASSERT (getc (fp) == EOF); ASSERT (ftello (fp) == 8); ASSERT (ftello (fp) == 8); ASSERT (putc ('!', fp) == '!'); ASSERT (ftello (fp) == 9); ASSERT (fclose (fp) == 0); fp = fopen (TESTFILE, "r"); if (fp == NULL) goto skip; { char buf[10]; ASSERT (fread (buf, 1, 10, fp) == 9); ASSERT (memcmp (buf, "foogarsh!", 9) == 0); } ASSERT (fclose (fp) == 0); /* The file's contents is now "foogarsh!". */ remove (TESTFILE); return 0; skip: fprintf (stderr, "Skipping test: prerequisite file operations failed.\n"); remove (TESTFILE); return 77; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftell3.c�������������������������������������������������0000664�0000000�0000000�00000004023�12166360012�016331� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of ftell() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include <string.h> #include "macros.h" #define TESTFILE "t-ftell3.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) goto skip; if (fwrite ("foogarsh", 1, 8, fp) < 8) goto skip; if (fclose (fp)) goto skip; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) goto skip; if (fseek (fp, -1, SEEK_END)) goto skip; ASSERT (getc (fp) == 'h'); ASSERT (getc (fp) == EOF); ASSERT (ftell (fp) == 8); ASSERT (ftell (fp) == 8); ASSERT (putc ('!', fp) == '!'); ASSERT (ftell (fp) == 9); ASSERT (fclose (fp) == 0); fp = fopen (TESTFILE, "r"); if (fp == NULL) goto skip; { char buf[10]; ASSERT (fread (buf, 1, 10, fp) == 9); ASSERT (memcmp (buf, "foogarsh!", 9) == 0); } ASSERT (fclose (fp) == 0); /* The file's contents is now "foogarsh!". */ remove (TESTFILE); return 0; skip: fprintf (stderr, "Skipping test: prerequisite file operations failed.\n"); remove (TESTFILE); return 77; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-strnlen.c������������������������������������������������0000664�0000000�0000000�00000003361�12166360012�016631� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2010-2012 Free Software Foundation, Inc. * Written by Eric Blake * * 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <string.h> #include "signature.h" SIGNATURE_CHECK (strnlen, size_t, (char const *, size_t)); #include <stdlib.h> #include "zerosize-ptr.h" #include "macros.h" int main (void) { size_t i; char *page_boundary = (char *) zerosize_ptr (); if (!page_boundary) { page_boundary = malloc (0x1000); ASSERT (page_boundary); page_boundary += 0x1000; } /* Basic behavior tests. */ ASSERT (strnlen ("a", 0) == 0); ASSERT (strnlen ("a", 1) == 1); ASSERT (strnlen ("a", 2) == 1); ASSERT (strnlen ("", 0x100000) == 0); /* Memory fence and alignment testing. */ for (i = 0; i < 512; i++) { char *start = page_boundary - i; size_t j = i; memset (start, 'x', i); do { if (i != j) { start[j] = 0; ASSERT (strnlen (start, i + j) == j); } ASSERT (strnlen (start, i) == j); ASSERT (strnlen (start, j) == j); } while (j--); } return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/�����������������������������������������������������0000775�0000000�0000000�00000000000�12210465166�015620� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/lock.h�����������������������������������������������0000664�0000000�0000000�00000106763�12165627373�016747� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Locking in multithreaded situations. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains locking primitives for use with a given thread library. It does not contain primitives for creating threads or for other synchronization primitives. Normal (non-recursive) locks: Type: gl_lock_t Declaration: gl_lock_define(extern, name) Initializer: gl_lock_define_initialized(, name) Initialization: gl_lock_init (name); Taking the lock: gl_lock_lock (name); Releasing the lock: gl_lock_unlock (name); De-initialization: gl_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_lock_init (&name); Taking the lock: err = glthread_lock_lock (&name); Releasing the lock: err = glthread_lock_unlock (&name); De-initialization: err = glthread_lock_destroy (&name); Read-Write (non-recursive) locks: Type: gl_rwlock_t Declaration: gl_rwlock_define(extern, name) Initializer: gl_rwlock_define_initialized(, name) Initialization: gl_rwlock_init (name); Taking the lock: gl_rwlock_rdlock (name); gl_rwlock_wrlock (name); Releasing the lock: gl_rwlock_unlock (name); De-initialization: gl_rwlock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_rwlock_init (&name); Taking the lock: err = glthread_rwlock_rdlock (&name); err = glthread_rwlock_wrlock (&name); Releasing the lock: err = glthread_rwlock_unlock (&name); De-initialization: err = glthread_rwlock_destroy (&name); Recursive locks: Type: gl_recursive_lock_t Declaration: gl_recursive_lock_define(extern, name) Initializer: gl_recursive_lock_define_initialized(, name) Initialization: gl_recursive_lock_init (name); Taking the lock: gl_recursive_lock_lock (name); Releasing the lock: gl_recursive_lock_unlock (name); De-initialization: gl_recursive_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_recursive_lock_init (&name); Taking the lock: err = glthread_recursive_lock_lock (&name); Releasing the lock: err = glthread_recursive_lock_unlock (&name); De-initialization: err = glthread_recursive_lock_destroy (&name); Once-only execution: Type: gl_once_t Initializer: gl_once_define(extern, name) Execution: gl_once (name, initfunction); Equivalent functions with control of error handling: Execution: err = glthread_once (&name, initfunction); */ #ifndef _LOCK_H #define _LOCK_H #include <errno.h> #include <stdlib.h> /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include <pthread.h> # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_mutex_init # pragma weak pthread_mutex_lock # pragma weak pthread_mutex_unlock # pragma weak pthread_mutex_destroy # pragma weak pthread_rwlock_init # pragma weak pthread_rwlock_rdlock # pragma weak pthread_rwlock_wrlock # pragma weak pthread_rwlock_unlock # pragma weak pthread_rwlock_destroy # pragma weak pthread_once # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # pragma weak pthread_mutexattr_init # pragma weak pthread_mutexattr_settype # pragma weak pthread_mutexattr_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pthread_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTHREAD_MUTEX_INITIALIZER # define glthread_lock_init(LOCK) \ (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) # define glthread_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # ifdef PTHREAD_RWLOCK_INITIALIZER typedef pthread_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTHREAD_RWLOCK_INITIALIZER # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) # else typedef struct { int initialized; pthread_mutex_t guard; /* protects the initialization */ pthread_rwlock_t rwlock; /* read-write lock */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0, PTHREAD_MUTEX_INITIALIZER } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif # else typedef struct { pthread_mutex_t lock; /* protects the remaining fields */ pthread_cond_t waiting_readers; /* waiting readers */ pthread_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP typedef pthread_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; # ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER # else # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # endif # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); # else typedef struct { pthread_mutex_t recmutex; /* recursive mutex */ pthread_mutex_t guard; /* protects the initialization */ int initialized; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif # else /* Old versions of POSIX threads on Solaris did not have recursive locks. We have to implement them ourselves. */ typedef struct { pthread_mutex_t mutex; pthread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif /* -------------------------- gl_once_t datatype -------------------------- */ typedef pthread_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pthread_in_use () \ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_singlethreaded (pthread_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include <pth.h> # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_mutex_init # pragma weak pth_mutex_acquire # pragma weak pth_mutex_release # pragma weak pth_rwlock_init # pragma weak pth_rwlock_acquire # pragma weak pth_rwlock_release # pragma weak pth_once # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pth_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTH_MUTEX_INIT # define glthread_lock_init(LOCK) \ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_lock_lock(LOCK) \ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_lock_unlock(LOCK) \ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef pth_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTH_RWLOCK_INIT # define glthread_rwlock_init(LOCK) \ (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) # define glthread_rwlock_rdlock(LOCK) \ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) # define glthread_rwlock_wrlock(LOCK) \ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) # define glthread_rwlock_unlock(LOCK) \ (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) # define glthread_rwlock_destroy(LOCK) \ ((void)(LOCK), 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* In Pth, mutexes are recursive by default. */ typedef pth_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ PTH_MUTEX_INIT # define glthread_recursive_lock_init(LOCK) \ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_recursive_lock_lock(LOCK) \ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_recursive_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* -------------------------- gl_once_t datatype -------------------------- */ typedef pth_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pth_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (pth_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include <thread.h> # include <synch.h> # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak mutex_init # pragma weak mutex_lock # pragma weak mutex_unlock # pragma weak mutex_destroy # pragma weak rwlock_init # pragma weak rw_rdlock # pragma weak rw_wrlock # pragma weak rw_unlock # pragma weak rwlock_destroy # pragma weak thr_self # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ DEFAULTMUTEX # define glthread_lock_init(LOCK) \ (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_lock_lock(LOCK) \ (thread_in_use () ? mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (thread_in_use () ? mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (thread_in_use () ? mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ DEFAULTRWLOCK # define glthread_rwlock_init(LOCK) \ (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (thread_in_use () ? rw_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (thread_in_use () ? rw_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (thread_in_use () ? rw_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (thread_in_use () ? rwlock_destroy (LOCK) : 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* Old Solaris threads did not have recursive locks. We have to implement them ourselves. */ typedef struct { mutex_t mutex; thread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { DEFAULTMUTEX, (thread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; mutex_t mutex; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (thread_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus extern "C" { # endif /* We can use CRITICAL_SECTION directly, rather than the native Windows Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection does not work on Windows 95/98/ME. Packages that need trylock usually define their own mutex type.) */ /* There is no way to statically initialize a CRITICAL_SECTION. It needs to be done lazily, once only. For this we need spinlocks. */ typedef struct { volatile int done; volatile long started; } gl_spinlock_t; /* -------------------------- gl_lock_t datatype -------------------------- */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; } gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME = gl_lock_initializer; # define gl_lock_initializer \ { { 0, -1 } } # define glthread_lock_init(LOCK) \ (glthread_lock_init_func (LOCK), 0) # define glthread_lock_lock(LOCK) \ glthread_lock_lock_func (LOCK) # define glthread_lock_unlock(LOCK) \ glthread_lock_unlock_func (LOCK) # define glthread_lock_destroy(LOCK) \ glthread_lock_destroy_func (LOCK) extern void glthread_lock_init_func (gl_lock_t *lock); extern int glthread_lock_lock_func (gl_lock_t *lock); extern int glthread_lock_unlock_func (gl_lock_t *lock); extern int glthread_lock_destroy_func (gl_lock_t *lock); /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* It is impossible to implement read-write locks using plain locks, without introducing an extra thread dedicated to managing read-write locks. Therefore here we need to use the low-level Event type. */ typedef struct { HANDLE *array; /* array of waiting threads, each represented by an event */ unsigned int count; /* number of waiting threads */ unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } gl_carray_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_carray_waitqueue_t waiting_readers; /* waiting readers */ gl_carray_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { { 0, -1 } } # define glthread_rwlock_init(LOCK) \ (glthread_rwlock_init_func (LOCK), 0) # define glthread_rwlock_rdlock(LOCK) \ glthread_rwlock_rdlock_func (LOCK) # define glthread_rwlock_wrlock(LOCK) \ glthread_rwlock_wrlock_func (LOCK) # define glthread_rwlock_unlock(LOCK) \ glthread_rwlock_unlock_func (LOCK) # define glthread_rwlock_destroy(LOCK) \ glthread_rwlock_destroy_func (LOCK) extern void glthread_rwlock_init_func (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* The native Windows documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ DWORD owner; unsigned long depth; CRITICAL_SECTION lock; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { { 0, -1 }, 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (glthread_recursive_lock_init_func (LOCK), 0) # define glthread_recursive_lock_lock(LOCK) \ glthread_recursive_lock_lock_func (LOCK) # define glthread_recursive_lock_unlock(LOCK) \ glthread_recursive_lock_unlock_func (LOCK) # define glthread_recursive_lock_destroy(LOCK) \ glthread_recursive_lock_destroy_func (LOCK) extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; volatile long started; CRITICAL_SECTION lock; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { -1, -1 }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ /* -------------------------- gl_lock_t datatype -------------------------- */ typedef int gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) # define gl_lock_define_initialized(STORAGECLASS, NAME) # define glthread_lock_init(NAME) 0 # define glthread_lock_lock(NAME) 0 # define glthread_lock_unlock(NAME) 0 # define glthread_lock_destroy(NAME) 0 /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef int gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) # define gl_rwlock_define_initialized(STORAGECLASS, NAME) # define glthread_rwlock_init(NAME) 0 # define glthread_rwlock_rdlock(NAME) 0 # define glthread_rwlock_wrlock(NAME) 0 # define glthread_rwlock_unlock(NAME) 0 # define glthread_rwlock_destroy(NAME) 0 /* --------------------- gl_recursive_lock_t datatype --------------------- */ typedef int gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) # define glthread_recursive_lock_init(NAME) 0 # define glthread_recursive_lock_lock(NAME) 0 # define glthread_recursive_lock_unlock(NAME) 0 # define glthread_recursive_lock_destroy(NAME) 0 /* -------------------------- gl_once_t datatype -------------------------- */ typedef int gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = 0; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) #endif /* ========================================================================= */ /* Macros with built-in error handling. */ /* -------------------------- gl_lock_t datatype -------------------------- */ #define gl_lock_init(NAME) \ do \ { \ if (glthread_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_lock(NAME) \ do \ { \ if (glthread_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_unlock(NAME) \ do \ { \ if (glthread_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_destroy(NAME) \ do \ { \ if (glthread_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ #define gl_rwlock_init(NAME) \ do \ { \ if (glthread_rwlock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_rdlock(NAME) \ do \ { \ if (glthread_rwlock_rdlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_wrlock(NAME) \ do \ { \ if (glthread_rwlock_wrlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_unlock(NAME) \ do \ { \ if (glthread_rwlock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_destroy(NAME) \ do \ { \ if (glthread_rwlock_destroy (&NAME)) \ abort (); \ } \ while (0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ #define gl_recursive_lock_init(NAME) \ do \ { \ if (glthread_recursive_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_lock(NAME) \ do \ { \ if (glthread_recursive_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_unlock(NAME) \ do \ { \ if (glthread_recursive_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_destroy(NAME) \ do \ { \ if (glthread_recursive_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* -------------------------- gl_once_t datatype -------------------------- */ #define gl_once(NAME, INITFUNCTION) \ do \ { \ if (glthread_once (&NAME, INITFUNCTION)) \ abort (); \ } \ while (0) /* ========================================================================= */ #endif /* _LOCK_H */ �������������id-utils-4.6+git20120811/gnulib-tests/glthread/thread.c���������������������������������������������0000664�0000000�0000000�00000014300�12165627373�017242� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Creating and controlling threads. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include <config.h> /* Specification. */ #include "glthread/thread.h" #include <stdlib.h> #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS #include <pthread.h> #ifdef PTW32_VERSION const gl_thread_t gl_null_thread /* = { .p = NULL } */; #endif #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS #include <process.h> /* -------------------------- gl_thread_t datatype -------------------------- */ /* The Thread-Local Storage (TLS) key that allows to access each thread's 'struct gl_thread_struct *' pointer. */ static DWORD self_key = (DWORD)-1; /* Initializes self_key. This function must only be called once. */ static void do_init_self_key (void) { self_key = TlsAlloc (); /* If this fails, we're hosed. */ if (self_key == (DWORD)-1) abort (); } /* Initializes self_key. */ static void init_self_key (void) { gl_once_define(static, once) gl_once (once, do_init_self_key); } /* This structure contains information about a thread. It is stored in TLS under key self_key. */ struct gl_thread_struct { /* Fields for managing the handle. */ HANDLE volatile handle; CRITICAL_SECTION handle_lock; /* Fields for managing the exit value. */ void * volatile result; /* Fields for managing the thread start. */ void * (*func) (void *); void *arg; }; /* Return a real HANDLE object for the current thread. */ static inline HANDLE get_current_thread_handle (void) { HANDLE this_handle; /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic identifier, not a real handle. */ if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), GetCurrentProcess (), &this_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) abort (); return this_handle; } gl_thread_t gl_thread_self_func (void) { gl_thread_t thread; if (self_key == (DWORD)-1) init_self_key (); thread = TlsGetValue (self_key); if (thread == NULL) { /* This happens only in threads that have not been created through glthread_create(), such as the main thread. */ for (;;) { thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread != NULL) break; /* Memory allocation failed. There is not much we can do. Have to busy-loop, waiting for the availability of memory. */ Sleep (1); } thread->handle = get_current_thread_handle (); InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ TlsSetValue (self_key, thread); } return thread; } /* The main function of a freshly creating thread. It's a wrapper around the FUNC and ARG arguments passed to glthread_create_func. */ static unsigned int WINAPI wrapper_func (void *varg) { struct gl_thread_struct *thread = (struct gl_thread_struct *)varg; EnterCriticalSection (&thread->handle_lock); /* Create a new handle for the thread only if the parent thread did not yet fill in the handle. */ if (thread->handle == NULL) thread->handle = get_current_thread_handle (); LeaveCriticalSection (&thread->handle_lock); if (self_key == (DWORD)-1) init_self_key (); TlsSetValue (self_key, thread); /* Run the thread. Store the exit value if the thread was not terminated otherwise. */ thread->result = thread->func (thread->arg); return 0; } int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg) { struct gl_thread_struct *thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread == NULL) return ENOMEM; thread->handle = NULL; InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ thread->func = func; thread->arg = arg; { unsigned int thread_id; HANDLE thread_handle; thread_handle = (HANDLE) _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id); /* calls CreateThread with the same arguments */ if (thread_handle == NULL) { DeleteCriticalSection (&thread->handle_lock); free (thread); return EAGAIN; } EnterCriticalSection (&thread->handle_lock); if (thread->handle == NULL) thread->handle = thread_handle; else /* thread->handle was already set by the thread itself. */ CloseHandle (thread_handle); LeaveCriticalSection (&thread->handle_lock); *threadp = thread; return 0; } } int glthread_join_func (gl_thread_t thread, void **retvalp) { if (thread == NULL) return EINVAL; if (thread == gl_thread_self ()) return EDEADLK; if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED) return EINVAL; if (retvalp != NULL) *retvalp = thread->result; DeleteCriticalSection (&thread->handle_lock); CloseHandle (thread->handle); free (thread); return 0; } int gl_thread_exit_func (void *retval) { gl_thread_t thread = gl_thread_self (); thread->result = retval; _endthreadex (0); /* calls ExitThread (0) */ abort (); } #endif /* ========================================================================= */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/lock.c�����������������������������������������������0000664�0000000�0000000�00000064326�12165627373�016740� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Locking in multithreaded situations. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include <config.h> #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # if !defined PTHREAD_RWLOCK_INITIALIZER int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_rwlock_init (&lock->rwlock, NULL); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_rdlock (&lock->rwlock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_wrlock (&lock->rwlock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_rwlock_unlock (&lock->rwlock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_rwlock_destroy (&lock->rwlock); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_init (&lock->lock, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_readers, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_writers, NULL); if (err != 0) return err; lock->waiting_writers_count = 0; lock->runcount = 0; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ /* POSIX says: "It is implementation-defined whether the calling thread acquires the lock when a writer does not hold the lock and there are writers blocked on the lock." Let's say, no: give the writers a higher priority. */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } lock->runcount++; return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); if (err != 0) { lock->waiting_writers_count--; pthread_mutex_unlock (&lock->lock); return err; } lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ err = pthread_cond_signal (&lock->waiting_writers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } else { /* Wake up all waiting readers. */ err = pthread_cond_broadcast (&lock->waiting_readers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } } return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_destroy (&lock->lock); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_readers); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_writers); if (err != 0) return err; return 0; } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (lock, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; return 0; } # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (&lock->recmutex, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_recursive_lock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_mutex_lock (&lock->recmutex); } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_mutex_unlock (&lock->recmutex); } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_mutex_destroy (&lock->recmutex); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = pthread_mutex_init (&lock->mutex, NULL); if (err != 0) return err; lock->owner = (pthread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { pthread_t self = pthread_self (); if (lock->owner != self) { int err; err = pthread_mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != pthread_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (pthread_t) 0; return pthread_mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (pthread_t) 0) return EBUSY; return pthread_mutex_destroy (&lock->mutex); } # endif /* -------------------------- gl_once_t datatype -------------------------- */ static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; int glthread_once_singlethreaded (pthread_once_t *once_control) { /* We don't know whether pthread_once_t is an integer type, a floating-point type, a pointer type, or a structure type. */ char *firstbyte = (char *)once_control; if (*firstbyte == *(const char *)&fresh_once) { /* First time use of once_control. Invert the first byte. */ *firstbyte = ~ *(const char *)&fresh_once; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* -------------------------- gl_once_t datatype -------------------------- */ static void glthread_once_call (void *arg) { void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; void (*initfunction) (void) = *gl_once_temp_addr; initfunction (); } int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) { void (*temp) (void) = initfunction; return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); } int glthread_once_singlethreaded (pth_once_t *once_control) { /* We know that pth_once_t is an integer type. */ if (*once_control == PTH_ONCE_INIT) { /* First time use of once_control. Invert the marker. */ *once_control = ~ PTH_ONCE_INIT; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); if (err != 0) return err; lock->owner = (thread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { thread_t self = thr_self (); if (lock->owner != self) { int err; err = mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != thr_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (thread_t) 0; return mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (thread_t) 0) return EBUSY; return mutex_destroy (&lock->mutex); } /* -------------------------- gl_once_t datatype -------------------------- */ int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) { if (!once_control->inited) { int err; /* Use the mutex to guarantee that if another thread is already calling the initfunction, this thread waits until it's finished. */ err = mutex_lock (&once_control->mutex); if (err != 0) return err; if (!once_control->inited) { once_control->inited = 1; initfunction (); } return mutex_unlock (&once_control->mutex); } else return 0; } int glthread_once_singlethreaded (gl_once_t *once_control) { /* We know that gl_once_t contains an integer type. */ if (!once_control->inited) { /* First time use of once_control. Invert the marker. */ once_control->inited = ~ 0; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ void glthread_lock_init_func (gl_lock_t *lock) { InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_lock_lock_func (gl_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); return 0; } int glthread_lock_unlock_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; LeaveCriticalSection (&lock->lock); return 0; } int glthread_lock_destroy_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* In this file, the waitqueues are implemented as circular arrays. */ #define gl_waitqueue_t gl_carray_waitqueue_t static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->array = NULL; wq->count = 0; wq->alloc = 0; wq->offset = 0; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ static HANDLE gl_waitqueue_add (gl_waitqueue_t *wq) { HANDLE event; unsigned int index; if (wq->count == wq->alloc) { unsigned int new_alloc = 2 * wq->alloc + 1; HANDLE *new_array = (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); if (new_array == NULL) /* No more memory. */ return INVALID_HANDLE_VALUE; /* Now is a good opportunity to rotate the array so that its contents starts at offset 0. */ if (wq->offset > 0) { unsigned int old_count = wq->count; unsigned int old_alloc = wq->alloc; unsigned int old_offset = wq->offset; unsigned int i; if (old_offset + old_count > old_alloc) { unsigned int limit = old_offset + old_count - old_alloc; for (i = 0; i < limit; i++) new_array[old_alloc + i] = new_array[i]; } for (i = 0; i < old_count; i++) new_array[i] = new_array[old_offset + i]; wq->offset = 0; } wq->array = new_array; wq->alloc = new_alloc; } /* Whether the created event is a manual-reset one or an auto-reset one, does not matter, since we will wait on it only once. */ event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) /* No way to allocate an event. */ return INVALID_HANDLE_VALUE; index = wq->offset + wq->count; if (index >= wq->alloc) index -= wq->alloc; wq->array[index] = event; wq->count++; return event; } /* Notifies the first thread from a wait queue and dequeues it. */ static inline void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { SetEvent (wq->array[wq->offset + 0]); wq->offset++; wq->count--; if (wq->count == 0 || wq->offset == wq->alloc) wq->offset = 0; } /* Notifies all threads from a wait queue and dequeues them all. */ static inline void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { unsigned int i; for (i = 0; i < wq->count; i++) { unsigned int index = wq->offset + i; if (index >= wq->alloc) index -= wq->alloc; SetEvent (wq->array[index]); } wq->count = 0; wq->offset = 0; } void glthread_rwlock_init_func (gl_rwlock_t *lock) { InitializeCriticalSection (&lock->lock); gl_waitqueue_init (&lock->waiting_readers); gl_waitqueue_init (&lock->waiting_writers); lock->runcount = 0; lock->guard.done = 1; } int glthread_rwlock_rdlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ if (!(lock->runcount + 1 > 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_readers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_readers, incremented lock->runcount. */ if (!(lock->runcount > 0)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount + 1 > 0)); } } lock->runcount++; LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_wrlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether no readers or writers are currently running. */ if (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_writers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_writers, set lock->runcount = -1. */ if (!(lock->runcount == -1)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount == 0)); } } lock->runcount--; /* runcount becomes -1 */ LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_unlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; EnterCriticalSection (&lock->lock); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { LeaveCriticalSection (&lock->lock); return EPERM; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers.count > 0) { /* Wake up one of the waiting writers. */ lock->runcount--; gl_waitqueue_notify_first (&lock->waiting_writers); } else { /* Wake up all waiting readers. */ lock->runcount += lock->waiting_readers.count; gl_waitqueue_notify_all (&lock->waiting_readers); } } LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_destroy_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; if (lock->runcount != 0) return EBUSY; DeleteCriticalSection (&lock->lock); if (lock->waiting_readers.array != NULL) free (lock->waiting_readers.array); if (lock->waiting_writers.array != NULL) free (lock->waiting_writers.array); lock->guard.done = 0; return 0; } /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) { lock->owner = 0; lock->depth = 0; InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_recursive_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } { DWORD self = GetCurrentThreadId (); if (lock->owner != self) { EnterCriticalSection (&lock->lock); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } } return 0; } int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) { if (lock->owner != GetCurrentThreadId ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = 0; LeaveCriticalSection (&lock->lock); } return 0; } int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) { if (lock->owner != 0) return EBUSY; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) { if (once_control->inited <= 0) { if (InterlockedIncrement (&once_control->started) == 0) { /* This thread is the first one to come to this once_control. */ InitializeCriticalSection (&once_control->lock); EnterCriticalSection (&once_control->lock); once_control->inited = 0; initfunction (); once_control->inited = 1; LeaveCriticalSection (&once_control->lock); } else { /* Undo last operation. */ InterlockedDecrement (&once_control->started); /* Some other thread has already started the initialization. Yield the CPU while waiting for the other thread to finish initializing and taking the lock. */ while (once_control->inited < 0) Sleep (0); if (once_control->inited <= 0) { /* Take the lock. This blocks until the other thread has finished calling the initfunction. */ EnterCriticalSection (&once_control->lock); LeaveCriticalSection (&once_control->lock); if (!(once_control->inited > 0)) abort (); } } } } #endif /* ========================================================================= */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/threadlib.c������������������������������������������0000664�0000000�0000000�00000003647�12165627373�017745� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Multithreading primitives. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. */ #include <config.h> /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include <pthread.h> # include <stdlib.h> # if PTHREAD_IN_USE_DETECTION_HARD /* The function to be executed by a dummy thread. */ static void * dummy_thread_func (void *arg) { return arg; } int glthread_in_use (void) { static int tested; static int result; /* 1: linked with -lpthread, 0: only with libc */ if (!tested) { pthread_t thread; if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) /* Thread creation failed. */ result = 0; else { /* Thread creation works. */ void *retval; if (pthread_join (thread, &retval) != 0) abort (); result = 1; } tested = 1; } return result; } # endif #endif /* ========================================================================= */ /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; �����������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/yield.h����������������������������������������������0000664�0000000�0000000�00000005060�12165627373�017111� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Yielding the processor to other threads and processes. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file contains a primitive for yielding the processor to other threads. extern void gl_thread_yield (void); */ #ifndef _GLTHREAD_YIELD_H #define _GLTHREAD_YIELD_H #include <errno.h> /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include <sched.h> # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ sched_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include <pth.h> # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ pth_yield (NULL) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include <thread.h> # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ thr_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ Sleep (0) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ # define gl_thread_yield() 0 #endif /* ========================================================================= */ #endif /* _GLTHREAD_YIELD_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/glthread/thread.h���������������������������������������������0000664�0000000�0000000�00000030777�12165627373�017267� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Creating and controlling threads. Copyright (C) 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 by the Free Software Foundation; either version 3, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains primitives for creating and controlling threads. Thread data type: gl_thread_t. Creating a thread: thread = gl_thread_create (func, arg); Or with control of error handling: err = glthread_create (&thread, func, arg); extern int glthread_create (gl_thread_t *result, void *(*func) (void *), void *arg); Querying and changing the signal mask of a thread (not supported on all platforms): gl_thread_sigmask (how, newmask, oldmask); Or with control of error handling: err = glthread_sigmask (how, newmask, oldmask); extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask); Waiting for termination of another thread: gl_thread_join (thread, &return_value); Or with control of error handling: err = glthread_join (thread, &return_value); extern int glthread_join (gl_thread_t thread, void **return_value_ptr); Getting a reference to the current thread: current = gl_thread_self (); extern gl_thread_t gl_thread_self (void); Getting a reference to the current thread as a pointer, for debugging: ptr = gl_thread_self_pointer (); extern void * gl_thread_self_pointer (void); Terminating the current thread: gl_thread_exit (return_value); extern _Noreturn void gl_thread_exit (void *return_value); Requesting custom code to be executed at fork() time(not supported on all platforms): gl_thread_atfork (prepare_func, parent_func, child_func); Or with control of error handling: err = glthread_atfork (prepare_func, parent_func, child_func); extern int glthread_atfork (void (*prepare_func) (void), void (*parent_func) (void), void (*child_func) (void)); Note that even on platforms where this is supported, use of fork() and threads together is problematic, see <http://lists.gnu.org/archive/html/bug-gnulib/2008-08/msg00062.html> */ #ifndef _GLTHREAD_THREAD_H #define _GLTHREAD_THREAD_H #include <errno.h> #include <stdlib.h> /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include <pthread.h> # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_create # pragma weak pthread_sigmask # pragma weak pthread_join # ifndef pthread_self # pragma weak pthread_self # endif # pragma weak pthread_exit # if HAVE_PTHREAD_ATFORK # pragma weak pthread_atfork # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* This choice of gl_thread_t assumes that pthread_equal (a, b) is equivalent to ((a) == (b)). This is the case on all platforms in use in 2008. */ typedef pthread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS) # define glthread_sigmask(HOW, SET, OSET) \ (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0) # ifdef PTW32_VERSION /* In pthreads-win32, pthread_t is a struct with a pointer field 'p' and other fields. */ # define gl_thread_self() \ (pthread_in_use () ? pthread_self () : gl_null_thread) # define gl_thread_self_pointer() \ (pthread_in_use () ? pthread_self ().p : NULL) extern const gl_thread_t gl_null_thread; # else # define gl_thread_self() \ (pthread_in_use () ? pthread_self () : (pthread_t) NULL) # define gl_thread_self_pointer() \ (pthread_in_use () ? (void *) pthread_self () : NULL) # endif # define gl_thread_exit(RETVAL) \ (pthread_in_use () ? pthread_exit (RETVAL) : 0) # if HAVE_PTHREAD_ATFORK # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \ (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0) # else # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # endif # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include <pth.h> # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_spawn # pragma weak pth_sigmask # pragma weak pth_join # pragma weak pth_self # pragma weak pth_exit # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef pth_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pth_in_use () ? ((*(THREADP) = pth_spawn (NULL, FUNC, ARG)) ? 0 : errno) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (pth_in_use () && !pth_sigmask (HOW, SET, OSET) ? errno : 0) # define glthread_join(THREAD, RETVALP) \ (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0) # define gl_thread_self() \ (pth_in_use () ? (void *) pth_self () : NULL) # define gl_thread_self_pointer() \ gl_thread_self () # define gl_thread_exit(RETVAL) \ (pth_in_use () ? pth_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include <thread.h> # include <synch.h> # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak thr_create # pragma weak thr_join # pragma weak thr_self # pragma weak thr_exit # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef thread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (thread_in_use () ? thr_create (NULL, 0, FUNC, ARG, 0, THREADP) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (thread_in_use () ? sigprocmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0) # define gl_thread_self() \ (thread_in_use () ? (void *) thr_self () : NULL) # define gl_thread_self_pointer() \ gl_thread_self () # define gl_thread_exit(RETVAL) \ (thread_in_use () ? thr_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus extern "C" { # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* The gl_thread_t is a pointer to a structure in memory. Why not the thread handle? If it were the thread handle, it would be hard to implement gl_thread_self() (since GetCurrentThread () returns a pseudo- handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be closed afterwards, and there is no function for quickly retrieving a thread handle from its id). Why not the thread id? I tried it. It did not work: Sometimes ids appeared that did not belong to running threads, and glthread_join failed with ESRCH. */ typedef struct gl_thread_struct *gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ glthread_create_func (THREADP, FUNC, ARG) # define glthread_sigmask(HOW, SET, OSET) \ /* unsupported */ 0 # define glthread_join(THREAD, RETVALP) \ glthread_join_func (THREAD, RETVALP) # define gl_thread_self() \ gl_thread_self_func () # define gl_thread_self_pointer() \ gl_thread_self () # define gl_thread_exit(RETVAL) \ gl_thread_exit_func (RETVAL) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 extern int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg); extern int glthread_join_func (gl_thread_t thread, void **retvalp); extern gl_thread_t gl_thread_self_func (void); extern int gl_thread_exit_func (void *retval); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ typedef int gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) ENOSYS # define glthread_sigmask(HOW, SET, OSET) 0 # define glthread_join(THREAD, RETVALP) 0 # define gl_thread_self() 0 # define gl_thread_self_pointer() \ ((void *) gl_thread_self ()) # define gl_thread_exit(RETVAL) 0 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 #endif /* ========================================================================= */ /* Macros with built-in error handling. */ #ifdef __cplusplus extern "C" { #endif static inline gl_thread_t gl_thread_create (void *(*func) (void *arg), void *arg) { gl_thread_t thread; int ret; ret = glthread_create (&thread, func, arg); if (ret != 0) abort (); return thread; } #define gl_thread_sigmask(HOW, SET, OSET) \ do \ { \ if (glthread_sigmask (HOW, SET, OSET)) \ abort (); \ } \ while (0) #define gl_thread_join(THREAD, RETVAL) \ do \ { \ if (glthread_join (THREAD, RETVAL)) \ abort (); \ } \ while (0) #define gl_thread_atfork(PREPARE, PARENT, CHILD) \ do \ { \ if (glthread_atfork (PREPARE, PARENT, CHILD)) \ abort (); \ } \ while (0) #ifdef __cplusplus } #endif #endif /* _GLTHREAD_THREAD_H */ �id-utils-4.6+git20120811/gnulib-tests/test-mbsrtowcs3.sh��������������������������������������������0000775�0000000�0000000�00000000562�11433657032�017454� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific EUC-JP locale is installed. : ${LOCALE_JA=ja_JP} if test $LOCALE_JA = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional japanese locale is installed" else echo "Skipping test: no traditional japanese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_JA \ ./test-mbsrtowcs${EXEEXT} 3 ����������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/snprintf.c����������������������������������������������������0000664�0000000�0000000�00000003634�12166360012�016035� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Formatted output to strings. Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> /* Specification. */ #include <stdio.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include "vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } ����������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-setlocale1.sh��������������������������������������������0000775�0000000�0000000�00000001506�12166360012�017372� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} : ${LOCALE_JA=ja_JP} : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \ && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no locale for testing is installed" else echo "Skipping test: no locale for testing is supported" fi exit 77 fi if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ./test-setlocale1${EXEEXT} || exit 1 fi if test $LOCALE_FR_UTF8 != none; then LC_ALL=$LOCALE_FR_UTF8 ./test-setlocale1${EXEEXT} || exit 1 fi if test $LOCALE_JA != none; then LC_ALL=$LOCALE_JA ./test-setlocale1${EXEEXT} || exit 1 fi if test $LOCALE_ZH_CN != none; then LC_ALL=$LOCALE_ZH_CN ./test-setlocale1${EXEEXT} || exit 1 fi exit 0 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getopt.h�������������������������������������������������0000664�0000000�0000000�00000125661�12166360012�016463� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of command line argument processing. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <stdbool.h> /* The glibc/gnulib implementation of getopt supports setting optind = 0, but not all other implementations do. This matters for getopt. But for getopt_long, we require GNU compatibility. */ #if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__) # define OPTIND_MIN 0 #elif HAVE_DECL_OPTRESET # define OPTIND_MIN (optreset = 1) #else # define OPTIND_MIN 1 #endif static void getopt_loop (int argc, const char **argv, const char *options, int *a_seen, int *b_seen, const char **p_value, const char **q_value, int *non_options_count, const char **non_options, int *unrecognized, bool *message_issued) { int c; int pos = ftell (stderr); while ((c = getopt (argc, (char **) argv, options)) != -1) { switch (c) { case 'a': (*a_seen)++; break; case 'b': (*b_seen)++; break; case 'p': *p_value = optarg; break; case 'q': *q_value = optarg; break; case '\1': /* Must only happen with option '-' at the beginning. */ ASSERT (options[0] == '-'); non_options[(*non_options_count)++] = optarg; break; case ':': /* Must only happen with option ':' at the beginning. */ ASSERT (options[0] == ':' || ((options[0] == '-' || options[0] == '+') && options[1] == ':')); /* fall through */ case '?': *unrecognized = optopt; break; default: *unrecognized = c; break; } } *message_issued = pos < ftell (stderr); } static void test_getopt (void) { int start; bool posixly = !!getenv ("POSIXLY_CORRECT"); /* See comment in getopt.c: glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2 || defined __MINGW32__) /* Using getopt from gnulib or from a non-glibc system. */ posixly = true; #endif /* Test processing of boolean options. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "ab", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-b"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "ab", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ba"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "ab", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "ab", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 2); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); ASSERT (!output); } /* Test processing of options with arguments. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "p:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "p:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "-q"; argv[argc++] = "baz"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); ASSERT (!output); } #if GNULIB_TEST_GETOPT_GNU /* Test processing of options with optional arguments. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "p::q::", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "p::q::", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp::q::", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); ASSERT (!output); } #endif /* GNULIB_TEST_GETOPT_GNU */ /* Check that invalid options are recognized; and that both opterr and leading ':' can silence output. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-x"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 42; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'x'); ASSERT (optind == 5); ASSERT (output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-x"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 0; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'x'); ASSERT (optind == 5); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-x"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, ":abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'x'); ASSERT (optind == 5); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-:"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 42; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == ':'); ASSERT (optind == 5); ASSERT (output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-:"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 0; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == ':'); ASSERT (optind == 5); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-:"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, ":abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == ':'); ASSERT (optind == 5); ASSERT (!output); } /* Check for missing argument behavior. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ap"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'p'); ASSERT (optind == 2); ASSERT (output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ap"; argv[argc] = NULL; optind = start; opterr = 0; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'p'); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-ap"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, ":abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'p'); ASSERT (optind == 2); ASSERT (!output); } /* Check that by default, non-options arguments are moved to the end. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); if (posixly) { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } else { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); ASSERT (!output); } } /* Check that '--' ends the argument processing. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[20]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); if (posixly) { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "--") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } else { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "--") == 0); ASSERT (strcmp (argv[5], "donald") == 0); ASSERT (strcmp (argv[6], "duck") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); ASSERT (!output); } } #if GNULIB_TEST_GETOPT_GNU /* Check that the '-' flag causes non-options to be returned in order. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "-abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 3); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (strcmp (non_options[2], "bar") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 7); ASSERT (!output); } /* Check that '--' ends the argument processing. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[20]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "-abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "--") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (!output); if (non_options_count == 2) { /* glibc behaviour. */ ASSERT (non_options_count == 2); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 7); } else { /* Another valid behaviour. */ ASSERT (non_options_count == 7); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (strcmp (non_options[2], "-b") == 0); ASSERT (strcmp (non_options[3], "foo") == 0); ASSERT (strcmp (non_options[4], "-q") == 0); ASSERT (strcmp (non_options[5], "johnny") == 0); ASSERT (strcmp (non_options[6], "bar") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 12); } } /* Check that the '-' flag has to come first. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:-", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); if (posixly) { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } else { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); ASSERT (!output); } } /* Check that the '+' flag causes the first non-option to terminate the loop. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "+abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-+"; argv[argc] = NULL; optind = start; getopt_loop (argc, argv, "+abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == '+'); ASSERT (optind == 2); ASSERT (output); } /* Check that '--' ends the argument processing. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[20]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "+abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "--") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } #endif /* GNULIB_TEST_GETOPT_GNU */ /* Check that the '+' flag has to come first. */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "abp:q:+", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); if (posixly) { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } else { ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); ASSERT (!output); } } #if GNULIB_TEST_GETOPT_GNU /* If GNU extensions are supported, require compliance with POSIX interpretation on leading '+' behavior. http://austingroupbugs.net/view.php?id=191 */ for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; opterr = 1; getopt_loop (argc, argv, "+:abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc] = NULL; optind = start; getopt_loop (argc, argv, "+:abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'p'); ASSERT (optind == 2); ASSERT (!output); } for (start = OPTIND_MIN; start <= 1; start++) { int a_seen = 0; int b_seen = 0; const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; bool output; int argc = 0; const char *argv[10]; argv[argc++] = "program"; argv[argc++] = "-b"; argv[argc++] = "-p"; argv[argc] = NULL; optind = start; getopt_loop (argc, argv, "+:abp:q:", &a_seen, &b_seen, &p_value, &q_value, &non_options_count, non_options, &unrecognized, &output); ASSERT (a_seen == 0); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'p'); ASSERT (optind == 3); ASSERT (!output); } /* Check that 'W' does not dump core: http://sourceware.org/bugzilla/show_bug.cgi?id=12922 Technically, POSIX says the presence of ';' in the opt-string gives unspecified behavior, so we only test this when GNU compliance is desired. */ for (start = OPTIND_MIN; start <= 1; start++) { int argc = 0; const char *argv[10]; int pos = ftell (stderr); argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "dummy"; argv[argc] = NULL; optind = start; opterr = 1; ASSERT (getopt (argc, (char **) argv, "W;") == 'W'); ASSERT (ftell (stderr) == pos); ASSERT (optind == 2); } #endif /* GNULIB_TEST_GETOPT_GNU */ } �������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcwidth.c������������������������������������������������0000664�0000000�0000000�00000005011�12166360012�016607� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of wcwidth() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (wcwidth, int, (wchar_t)); #include <locale.h> #include <string.h> #include "localcharset.h" #include "macros.h" int main () { wchar_t wc; /* Test width of ASCII characters. */ for (wc = 0x20; wc < 0x7F; wc++) ASSERT (wcwidth (wc) == 1); /* Switch to an UTF-8 locale. */ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL /* Check whether it's really an UTF-8 locale. On OpenBSD 4.0, the setlocale call succeeds only for the LC_CTYPE category and therefore returns "C/fr_FR.UTF-8/C/C/C/C", but the LC_CTYPE category is effectively set to an ASCII LC_CTYPE category; in particular, locale_charset() returns "ASCII". */ && strcmp (locale_charset (), "UTF-8") == 0) { /* Test width of ASCII characters. */ for (wc = 0x20; wc < 0x7F; wc++) ASSERT (wcwidth (wc) == 1); /* Test width of some non-spacing characters. */ ASSERT (wcwidth (0x0301) == 0); ASSERT (wcwidth (0x05B0) == 0); /* Test width of some format control characters. */ ASSERT (wcwidth (0x200E) <= 0); ASSERT (wcwidth (0x2060) <= 0); #if 0 /* wchar_t may be only 16 bits. */ ASSERT (wcwidth (0xE0001) <= 0); ASSERT (wcwidth (0xE0044) <= 0); #endif /* Test width of some zero width characters. */ ASSERT (wcwidth (0x200B) == 0); ASSERT (wcwidth (0xFEFF) <= 0); /* Test width of some CJK characters. */ ASSERT (wcwidth (0x3000) == 2); ASSERT (wcwidth (0xB250) == 2); ASSERT (wcwidth (0xFF1A) == 2); #if 0 /* wchar_t may be only 16 bits. */ ASSERT (wcwidth (0x20369) == 2); ASSERT (wcwidth (0x2F876) == 2); #endif } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-float.c��������������������������������������������������0000664�0000000�0000000�00000021624�12166360012�016253� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <float.h> substitute. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2011. */ #include <config.h> #include <float.h> #include "fpucw.h" #include "macros.h" /* Check that FLT_RADIX is a constant expression. */ int a[] = { FLT_RADIX }; #if FLT_RADIX == 2 /* Return 2^n. */ static float pow2f (int n) { int k = n; volatile float x = 1; volatile float y = 2; /* Invariant: 2^n == x * y^k. */ if (k < 0) { y = 0.5f; k = - k; } while (k > 0) { if (k != 2 * (k / 2)) { x = x * y; k = k - 1; } if (k == 0) break; y = y * y; k = k / 2; } /* Now k == 0, hence x == 2^n. */ return x; } /* Return 2^n. */ static double pow2d (int n) { int k = n; volatile double x = 1; volatile double y = 2; /* Invariant: 2^n == x * y^k. */ if (k < 0) { y = 0.5; k = - k; } while (k > 0) { if (k != 2 * (k / 2)) { x = x * y; k = k - 1; } if (k == 0) break; y = y * y; k = k / 2; } /* Now k == 0, hence x == 2^n. */ return x; } /* Return 2^n. */ static long double pow2l (int n) { int k = n; volatile long double x = 1; volatile long double y = 2; /* Invariant: 2^n == x * y^k. */ if (k < 0) { y = 0.5L; k = - k; } while (k > 0) { if (k != 2 * (k / 2)) { x = x * y; k = k - 1; } if (k == 0) break; y = y * y; k = k / 2; } /* Now k == 0, hence x == 2^n. */ return x; } /* ----------------------- Check macros for 'float' ----------------------- */ /* Check that the FLT_* macros expand to constant expressions. */ int fb[] = { FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP, FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP }; float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX }; static void test_float (void) { /* Check that the value of FLT_MIN_EXP is well parenthesized. */ ASSERT ((FLT_MIN_EXP % 101111) == (FLT_MIN_EXP) % 101111); /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */ ASSERT ((FLT_MIN_10_EXP % 101111) == (FLT_MIN_10_EXP) % 101111); /* Check that 'float' is as specified in IEEE 754. */ ASSERT (FLT_MANT_DIG == 24); ASSERT (FLT_MIN_EXP == -125); ASSERT (FLT_MAX_EXP == 128); /* Check the value of FLT_MIN_10_EXP. */ ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103)); /* Check the value of FLT_DIG. */ ASSERT (FLT_DIG == (int) ((FLT_MANT_DIG - 1) * 0.30103)); /* Check the value of FLT_MIN_10_EXP. */ ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103)); /* Check the value of FLT_MAX_10_EXP. */ ASSERT (FLT_MAX_10_EXP == (int) (FLT_MAX_EXP * 0.30103)); /* Check the value of FLT_MAX. */ { volatile float m = FLT_MAX; int n; ASSERT (m + m > m); for (n = 0; n <= 2 * FLT_MANT_DIG; n++) { volatile float pow2_n = pow2f (n); /* 2^n */ volatile float x = m + (m / pow2_n); if (x > m) ASSERT (x + x == x); else ASSERT (!(x + x == x)); } } /* Check the value of FLT_MIN. */ { volatile float m = FLT_MIN; volatile float x = pow2f (FLT_MIN_EXP - 1); ASSERT (m == x); } /* Check the value of FLT_EPSILON. */ { volatile float e = FLT_EPSILON; volatile float me; int n; me = 1.0f + e; ASSERT (me > 1.0f); ASSERT (me - 1.0f == e); for (n = 0; n <= 2 * FLT_MANT_DIG; n++) { volatile float half_n = pow2f (- n); /* 2^-n */ volatile float x = me - half_n; if (x < me) ASSERT (x <= 1.0f); } } } /* ----------------------- Check macros for 'double' ----------------------- */ /* Check that the DBL_* macros expand to constant expressions. */ int db[] = { DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP, DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP }; double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX }; static void test_double (void) { /* Check that the value of DBL_MIN_EXP is well parenthesized. */ ASSERT ((DBL_MIN_EXP % 101111) == (DBL_MIN_EXP) % 101111); /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */ ASSERT ((DBL_MIN_10_EXP % 101111) == (DBL_MIN_10_EXP) % 101111); /* Check that 'double' is as specified in IEEE 754. */ ASSERT (DBL_MANT_DIG == 53); ASSERT (DBL_MIN_EXP == -1021); ASSERT (DBL_MAX_EXP == 1024); /* Check the value of DBL_MIN_10_EXP. */ ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103)); /* Check the value of DBL_DIG. */ ASSERT (DBL_DIG == (int) ((DBL_MANT_DIG - 1) * 0.30103)); /* Check the value of DBL_MIN_10_EXP. */ ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103)); /* Check the value of DBL_MAX_10_EXP. */ ASSERT (DBL_MAX_10_EXP == (int) (DBL_MAX_EXP * 0.30103)); /* Check the value of DBL_MAX. */ { volatile double m = DBL_MAX; int n; ASSERT (m + m > m); for (n = 0; n <= 2 * DBL_MANT_DIG; n++) { volatile double pow2_n = pow2d (n); /* 2^n */ volatile double x = m + (m / pow2_n); if (x > m) ASSERT (x + x == x); else ASSERT (!(x + x == x)); } } /* Check the value of DBL_MIN. */ { volatile double m = DBL_MIN; volatile double x = pow2d (DBL_MIN_EXP - 1); ASSERT (m == x); } /* Check the value of DBL_EPSILON. */ { volatile double e = DBL_EPSILON; volatile double me; int n; me = 1.0 + e; ASSERT (me > 1.0); ASSERT (me - 1.0 == e); for (n = 0; n <= 2 * DBL_MANT_DIG; n++) { volatile double half_n = pow2d (- n); /* 2^-n */ volatile double x = me - half_n; if (x < me) ASSERT (x <= 1.0); } } } /* -------------------- Check macros for 'long double' -------------------- */ /* Check that the LDBL_* macros expand to constant expressions. */ int lb[] = { LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP, LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP }; long double lc1 = LDBL_EPSILON; long double lc2 = LDBL_MIN; #if 0 /* LDBL_MAX is not a constant expression on some platforms. */ long double lc3 = LDBL_MAX; #endif static void test_long_double (void) { /* Check that the value of LDBL_MIN_EXP is well parenthesized. */ ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111); /* Check that the value of LDBL_MIN_10_EXP is well parenthesized. */ ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111); /* Check that 'long double' is at least as wide as 'double'. */ ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG); ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG); ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP); /* Check the value of LDBL_DIG. */ ASSERT (LDBL_DIG == (int)((LDBL_MANT_DIG - 1) * 0.30103)); /* Check the value of LDBL_MIN_10_EXP. */ ASSERT (LDBL_MIN_10_EXP == - (int) (- (LDBL_MIN_EXP - 1) * 0.30103)); /* Check the value of LDBL_MAX_10_EXP. */ ASSERT (LDBL_MAX_10_EXP == (int) (LDBL_MAX_EXP * 0.30103)); /* Check the value of LDBL_MAX. */ { volatile long double m = LDBL_MAX; int n; ASSERT (m + m > m); for (n = 0; n <= 2 * LDBL_MANT_DIG; n++) { volatile long double pow2_n = pow2l (n); /* 2^n */ volatile long double x = m + (m / pow2_n); if (x > m) ASSERT (x + x == x); else ASSERT (!(x + x == x)); } } /* Check the value of LDBL_MIN. */ { volatile long double m = LDBL_MIN; volatile long double x = pow2l (LDBL_MIN_EXP - 1); ASSERT (m == x); } /* Check the value of LDBL_EPSILON. */ { volatile long double e = LDBL_EPSILON; volatile long double me; int n; me = 1.0L + e; ASSERT (me > 1.0L); ASSERT (me - 1.0L == e); for (n = 0; n <= 2 * LDBL_MANT_DIG; n++) { volatile long double half_n = pow2l (- n); /* 2^-n */ volatile long double x = me - half_n; if (x < me) ASSERT (x <= 1.0L); } } } int main () { test_float (); test_double (); { DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); test_long_double (); END_LONG_DOUBLE_ROUNDING (); } return 0; } #else int main () { fprintf (stderr, "Skipping test: FLT_RADIX is not 2.\n"); return 77; } #endif ������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-btowc1.sh������������������������������������������������0000775�0000000�0000000�00000000543�11433657032�016544� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR \ ./test-btowc${EXEEXT} 1 �������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-update-copyright.sh��������������������������������������0000775�0000000�0000000�00000040651�12166360012�020632� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test suite for update-copyright. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. diffout=`diff -u /dev/null /dev/null 2>&1` if test x"$diffout" = x"" && test $? -eq 0; then compare() { diff -u "$@"; } else compare() { cmp "$@"; } fi # Ensure the update-copyright program gets found. PATH=$abs_aux_dir:$PATH export PATH TMP_BASE=update-copyright.test trap 'rm -f $TMP_BASE*' 0 1 2 3 15 ## --------------------------------- ## ## Skip if user does not have perl. ## ## --------------------------------- ## TMP=$TMP_BASE s=$TMP-script cat <<\EOF > $s eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' & eval 'exec perl -wS -0777 -pi "$0" $argv:q' if 0; s/a/b/ EOF chmod a+x $s echo a > $TMP-in ./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" || { printf '%s\n' "$0: skipping this test;" \ 'your system has insufficient support for Perl' 1>&2 exit 77 } # Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess. # We have a report that 5.6.1 is inadequate and that 5.8.0 works. perl -e 'require 5.8.0' || { echo '$0: skipping this test; Perl version is too old' 1>&2 exit 77 } # Do not let a different envvar setting perturb results. UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72 export UPDATE_COPYRIGHT_MAX_LINE_LENGTH ## ----------------------------- ## ## Examples from documentation. ## ## ----------------------------- ## TMP=$TMP_BASE-ex cat > $TMP.1 <<EOF Copyright @copyright{} 1990-2005, 2007-2009 Free Software Foundation, Inc. EOF cat > $TMP.2 <<EOF # Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF cat > $TMP.3 <<EOF /* * Copyright © 90,2005,2007-2009 * Free Software Foundation, Inc. */ EOF cat > $TMP.4 <<EOF ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF cat > $TMP.5 <<EOF Copyright (C) 1990-2005, 2007-2009 Acme, Inc. EOF cat > $TMP.6 <<EOF ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. Copyright (C) 1990-2005, 2007-2009 Free Software Foundation, Inc. EOF cat > $TMP.7 <<EOF Copyright (C) 1990-2005, 2007-2009 Acme, Inc. # Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2009 \ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <<EOF || exit 1 $TMP.4: warning: copyright statement not found $TMP.5: warning: copyright statement not found EOF compare - $TMP.1 <<EOF || exit 1 Copyright @copyright{} 1990-2005, 2007-2009 Free Software Foundation, Inc. EOF compare - $TMP.2 <<EOF || exit 1 # Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF compare - $TMP.3 <<EOF || exit 1 /* * Copyright © 90,2005,2007-2009 * Free Software Foundation, Inc. */ EOF compare - $TMP.4 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF compare - $TMP.5 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. EOF compare - $TMP.6 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. Copyright (C) 1990-2005, 2007-2009 Free Software Foundation, Inc. EOF compare - $TMP.7 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. # Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <<EOF || exit 1 $TMP.4: warning: copyright statement not found $TMP.5: warning: copyright statement not found EOF compare - $TMP.1 <<EOF || exit 1 Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation, Inc. EOF compare - $TMP.2 <<EOF || exit 1 # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. EOF compare - $TMP.3 <<EOF || exit 1 /* * Copyright © 1990, 2005, 2007-2010 Free Software Foundation, Inc. */ EOF compare - $TMP.4 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF compare - $TMP.5 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. EOF compare - $TMP.6 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. EOF compare - $TMP.7 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <<EOF || exit 1 $TMP.4: warning: copyright statement not found $TMP.5: warning: copyright statement not found EOF compare - $TMP.1 <<EOF || exit 1 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. EOF compare - $TMP.2 <<EOF || exit 1 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free # Software Foundation, Inc. EOF compare - $TMP.3 <<EOF || exit 1 /* * Copyright © 1990, 2005, 2007, 2008, 2009, 2010 Free Software * Foundation, Inc. */ EOF compare - $TMP.4 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. EOF compare - $TMP.5 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. EOF compare - $TMP.6 <<EOF || exit 1 ## Copyright (C) 1990-2005, 2007-2009 Free Software # Foundation, Inc. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. EOF compare - $TMP.7 <<EOF || exit 1 Copyright (C) 1990-2005, 2007-2009 Acme, Inc. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free # Software Foundation, Inc. EOF rm $TMP* ## -------------- ## ## Current year. ## ## -------------- ## TMP=$TMP_BASE-current-year YEAR=`date +%Y` cat > $TMP <<EOF '\" Copyright (C) 2006 '\" Free Software Foundation, '\" Inc. EOF update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_USE_INTERVALS=1 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. EOF rm $TMP* ## ------------------ ## ## Surrounding text. ## ## ------------------ ## TMP=$TMP_BASE-surrounding-text cat > $TMP <<EOF Undisturbed text. dnl Undisturbed text. dnl Copyright (C) 89 dnl Free Software Foundation, Inc. dnl Undisturbed text. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 Undisturbed text. dnl Undisturbed text. dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc. dnl Undisturbed text. EOF rm $TMP* ## --------------- ## ## Widest prefix. ## ## --------------- ## TMP=$TMP_BASE-widest-prefix cat > $TMP <<EOF #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #### 2008 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, #### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, #### 2006, 2007, 2008, 2010 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software #### Foundation, Inc. EOF rm $TMP* ## ------------------- ## ## Prefix too large. ## ## ------------------- ## TMP=$TMP_BASE-prefix-too-large cat > $TMP <<EOF #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #### 2008 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <<EOF || exit 1 $TMP: warning: copyright statement not found EOF compare - $TMP <<EOF || exit 1 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #### 2008 Free Software Foundation, Inc. EOF rm $TMP* ## ------------- ## ## Blank lines. ## ## ------------- ## TMP=$TMP_BASE-blank-lines cat > $TMP <<EOF #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, # #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #2008 Free Software Foundation, Inc. Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <<EOF || exit 1 $TMP: warning: copyright statement not found EOF compare - $TMP <<EOF || exit 1 #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, # #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #2008 Free Software Foundation, Inc. Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. EOF rm $TMP* ## -------------- ## ## Leading tabs. ## ## -------------- ## TMP=$TMP_BASE-leading-tabs cat > $TMP <<EOF Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation, Inc. EOF rm $TMP* ## -------------------- ## ## Unusual whitespace. ## ## -------------------- ## TMP=$TMP_BASE-unusual-ws cat > $TMP <<EOF # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, # 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 # Copyright (C) 1987-1988, 1991-2011 Free Software # Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \ UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 # Copyright (C) 1987-2011 Free Software Foundation, Inc. EOF rm $TMP* ## --------- ## ## DOS EOL. ## ## --------- ## TMP=$TMP_BASE-dos-eol tr @ '\015' > $TMP <<\EOF Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@ Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ Rem 2009 Free Software Foundation, Inc.@ EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 tr @ '\015' > $TMP-exp <<\EOF Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@ Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ Rem 2009, 2010 Free Software Foundation, Inc.@ EOF compare $TMP-exp $TMP || exit 1 rm $TMP* ## --------------- ## ## Omitted "(C)". ## ## --------------- ## TMP=$TMP_BASE-omitted-circle-c cat > $TMP <<EOF Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP <<EOF || exit 1 Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. EOF rm $TMP* ## ------------------ ## ## C-style comments. ## ## ------------------ ## TMP=$TMP_BASE-c-style-comments cat > $TMP.star <<EOF /* Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, * 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, * 2009 Free Software Foundation, Inc. */ EOF cat > $TMP.space <<EOF /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. */ EOF cat > $TMP.single-line <<EOF /* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */ EOF cat > $TMP.single-line-wrapped <<EOF /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */ EOF cat > $TMP.extra-text-star <<EOF /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End * More comments. */ EOF cat > $TMP.extra-text-space <<EOF /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. *** * End of comments. */ EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare /dev/null $TMP-stderr || exit 1 compare - $TMP.star <<EOF || exit 1 /* Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, * 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, * 2009, 2010 Free Software Foundation, Inc. */ EOF compare - $TMP.space <<EOF || exit 1 /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. */ EOF compare - $TMP.single-line <<EOF || exit 1 /* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */ EOF compare - $TMP.single-line-wrapped <<EOF || exit 1 /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation, * Inc. */ EOF compare - $TMP.extra-text-star <<EOF || exit 1 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation, * Inc. End * More comments. */ EOF compare - $TMP.extra-text-space <<EOF || exit 1 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation, Inc. *** * End of comments. */ EOF rm $TMP* exit 0 ���������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix.sh������������������������������������������0000775�0000000�0000000�00000000562�11433657032�020010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-printf-posix.tmp t-printf-posix.out" ./test-printf-posix${EXEEXT} > t-printf-posix.tmp || exit 1 LC_ALL=C tr -d '\r' < t-printf-posix.tmp > t-printf-posix.out || exit 1 : ${DIFF=diff} ${DIFF} "${srcdir}/test-printf-posix.output" t-printf-posix.out result=$? rm -fr $tmpfiles exit $result ����������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/hash-pjw.h����������������������������������������������������0000664�0000000�0000000�00000002132�12166360012�015710� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* hash-pjw.h -- declaration for a simple hash function Copyright (C) 2001, 2003, 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 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 <http://www.gnu.org/licenses/>. */ #include <stddef.h> /* Compute a hash code for a NUL-terminated string starting at X, and return the hash code modulo TABLESIZE. The result is platform dependent: it depends on the size of the 'size_t' type and on the signedness of the 'char' type. */ extern size_t hash_pjw (void const *x, size_t tablesize) _GL_ATTRIBUTE_PURE; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-setlocale1.c���������������������������������������������0000664�0000000�0000000�00000003301�12166360012�017172� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of setting the current locale. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <locale.h> #include "signature.h" SIGNATURE_CHECK (setlocale, char *, (int, const char *)); #include <stdlib.h> #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { char *name1; char *name2; /* Try to set the locale by implicitly looking at the LC_ALL environment variable. configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; name1 = strdup (setlocale (LC_ALL, NULL)); /* Reset the locale. */ if (setlocale (LC_ALL, "C") == NULL) return 1; /* Try to set the locale by explicitly looking at the LC_ALL environment variable. configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL) return 1; name2 = strdup (setlocale (LC_ALL, NULL)); /* Test that the two results are the same. */ ASSERT (strcmp (name1, name2) == 0); return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko3.sh�����������������������������������������������0000775�0000000�0000000�00000000220�12166360012�016665� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-fseeko3${EXEEXT} 0 "$srcdir/test-fseeko3.sh" || exit 1 ./test-fseeko3${EXEEXT} 1 "$srcdir/test-fseeko3.sh" || exit 1 exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-strerror.c�����������������������������������������������0000664�0000000�0000000�00000004021�12166360012�017020� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of strerror() function. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake <ebb9@byu.net>, 2007. */ #include <config.h> #include <string.h> #include "signature.h" SIGNATURE_CHECK (strerror, char *, (int)); #include <errno.h> #include "macros.h" int main (void) { char *str; errno = 0; str = strerror (EACCES); ASSERT (str); ASSERT (*str); ASSERT (errno == 0); errno = 0; str = strerror (ETIMEDOUT); ASSERT (str); ASSERT (*str); ASSERT (errno == 0); errno = 0; str = strerror (EOVERFLOW); ASSERT (str); ASSERT (*str); ASSERT (errno == 0); /* POSIX requires strerror (0) to succeed. Reject use of "Unknown error", but allow "Success", "No error", or even Solaris' "Error 0" which are distinct patterns from true out-of-range strings. http://austingroupbugs.net/view.php?id=382 */ errno = 0; str = strerror (0); ASSERT (str); ASSERT (*str); ASSERT (errno == 0); ASSERT (strstr (str, "nknown") == NULL); ASSERT (strstr (str, "ndefined") == NULL); /* POSIX requires strerror to produce a non-NULL result for all inputs; as an extension, we also guarantee a non-empty reseult. Reporting EINVAL is optional. */ errno = 0; str = strerror (-3); ASSERT (str); ASSERT (*str); ASSERT (errno == 0 || errno == EINVAL); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-quotearg-simple.c����������������������������������������0000664�0000000�0000000�00000030705�12166360012�020264� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of quotearg family of functions. Copyright (C) 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake <ebb9@byu.net>, 2008. */ #include <config.h> #include "quotearg.h" #include <ctype.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "progname.h" #include "macros.h" #include "test-quotearg.h" static struct result_groups results_g[] = { /* literal_quoting_style */ { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ }, { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ }, { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ } }, /* shell_quoting_style */ { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b", "'a\\b'", LQ RQ, LQ RQ }, { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b", "'a\\b'", LQ RQ, LQ RQ }, { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'", "'a\\b'", LQ RQ, LQ RQ } }, /* shell_always_quoting_style */ { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'", "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" }, { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'", "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" }, { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'", "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } }, /* c_quoting_style */ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }, /* c_maybe_quoting_style */ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ }, { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ }, { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } }, /* escape_quoting_style */ { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ }, { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ }, { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } }, /* locale_quoting_style */ { { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } }, /* clocale_quoting_style */ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } } }; static struct result_groups flag_results[] = { /* literal_quoting_style and QA_ELIDE_NULL_BYTES */ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ }, { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ }, { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, LQ RQ } }, /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ }, { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ }, { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } }, /* c_quoting_style and QA_SPLIT_TRIGRAPHS */ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" }, { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } } }; static char const *custom_quotes[][2] = { { "", "" }, { "'", "'" }, { "(", ")" }, { ":", " " }, { " ", ":" }, { "# ", "\n" }, { "\"'", "'\"" } }; static struct result_groups custom_results[] = { /* left_quote = right_quote = "" */ { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ }, { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ }, { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } }, /* left_quote = right_quote = "'" */ { { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } }, /* left_quote = "(" and right_quote = ")" */ { { "()", "(\\0001\\0)", 9, "(simple)", "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" }, { "()", "(\\0001\\0)", 9, "(simple)", "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" }, { "()", "(\\0001\\0)", 9, "(simple)", "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } }, /* left_quote = ":" and right_quote = " " */ { { ": ", ":\\0001\\0 ", 9, ":simple ", ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " }, { ": ", ":\\0001\\0 ", 9, ":simple ", ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " }, { ": ", ":\\0001\\0 ", 9, ":simple ", ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } }, /* left_quote = " " and right_quote = ":" */ { { " :", " \\0001\\0:", 9, " simple:", " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" }, { " :", " \\0001\\0:", 9, " simple:", " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" }, { " :", " \\0001\\0:", 9, " simple:", " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } }, /* left_quote = "# " and right_quote = "\n" */ { { "# \n", "# \\0001\\0\n", 10, "# simple\n", "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" }, { "# \n", "# \\0001\\0\n", 10, "# simple\n", "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" }, { "# \n", "# \\0001\\0\n", 10, "# simple\n", "# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } }, /* left_quote = "\"'" and right_quote = "'\"" */ { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"", "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" }, { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"", "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" }, { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"", "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } } }; int main (int argc _GL_UNUSED, char *argv[]) { int i; bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]); set_program_name (argv[0]); /* This part of the program is hard-wired to the C locale since it does not call setlocale. However, according to POSIX, the use of 8-bit bytes in a character context in the C locale gives unspecified results (that is, the C locale charset is allowed to be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit bytes being characters [often ISO-8859-1], or multibyte [often UTF-8]). We assume that the latter two cases will be indistinguishable in this test - that is, the LQ and RQ sequences will pass through unchanged in either type of charset. So when testing for quoting of str7, use the ascii_only flag to decide what to expect for the 8-bit data being quoted. */ ASSERT (!isprint ('\033')); for (i = literal_quoting_style; i <= clocale_quoting_style; i++) { set_quoting_style (NULL, (enum quoting_style) i); compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only); compare_strings (use_quotearg, &results_g[i].group2, ascii_only); if (i == c_quoting_style) compare_strings (use_quote_double_quotes, &results_g[i].group2, ascii_only); compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only); } set_quoting_style (NULL, literal_quoting_style); ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0); compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only); compare_strings (use_quotearg, &flag_results[0].group2, ascii_only); compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only); set_quoting_style (NULL, c_quoting_style); ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES) == QA_ELIDE_NULL_BYTES); compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only); compare_strings (use_quotearg, &flag_results[1].group2, ascii_only); compare_strings (use_quote_double_quotes, &flag_results[1].group2, ascii_only); compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only); ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS) == QA_ELIDE_OUTER_QUOTES); compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only); compare_strings (use_quotearg, &flag_results[2].group2, ascii_only); compare_strings (use_quote_double_quotes, &flag_results[2].group2, ascii_only); compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only); ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS); for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i) { set_custom_quoting (NULL, custom_quotes[i][0], custom_quotes[i][1]); compare_strings (use_quotearg_buffer, &custom_results[i].group1, ascii_only); compare_strings (use_quotearg, &custom_results[i].group2, ascii_only); compare_strings (use_quotearg_colon, &custom_results[i].group3, ascii_only); } quotearg_free (); return 0; } �����������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fflush.c�������������������������������������������������0000664�0000000�0000000�00000012137�12166360012�016434� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible fflush() function. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the ftell link warning if we are not using the gnulib ftell module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fflush, int, (FILE *)); #include <errno.h> #include <unistd.h> #include "macros.h" int main (void) { FILE *f; char buffer[10]; int fd; /* Create test file. */ f = fopen ("test-fflush.txt", "w"); if (!f || fwrite ("1234567890ABCDEFG", 1, 17, f) != 17 || fclose (f) != 0) { fputs ("Failed to create sample file.\n", stderr); unlink ("test-fflush.txt"); return 1; } /* Test fflush. */ f = fopen ("test-fflush.txt", "r"); ASSERT (f != NULL); fd = fileno (f); if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5) { fputs ("Failed initial read of sample file.\n", stderr); if (f) fclose (f); unlink ("test-fflush.txt"); return 1; } /* For deterministic results, ensure f read a bigger buffer. This is not the case on BeOS, nor on uClibc. */ #if !(defined __BEOS__ || defined __UCLIBC__) if (lseek (fd, 0, SEEK_CUR) == 5) { fputs ("Sample file was not buffered after fread.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } #endif /* POSIX requires fflush-fseek to set file offset of fd. */ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0) { fputs ("Failed to flush-fseek sample file.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } /* Check that offset is correct. */ if (lseek (fd, 0, SEEK_CUR) != 5) { fprintf (stderr, "File offset is wrong after fseek: %ld.\n", (long) lseek (fd, 0, SEEK_CUR)); fclose (f); unlink ("test-fflush.txt"); return 1; } if (ftell (f) != 5) { fprintf (stderr, "ftell result is wrong after fseek: %ld.\n", (long) ftell (f)); fclose (f); unlink ("test-fflush.txt"); return 1; } /* Check that file reading resumes at correct location. */ if (fgetc (f) != '6') { fputs ("Failed to read next byte after fseek.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } /* For deterministic results, ensure f read a bigger buffer. */ if (lseek (fd, 0, SEEK_CUR) == 6) { fputs ("Sample file was not buffered after fgetc.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } /* POSIX requires fflush-fseeko to set file offset of fd. */ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0) { fputs ("Failed to flush-fseeko sample file.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } /* Check that offset is correct. */ if (lseek (fd, 0, SEEK_CUR) != 6) { fprintf (stderr, "File offset is wrong after fseeko: %ld.\n", (long) lseek (fd, 0, SEEK_CUR)); fclose (f); unlink ("test-fflush.txt"); return 1; } if (ftell (f) != 6) { fprintf (stderr, "ftell result is wrong after fseeko: %ld.\n", (long) ftell (f)); fclose (f); unlink ("test-fflush.txt"); return 1; } /* Check that file reading resumes at correct location. */ if (fgetc (f) != '7') { fputs ("Failed to read next byte after fseeko.\n", stderr); fclose (f); unlink ("test-fflush.txt"); return 1; } fclose (f); /* Test that fflush() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen ("test-fflush.txt", "w"); ASSERT (fp != NULL); fputc ('x', fp); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fflush (fp) == EOF); ASSERT (errno == EBADF); fclose (fp); } /* Test that fflush() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w"); if (fp != NULL) { fputc ('x', fp); errno = 0; ASSERT (fflush (fp) == EOF); ASSERT (errno == EBADF); } } { FILE *fp = fdopen (99, "w"); if (fp != NULL) { fputc ('x', fp); errno = 0; ASSERT (fflush (fp) == EOF); ASSERT (errno == EBADF); } } /* Clean up. */ unlink ("test-fflush.txt"); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsrtowcs1.sh��������������������������������������������0000775�0000000�0000000�00000000547�11433657032�017455� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR \ ./test-mbsrtowcs${EXEEXT} 1 ���������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/malloca.c�����������������������������������������������������0000664�0000000�0000000�00000011770�12166360012�015602� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Safe automatic memory allocation. Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _GL_USE_STDLIB_ALLOC 1 #include <config.h> /* Specification. */ #include "malloca.h" #include <stdint.h> #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they are only invoked for big memory sizes. */ #if HAVE_ALLOCA /* Store the mmalloca() results in a hash table. This is needed to reliably distinguish a mmalloca() result and an alloca() result. Although it is possible that the same pointer is returned by alloca() and by mmalloca() at different times in the same application, it does not lead to a bug in freea(), because: - Before a pointer returned by alloca() can point into malloc()ed memory, the function must return, and once this has happened the programmer must not call freea() on it anyway. - Before a pointer returned by mmalloca() can point into the stack, it must be freed. The only function that can free it is freea(), and when freea() frees it, it also removes it from the hash table. */ #define MAGIC_NUMBER 0x1415fb4a #define MAGIC_SIZE sizeof (int) /* This is how the header info would look like without any alignment considerations. */ struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; /* But the header's size must be a multiple of sa_alignment_max. */ #define HEADER_SIZE \ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; verify (HEADER_SIZE == sizeof (struct header)); /* We make the hash table quite big, so that during lookups the probability of empty hash buckets is quite high. There is no need to make the hash table resizable, because when the hash table gets filled so much that the lookup becomes slow, it means that the application has memory leaks. */ #define HASH_TABLE_SIZE 257 static void * mmalloca_results[HASH_TABLE_SIZE]; #endif void * mmalloca (size_t n) { #if HAVE_ALLOCA /* Allocate one more word, that serves as an indicator for malloc()ed memory, so that freea() of an alloca() result is fast. */ size_t nplus = n + HEADER_SIZE; if (nplus >= n) { char *p = (char *) malloc (nplus); if (p != NULL) { size_t slot; p += HEADER_SIZE; /* Put a magic number into the indicator word. */ ((int *) p)[-1] = MAGIC_NUMBER; /* Enter p into the hash table. */ slot = (uintptr_t) p % HASH_TABLE_SIZE; ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; mmalloca_results[slot] = p; return p; } } /* Out of memory. */ return NULL; #else # if !MALLOC_0_IS_NONNULL if (n == 0) n = 1; # endif return malloc (n); #endif } #if HAVE_ALLOCA void freea (void *p) { /* mmalloca() may have returned NULL. */ if (p != NULL) { /* Attempt to quickly distinguish the mmalloca() result - which has a magic indicator word - and the alloca() result - which has an uninitialized indicator word. It is for this test that sa_increment additional bytes are allocated in the alloca() case. */ if (((int *) p)[-1] == MAGIC_NUMBER) { /* Looks like a mmalloca() result. To see whether it really is one, perform a lookup in the hash table. */ size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { if (*chain == p) { /* Found it. Remove it from the hash table and free it. */ char *p_begin = (char *) p - HEADER_SIZE; *chain = ((struct header *) p_begin)->next; free (p_begin); return; } chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; } } /* At this point, we know it was not a mmalloca() result. */ } } #endif ��������id-utils-4.6+git20120811/gnulib-tests/test-stdio.c��������������������������������������������������0000664�0000000�0000000�00000002322�12166360012�016262� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <stdio.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "verify.h" /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that the types are all defined. */ fpos_t t1; off_t t2; size_t t3; ssize_t t4; va_list t5; int main (void) { return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getopt_long.h��������������������������������������������0000664�0000000�0000000�00000175524�12166360012�017505� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of command line argument processing. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ static int a_seen; static int b_seen; static int q_seen; static const struct option long_options_required[] = { { "alpha", no_argument, NULL, 'a' }, { "beta", no_argument, &b_seen, 1 }, { "prune", required_argument, NULL, 'p' }, { "quetsche", required_argument, &q_seen, 1 }, { "xtremely-",no_argument, NULL, 1003 }, { "xtra", no_argument, NULL, 1001 }, { "xtreme", no_argument, NULL, 1002 }, { "xtremely", no_argument, NULL, 1003 }, { NULL, 0, NULL, 0 } }; static const struct option long_options_optional[] = { { "alpha", no_argument, NULL, 'a' }, { "beta", no_argument, &b_seen, 1 }, { "prune", optional_argument, NULL, 'p' }, { "quetsche", optional_argument, &q_seen, 1 }, { NULL, 0, NULL, 0 } }; static void getopt_long_loop (int argc, const char **argv, const char *options, const struct option *long_options, const char **p_value, const char **q_value, int *non_options_count, const char **non_options, int *unrecognized) { int option_index = -1; int c; opterr = 0; q_seen = 0; while ((c = getopt_long (argc, (char **) argv, options, long_options, &option_index)) != -1) { switch (c) { case 0: /* An option with a non-NULL flag pointer was processed. */ if (q_seen) *q_value = optarg; break; case 'a': a_seen++; break; case 'b': b_seen = 1; break; case 'p': *p_value = optarg; break; case 'q': *q_value = optarg; break; case '\1': /* Must only happen with option '-' at the beginning. */ ASSERT (options[0] == '-'); non_options[(*non_options_count)++] = optarg; break; case ':': /* Must only happen with option ':' at the beginning. */ ASSERT (options[0] == ':' || ((options[0] == '-' || options[0] == '+') && options[1] == ':')); /* fall through */ case '?': *unrecognized = optopt; break; default: *unrecognized = c; break; } } } /* Reduce casting, so we can use string literals elsewhere. getopt_long takes an array of char*, but luckily does not modify those elements, so we can pass const char*. */ static int do_getopt_long (int argc, const char **argv, const char *shortopts, const struct option *longopts, int *longind) { return getopt_long (argc, (char **) argv, shortopts, longopts, longind); } static void test_getopt_long (void) { int start; /* Test disambiguation of options. */ { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--x"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xt"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtr"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtra"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == 1001); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtre"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtrem"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtreme"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == 1002); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtremel"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == 1003); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--xtremely"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == 1003); } /* Check that -W handles unknown options. */ { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 'W'); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-Wunknown"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); /* glibc and BSD behave differently here, but for now, we allow both behaviors since W support is not frequently used. */ if (c == '?') { ASSERT (optopt == 0); ASSERT (optarg == NULL); } else { ASSERT (c == 'W'); ASSERT (strcmp (optarg, "unknown") == 0); } } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "unknown"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); /* glibc and BSD behave differently here, but for now, we allow both behaviors since W support is not frequently used. */ if (c == '?') { ASSERT (optopt == 0); ASSERT (optarg == NULL); } else { ASSERT (c == 'W'); ASSERT (strcmp (optarg, "unknown") == 0); } } /* Test that 'W' does not dump core: http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */ { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "dummy"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long (argc, argv, "W;", NULL, &option_index); ASSERT (c == 'W'); ASSERT (optind == 2); } /* Test processing of boolean short options. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-b"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-ba"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 2); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } /* Test processing of boolean long options. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--alpha"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--beta"; argv[argc++] = "--alpha"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--alpha"; argv[argc++] = "--beta"; argv[argc++] = "--alpha"; argv[argc++] = "--beta"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 2); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } /* Test processing of boolean long options via -W. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Walpha"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abW;", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "beta"; argv[argc++] = "-W"; argv[argc++] = "alpha"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "aW;b", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Walpha"; argv[argc++] = "-Wbeta"; argv[argc++] = "-Walpha"; argv[argc++] = "-Wbeta"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "W;ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 2); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } /* Test processing of short options with arguments. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "-q"; argv[argc++] = "baz"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } /* Test processing of long options with arguments. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "--q"; argv[argc++] = "baz"; argv[argc++] = "--p=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } /* Test processing of long options with arguments via -W. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Wp=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:q:W;", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p:W;q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-ab"; argv[argc++] = "-Wq"; argv[argc++] = "baz"; argv[argc++] = "-W"; argv[argc++] = "p=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "W;abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 6); } /* Test processing of short options with optional arguments. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-pfoo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } /* Test processing of long options with optional arguments. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p="; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && *p_value == '\0'); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "--p"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } /* Test processing of long options with optional arguments via -W. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Wp=foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::W;", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Wp"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::q::W;", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-Wp="; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "W;p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && *p_value == '\0'); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "p="; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "W;p::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && *p_value == '\0'); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 3); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-W"; argv[argc++] = "p"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "W;abp::q::", long_options_optional, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); /* ASSERT (p_value == NULL); */ ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } /* Check that invalid options are recognized. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-x"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'x'); ASSERT (optind == 5); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "-:"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == ':'); ASSERT (optind == 5); } /* Check that unexpected arguments are recognized. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "--a="; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 'a'); ASSERT (optind == 4); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "foo"; argv[argc++] = "--b="; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); /* When flag is non-zero, glibc sets optopt anyway, but BSD leaves optopt unchanged. */ ASSERT (unrecognized == 1 || unrecognized == 0); ASSERT (optind == 4); } /* Check that by default, non-options arguments are moved to the end. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } /* Check that '--' ends the argument processing. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[20]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "--") == 0); ASSERT (strcmp (argv[5], "donald") == 0); ASSERT (strcmp (argv[6], "duck") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 5); } /* Check that the '-' flag causes non-options to be returned in order. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "-abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 3); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (strcmp (non_options[2], "bar") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 7); } /* Check that '--' ends the argument processing. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[20]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "-abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "--") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); if (non_options_count == 2) { /* glibc behaviour. */ ASSERT (non_options_count == 2); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 7); } else { /* Another valid behaviour. */ ASSERT (non_options_count == 7); ASSERT (strcmp (non_options[0], "donald") == 0); ASSERT (strcmp (non_options[1], "duck") == 0); ASSERT (strcmp (non_options[2], "-b") == 0); ASSERT (strcmp (non_options[3], "foo") == 0); ASSERT (strcmp (non_options[4], "-q") == 0); ASSERT (strcmp (non_options[5], "johnny") == 0); ASSERT (strcmp (non_options[6], "bar") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 12); } } /* Check that the '-' flag has to come first. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:-", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } /* Check that the '+' flag causes the first non-option to terminate the loop. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "+abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); } for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-+"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "+abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == '+'); ASSERT (optind == 2); } /* Check that '--' ends the argument processing. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[20]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "--"; argv[argc++] = "-b"; argv[argc++] = "foo"; argv[argc++] = "-q"; argv[argc++] = "johnny"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "+abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "--") == 0); ASSERT (strcmp (argv[7], "-b") == 0); ASSERT (strcmp (argv[8], "foo") == 0); ASSERT (strcmp (argv[9], "-q") == 0); ASSERT (strcmp (argv[10], "johnny") == 0); ASSERT (strcmp (argv[11], "bar") == 0); ASSERT (argv[12] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); } /* Check that the '+' flag has to come first. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:+", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "-p") == 0); ASSERT (strcmp (argv[2], "billy") == 0); ASSERT (strcmp (argv[3], "-a") == 0); ASSERT (strcmp (argv[4], "donald") == 0); ASSERT (strcmp (argv[5], "duck") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 1); ASSERT (b_seen == 0); ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } } /* Test behavior of getopt_long when POSIXLY_CORRECT is set in the environment. Options with optional arguments should not change behavior just because of an environment variable. http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html */ static void test_getopt_long_posix (void) { int start; /* Check that POSIXLY_CORRECT stops parsing the same as leading '+'. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "abp:q:", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (strcmp (argv[0], "program") == 0); ASSERT (strcmp (argv[1], "donald") == 0); ASSERT (strcmp (argv[2], "-p") == 0); ASSERT (strcmp (argv[3], "billy") == 0); ASSERT (strcmp (argv[4], "duck") == 0); ASSERT (strcmp (argv[5], "-a") == 0); ASSERT (strcmp (argv[6], "bar") == 0); ASSERT (argv[7] == NULL); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 1); } /* Check that POSIXLY_CORRECT doesn't change optional arguments. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "p::", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 0); ASSERT (b_seen == 0); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 0); ASSERT (unrecognized == 0); ASSERT (optind == 2); } /* Check that leading - still sees options after non-options. */ for (start = 0; start <= 1; start++) { const char *p_value = NULL; const char *q_value = NULL; int non_options_count = 0; const char *non_options[10]; int unrecognized = 0; int argc = 0; const char *argv[10]; a_seen = 0; b_seen = 0; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "billy"; argv[argc++] = "-b"; argv[argc] = NULL; optind = start; getopt_long_loop (argc, argv, "-ab", long_options_required, &p_value, &q_value, &non_options_count, non_options, &unrecognized); ASSERT (a_seen == 1); ASSERT (b_seen == 1); ASSERT (p_value == NULL); ASSERT (q_value == NULL); ASSERT (non_options_count == 1); ASSERT (strcmp (non_options[0], "billy") == 0); ASSERT (unrecognized == 0); ASSERT (optind == 4); } } /* Reduce casting, so we can use string literals elsewhere. getopt_long_only takes an array of char*, but luckily does not modify those elements, so we can pass const char*. */ static int do_getopt_long_only (int argc, const char **argv, const char *shortopts, const struct option *longopts, int *longind) { return getopt_long_only (argc, (char **) argv, shortopts, longopts, longind); } static void test_getopt_long_only (void) { /* Test disambiguation of options. */ { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-x"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-x"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx", long_options_required, &option_index); ASSERT (c == 'x'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--x"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-b"; argv[argc] = NULL; optind = 1; opterr = 0; b_seen = 0; c = do_getopt_long_only (argc, argv, "abx", long_options_required, &option_index); ASSERT (c == 'b'); ASSERT (b_seen == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "--b"; argv[argc] = NULL; optind = 1; opterr = 0; b_seen = 0; c = do_getopt_long_only (argc, argv, "abx", long_options_required, &option_index); ASSERT (c == 0); ASSERT (b_seen == 1); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xt"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xt"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx", long_options_required, &option_index); ASSERT (c == '?'); ASSERT (optopt == 0); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xtra"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "ab", long_options_required, &option_index); ASSERT (c == 1001); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xtreme"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx:", long_options_required, &option_index); ASSERT (c == 1002); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xtremel"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "ab", long_options_required, &option_index); /* glibc getopt_long_only is intentionally different from getopt_long when handling a prefix that is common to two spellings, when both spellings have the same option directives. BSD getopt_long_only treats both cases the same. */ ASSERT (c == 1003 || c == '?'); ASSERT (optind == 2); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xtremel"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx::", long_options_required, &option_index); /* glibc getopt_long_only is intentionally different from getopt_long when handling a prefix that is common to two spellings, when both spellings have the same option directives. BSD getopt_long_only treats both cases the same. */ ASSERT (c == 1003 || c == '?'); ASSERT (optind == 2); ASSERT (optarg == NULL); } { int argc = 0; const char *argv[10]; int option_index; int c; argv[argc++] = "program"; argv[argc++] = "-xtras"; argv[argc] = NULL; optind = 1; opterr = 0; c = do_getopt_long_only (argc, argv, "abx::", long_options_required, &option_index); ASSERT (c == 'x'); ASSERT (strcmp (optarg, "tras") == 0); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/hash-pjw.c����������������������������������������������������0000664�0000000�0000000�00000002335�12166360012�015710� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* hash-pjw.c -- compute a hash value from a NUL-terminated string. Copyright (C) 2001, 2003, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "hash-pjw.h" #include <limits.h> #define SIZE_BITS (sizeof (size_t) * CHAR_BIT) /* A hash function for NUL-terminated char* strings using the method described by Bruno Haible. See http://www.haible.de/bruno/hashfunc.html. */ size_t hash_pjw (const void *x, size_t tablesize) { const char *s; size_t h = 0; for (s = x; *s; s++) h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); return h % tablesize; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fnmatch.c������������������������������������������������0000664�0000000�0000000�00000003475�12166360012�016572� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fnmatch string matching function. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson <simon@josefsson.org>, 2009. */ #include <config.h> #include <fnmatch.h> #include "signature.h" SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int)); #include "macros.h" int main () { int res; ASSERT (res = fnmatch ("", "", 0) == 0); ASSERT (res = fnmatch ("*", "", 0) == 0); ASSERT (res = fnmatch ("*", "foo", 0) == 0); ASSERT (res = fnmatch ("*", "bar", 0) == 0); ASSERT (res = fnmatch ("*", "*", 0) == 0); ASSERT (res = fnmatch ("**", "f", 0) == 0); ASSERT (res = fnmatch ("**", "foo.txt", 0) == 0); ASSERT (res = fnmatch ("*.*", "foo.txt", 0) == 0); ASSERT (res = fnmatch ("foo*.txt", "foobar.txt", 0) == 0); ASSERT (res = fnmatch ("foo.txt", "foo.txt", 0) == 0); ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", 0) == 0); ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", FNM_NOESCAPE) == FNM_NOMATCH); /* Verify that an unmatched [ is treated as a literal, as POSIX requires. This test ensures that glibc Bugzilla bug #12378 stays fixed. */ ASSERT (res = fnmatch ("[/b", "[/b", 0) == 0); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-vc-list-files-git.sh�������������������������������������0000775�0000000�0000000�00000002636�12166360012�020605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Unit tests for vc-list-files # Copyright (C) 2008-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" . tmpdir=vc-git-$$ GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE fail=1 mkdir $tmpdir && cd $tmpdir && # without git, skip the test # The double use of 'exit' is needed for the reference to $? inside the trap. { ( git init -q ) > /dev/null 2>&1 \ || skip_ "git not found in PATH"; } && mkdir d && touch d/a b c && git config user.email "you@example.com" && git config user.name "Your Name" && git add . > /dev/null && git commit -q -a -m log && printf '%s\n' b c d/a > expected && vc-list-files > actual && compare expected actual && fail=0 Exit $fail ��������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/nan.h���������������������������������������������������������0000664�0000000�0000000�00000003466�12166360012�014756� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Macros for not-a-number. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* NaNf () returns a 'float' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke on the expression 0.0 / 0.0. */ #if defined __DECC || defined _MSC_VER static float NaNf () { static float zero = 0.0f; return zero / zero; } #else # define NaNf() (0.0f / 0.0f) #endif /* NaNd () returns a 'double' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke on the expression 0.0 / 0.0. */ #if defined __DECC || defined _MSC_VER static double NaNd () { static double zero = 0.0; return zero / zero; } #else # define NaNd() (0.0 / 0.0) #endif /* NaNl () returns a 'long double' not-a-number. */ /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #elif defined _MSC_VER static long double NaNl () { static long double zero = 0.0L; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32-5.sh�����������������������������������������0000775�0000000�0000000�00000000120�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP936 locale. ./test-wcrtomb-w32${EXEEXT} Chinese_China 936 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix2.c�����������������������������������������0000664�0000000�0000000�00000006266�12166360012�020045� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible fprintf() function. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #if HAVE_GETRLIMIT && HAVE_SETRLIMIT #include <stdlib.h> #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <string.h> #include <errno.h> int main (int argc, char *argv[]) { struct rlimit limit; int arg; int ret; /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif arg = atoi (argv[1]); switch (arg) { case 0: { void *memory = malloc (5000000); if (memory == NULL) return 1; memset (memory, 17, 5000000); return 78; } case 1: ret = fprintf (stdout, "%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); case 2: ret = fprintf (stdout, "%.5000000f", -1.0); return !(ret == 5000003 || (ret < 0 && errno == ENOMEM)); case 3: ret = fprintf (stdout, "%.5000000e", 1.0); return !(ret >= 5000006 || (ret < 0 && errno == ENOMEM)); case 4: ret = fprintf (stdout, "%.5000000d", 1); return !(ret == 5000000 || (ret < 0 && errno == ENOMEM)); case 5: ret = fprintf (stdout, "%.5000000d", -1); return !(ret == 5000001 || (ret < 0 && errno == ENOMEM)); case 6: ret = fprintf (stdout, "%.5000000u", 1); return !(ret == 5000000 || (ret < 0 && errno == ENOMEM)); } return 0; } #else int main (int argc, char *argv[]) { return 77; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-lstat.h��������������������������������������������������0000664�0000000�0000000�00000007270�12166360012�016303� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of lstat() function. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ /* This file is designed to test both lstat(n,buf) and fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_lstat_func (int (*func) (char const *, struct stat *), bool print) { struct stat st1; struct stat st2; /* Test for common directories. */ ASSERT (func (".", &st1) == 0); ASSERT (func ("./", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (func ("/", &st1) == 0); ASSERT (func ("///", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (func ("..", &st1) == 0); ASSERT (S_ISDIR (st1.st_mode)); /* Test for error conditions. */ errno = 0; ASSERT (func ("", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (close (creat (BASE "file", 0600)) == 0); ASSERT (func (BASE "file", &st1) == 0); ASSERT (S_ISREG (st1.st_mode)); errno = 0; ASSERT (func (BASE "file/", &st1) == -1); ASSERT (errno == ENOTDIR); /* Now for some symlink tests, where supported. We set up: link1 -> directory link2 -> file link3 -> dangling link4 -> loop then test behavior both with and without trailing slash. */ if (symlink (".", BASE "link1") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } ASSERT (symlink (BASE "file", BASE "link2") == 0); ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); ASSERT (symlink (BASE "link4", BASE "link4") == 0); ASSERT (func (BASE "link1", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); ASSERT (func (BASE "link1/", &st1) == 0); ASSERT (stat (BASE "link1", &st2) == 0); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (SAME_INODE (st1, st2)); ASSERT (func (BASE "link2", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link2/", &st1) == -1); ASSERT (errno == ENOTDIR); ASSERT (func (BASE "link3", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link3/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (func (BASE "link4", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link4/", &st1) == -1); ASSERT (errno == ELOOP); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); ASSERT (unlink (BASE "link2") == 0); ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-vfprintf-posix.c�����������������������������������������0000664�0000000�0000000�00000002500�12166360012�020134� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible vfprintf() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (vfprintf, int, (FILE *, char const *, va_list)); #include <stdarg.h> #include <stddef.h> #include <stdint.h> #include <string.h> #include "macros.h" #include "test-fprintf-posix.h" static int my_fprintf (FILE *fp, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vfprintf (fp, format, args); va_end (args); return ret; } int main (int argc, char *argv[]) { test_function (my_fprintf); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/getpagesize.c�������������������������������������������������0000664�0000000�0000000�00000002274�12166360012�016500� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getpagesize emulation for systems where it cannot be done in a C macro. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible and Martin Lambers. */ #include <config.h> /* Specification. */ #include <unistd.h> /* This implementation is only for native Windows systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include <windows.h> int getpagesize (void) { SYSTEM_INFO system_info; GetSystemInfo (&system_info); return system_info.dwPageSize; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/zerosize-ptr.h������������������������������������������������0000664�0000000�0000000�00000004716�12166360012�016656� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Return a pointer to a zero-size object in memory. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL argument. Therefore this file produces a non-NULL pointer which cannot be dereferenced, if possible. */ #include <stdlib.h> /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an mprotect() function in libgcc.a. */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # include <fcntl.h> # include <unistd.h> # include <sys/types.h> # include <sys/mman.h> /* Define MAP_FILE when it isn't otherwise. */ # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif /* Return a pointer to a zero-size object in memory (that is, actually, a pointer to a page boundary where the previous page is readable and writable and the next page is neither readable not writable), if possible. Return NULL otherwise. */ static void * zerosize_ptr (void) { /* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is not defined on HP-UX 11 (since it does not support MAP_FIXED). */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) return two_pages + pagesize; } #endif return NULL; } ��������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/wctomb.c������������������������������������������������������0000664�0000000�0000000�00000001623�12166360012�015461� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert wide character to multibyte character. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <string.h> #include <wchar.h> #include "wctomb-impl.h" �������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sprintf-posix.c������������������������������������������0000664�0000000�0000000�00000002220�12166360012�017762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible sprintf() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (sprintf, int, (char *, char const *, ...)); #include <float.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "macros.h" #include "test-sprintf-posix.h" int main (int argc, char *argv[]) { test_function (sprintf); return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude6.sh����������������������������������������������0000775�0000000�0000000�00000002343�12166360012�017055� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test anchored cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT bar: 1 foo/bar: 0 EOT test-exclude -anchored in -- bar foo/bar > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fputc.c��������������������������������������������������0000664�0000000�0000000�00000004656�12166360012�016275� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fputc() function. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fputc, int, (int, FILE *)); #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "msvc-inval.h" #include "macros.h" int main (int argc, char **argv) { const char *filename = "test-fputc.txt"; /* We don't have an fputc() function that installs an invalid parameter handler so far. So install that handler here, explicitly. */ #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING gl_msvc_inval_ensure_handler (); #endif /* Test that fputc() on an unbuffered stream sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "w"); ASSERT (fp != NULL); setvbuf (fp, NULL, _IONBF, 0); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fputc ('x', fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } /* Test that fputc() on an unbuffered stream sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w"); if (fp != NULL) { setvbuf (fp, NULL, _IONBF, 0); errno = 0; ASSERT (fputc ('x', fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } { FILE *fp = fdopen (99, "w"); if (fp != NULL) { setvbuf (fp, NULL, _IONBF, 0); errno = 0; ASSERT (fputc ('x', fp) == EOF); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } /* Clean up. */ unlink (filename); return 0; } ����������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/dup-safer-flag.c����������������������������������������������0000664�0000000�0000000�00000002443�12166360012�016764� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Duplicate a file descriptor result, avoiding clobbering STD{IN,OUT,ERR}_FILENO, with specific flags. Copyright (C) 2001, 2004-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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert and Eric Blake. */ #include <config.h> /* Specification. */ #include "unistd-safer.h" #include <fcntl.h> #include <unistd.h> /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */ int dup_safer_flag (int fd, int flag) { return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD, STDERR_FILENO + 1); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sys_types.c����������������������������������������������0000664�0000000�0000000�00000001721�12166360012�017204� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <sys/types.h> substitute. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2011. */ #include <config.h> #include <sys/types.h> /* Check that the types are all defined. */ pid_t t1; size_t t2; ssize_t t3; off_t t4; mode_t t5; int main (void) { return 0; } �����������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix.h�������������������������������������������0000664�0000000�0000000�00000010673�12166360012�017617� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible vsprintf() and sprintf() functions. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include "infinity.h" static void test_function (int (*my_printf) (const char *, ...)) { /* Here we don't test output that may be platform dependent. The bulk of the tests is done as part of the 'vasnprintf-posix' module. */ /* Test support of size specifiers as in C99. */ my_printf ("%ju %d\n", (uintmax_t) 12345671, 33, 44, 55); my_printf ("%zu %d\n", (size_t) 12345672, 33, 44, 55); my_printf ("%tu %d\n", (ptrdiff_t) 12345673, 33, 44, 55); /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal output of floating-point numbers. */ /* Positive zero. */ my_printf ("%a %d\n", 0.0, 33, 44, 55); /* Positive infinity. */ my_printf ("%a %d\n", Infinityd (), 33, 44, 55); /* Negative infinity. */ my_printf ("%a %d\n", - Infinityd (), 33, 44, 55); /* FLAG_ZERO with infinite number. */ /* "0000000inf 33" is not a valid result; see <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ my_printf ("%010a %d\n", Infinityd (), 33, 44, 55); /* Test the support of the %f format directive. */ /* A positive number. */ my_printf ("%f %d\n", 12.75, 33, 44, 55); /* A larger positive number. */ my_printf ("%f %d\n", 1234567.0, 33, 44, 55); /* A negative number. */ my_printf ("%f %d\n", -0.03125, 33, 44, 55); /* Positive zero. */ my_printf ("%f %d\n", 0.0, 33, 44, 55); /* FLAG_ZERO. */ my_printf ("%015f %d\n", 1234.0, 33, 44, 55); /* Precision. */ my_printf ("%.f %d\n", 1234.0, 33, 44, 55); /* Precision with no rounding. */ my_printf ("%.2f %d\n", 999.95, 33, 44, 55); /* Precision with rounding. */ my_printf ("%.2f %d\n", 999.996, 33, 44, 55); /* A positive number. */ my_printf ("%Lf %d\n", 12.75L, 33, 44, 55); /* A larger positive number. */ my_printf ("%Lf %d\n", 1234567.0L, 33, 44, 55); /* A negative number. */ my_printf ("%Lf %d\n", -0.03125L, 33, 44, 55); /* Positive zero. */ my_printf ("%Lf %d\n", 0.0L, 33, 44, 55); /* FLAG_ZERO. */ my_printf ("%015Lf %d\n", 1234.0L, 33, 44, 55); /* Precision. */ my_printf ("%.Lf %d\n", 1234.0L, 33, 44, 55); /* Precision with no rounding. */ my_printf ("%.2Lf %d\n", 999.95L, 33, 44, 55); /* Precision with rounding. */ my_printf ("%.2Lf %d\n", 999.996L, 33, 44, 55); /* Test the support of the %F format directive. */ /* A positive number. */ my_printf ("%F %d\n", 12.75, 33, 44, 55); /* A larger positive number. */ my_printf ("%F %d\n", 1234567.0, 33, 44, 55); /* A negative number. */ my_printf ("%F %d\n", -0.03125, 33, 44, 55); /* Positive zero. */ my_printf ("%F %d\n", 0.0, 33, 44, 55); /* FLAG_ZERO. */ my_printf ("%015F %d\n", 1234.0, 33, 44, 55); /* Precision. */ my_printf ("%.F %d\n", 1234.0, 33, 44, 55); /* Precision with no rounding. */ my_printf ("%.2F %d\n", 999.95, 33, 44, 55); /* Precision with rounding. */ my_printf ("%.2F %d\n", 999.996, 33, 44, 55); /* A positive number. */ my_printf ("%LF %d\n", 12.75L, 33, 44, 55); /* A larger positive number. */ my_printf ("%LF %d\n", 1234567.0L, 33, 44, 55); /* A negative number. */ my_printf ("%LF %d\n", -0.03125L, 33, 44, 55); /* Positive zero. */ my_printf ("%LF %d\n", 0.0L, 33, 44, 55); /* FLAG_ZERO. */ my_printf ("%015LF %d\n", 1234.0L, 33, 44, 55); /* Precision. */ my_printf ("%.LF %d\n", 1234.0L, 33, 44, 55); /* Precision with no rounding. */ my_printf ("%.2LF %d\n", 999.95L, 33, 44, 55); /* Precision with rounding. */ my_printf ("%.2LF %d\n", 999.996L, 33, 44, 55); /* Test the support of the POSIX/XSI format strings with positions. */ my_printf ("%2$d %1$d\n", 33, 55); } ���������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-xalloc-die.sh��������������������������������������������0000775�0000000�0000000�00000002106�12166360012�017354� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test suite for xalloc_die. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . test-xalloc-die${EXEEXT} > out 2> err case $? in 1) ;; *) Exit 1;; esac tr -d '\015' < err \ | sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,' > err2 || Exit 1 compare - err2 <<\EOF || Exit 1 test-xalloc-die: memory exhausted EOF test -s out && Exit 1 Exit $fail ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-openat.c�������������������������������������������������0000664�0000000�0000000�00000005210�12166360012�016425� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test that openat works. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <fcntl.h> #include "signature.h" SIGNATURE_CHECK (openat, int, (int, char const *, int, ...)); #include <errno.h> #include <stdarg.h> #include <stdbool.h> #include <stdio.h> #include <unistd.h> #include "progname.h" #include "macros.h" #define BASE "test-openat.t" #include "test-open.h" static int dfd = AT_FDCWD; /* Wrapper around openat to test open behavior. */ static int do_open (char const *name, int flags, ...) { if (flags & O_CREAT) { mode_t mode = 0; va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); return openat (dfd, name, flags, mode); } return openat (dfd, name, flags); } int main (int argc _GL_UNUSED, char *argv[]) { int result; set_program_name (argv[0]); /* Test behaviour for invalid file descriptors. */ { errno = 0; ASSERT (openat (-1, "foo", O_RDONLY) == -1); ASSERT (errno == EBADF); } { errno = 0; ASSERT (openat (99, "foo", O_RDONLY) == -1); ASSERT (errno == EBADF); } /* Basic checks. */ result = test_open (do_open, false); dfd = open (".", O_RDONLY); ASSERT (0 <= dfd); ASSERT (test_open (do_open, false) == result); ASSERT (close (dfd) == 0); /* Check that even when *-safer modules are in use, plain openat can land in fd 0. Do this test last, since it is destructive to stdin. */ ASSERT (close (STDIN_FILENO) == 0); ASSERT (openat (AT_FDCWD, ".", O_RDONLY) == STDIN_FILENO); { dfd = open (".", O_RDONLY); ASSERT (STDIN_FILENO < dfd); ASSERT (chdir ("..") == 0); ASSERT (close (STDIN_FILENO) == 0); ASSERT (openat (dfd, ".", O_RDONLY) == STDIN_FILENO); ASSERT (close (dfd) == 0); } return result; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-lseek.c��������������������������������������������������0000664�0000000�0000000�00000006300�12166360012�016243� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of lseek() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake, 2007. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (lseek, off_t, (int, off_t, int)); #include <errno.h> #include "macros.h" /* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1' if they are pipes, and '2' if they are closed. Check for proper semantics of lseek. */ int main (int argc, char **argv) { if (argc != 2) return 2; switch (*argv[1]) { case '0': /* regular files */ ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2); ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; #if ! defined __BEOS__ /* POSIX says that the last lseek call, when failing, does not change the current offset. But BeOS sets it to 0. */ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2); #endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); #endif ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2); errno = 0; ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; #if ! defined __BEOS__ /* POSIX says that the last lseek call, when failing, does not change the current offset. But BeOS sets it to 0. */ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2); #endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); #endif break; case '1': /* pipes */ errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == ESPIPE); errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == ESPIPE); break; case '2': /* closed */ /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the invoking shell are not enough on HP-UX. */ close (0); close (1); errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); /* Test behaviour for invalid file descriptors. */ errno = 0; ASSERT (lseek (-1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (lseek (99, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); break; default: return 1; } return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/malloca.valgrind����������������������������������������������0000664�0000000�0000000�00000000257�11433657032�017173� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Suppress a valgrind message about use of uninitialized memory in freea(). # This use is OK because it provides only a speedup. { freea Memcheck:Cond fun:freea } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-strcasestr.c���������������������������������������������0000664�0000000�0000000�00000016676�12166360012�017356� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of case-insensitive searching in a string. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <string.h> #include "signature.h" SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *)); #include <signal.h> #include <stdlib.h> #include <unistd.h> #include "macros.h" int main () { #if HAVE_DECL_ALARM /* Declare failure if test takes too long, by using default abort caused by SIGALRM. All known platforms that lack alarm also lack strcasestr, and the replacement strcasestr is known to not take too long. */ signal (SIGALRM, SIG_DFL); alarm (50); #endif { const char input[] = "foo"; const char *result = strcasestr (input, ""); ASSERT (result == input); } { const char input[] = "foo"; const char *result = strcasestr (input, "O"); ASSERT (result == input + 1); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBD"); ASSERT (result == input + 15); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBE"); ASSERT (result == NULL); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBCD"); ASSERT (result == input + 11); } /* Check that a long periodic needle does not cause false positives. */ { const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD" "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD" "_C3_A7_20_EF_BF_BD"); const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"; const char *result = strcasestr (input, need); ASSERT (result == NULL); } { const char input[] = ("F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD" "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD" "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20" "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"); const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"; const char *result = strcasestr (input, need); ASSERT (result == input + 115); } /* Check that a very long haystack is handled quickly if the needle is short and occurs near the beginning. */ { size_t repeat = 10000; size_t m = 1000000; const char *needle = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; char *haystack = (char *) malloc (m + 1); if (haystack != NULL) { memset (haystack, 'A', m); haystack[0] = 'B'; haystack[m] = '\0'; for (; repeat > 0; repeat--) { ASSERT (strcasestr (haystack, needle) == haystack + 1); } free (haystack); } } /* Check that a very long needle is discarded quickly if the haystack is short. */ { size_t repeat = 10000; size_t m = 1000000; const char *haystack = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; char *needle = (char *) malloc (m + 1); if (needle != NULL) { memset (needle, 'A', m); needle[m] = '\0'; for (; repeat > 0; repeat--) { ASSERT (strcasestr (haystack, needle) == NULL); } free (needle); } } /* Check that the asymptotic worst-case complexity is not quadratic. */ { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); if (haystack != NULL && needle != NULL) { const char *result; memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = '\0'; memset (needle, 'a', m); needle[m] = 'B'; needle[m + 1] = '\0'; result = strcasestr (haystack, needle); ASSERT (result == haystack + m); } free (needle); free (haystack); } { /* Ensure that with a barely periodic "short" needle, strcasestr's search does not mistakenly skip just past the match point. This use of strcasestr would mistakenly return NULL before gnulib v0.0-4927. */ const char *haystack = "\n" "with_build_libsubdir\n" "with_local_prefix\n" "with_gxx_include_dir\n" "with_cpp_install_dir\n" "enable_generated_files_in_srcdir\n" "with_gnu_ld\n" "with_ld\n" "with_demangler_in_ld\n" "with_gnu_as\n" "with_as\n" "enable_largefile\n" "enable_werror_always\n" "enable_checking\n" "enable_coverage\n" "enable_gather_detailed_mem_stats\n" "enable_build_with_cxx\n" "with_stabs\n" "enable_multilib\n" "enable___cxa_atexit\n" "enable_decimal_float\n" "enable_fixed_point\n" "enable_threads\n" "enable_tls\n" "enable_objc_gc\n" "with_dwarf2\n" "enable_shared\n" "with_build_sysroot\n" "with_sysroot\n" "with_specs\n" "with_pkgversion\n" "with_bugurl\n" "enable_languages\n" "with_multilib_list\n"; const char *needle = "\n" "with_GNU_ld\n"; const char* p = strcasestr (haystack, needle); ASSERT (p - haystack == 114); } { /* Same bug, shorter trigger. */ const char *haystack = "..wi.D."; const char *needle = ".d."; const char* p = strcasestr (haystack, needle); ASSERT (p - haystack == 4); } { /* Like the above, but trigger the flaw in two_way_long_needle by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater. Rather than trying to find the right alignment manually, I've arbitrarily chosen the following needle and template for the haystack, and ensure that for each placement of the needle in that haystack, strcasestr finds it. */ const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n"; const char *h = "\n" "with_build_libsubdir\n" "with_local_prefix\n" "with_gxx_include_dir\n" "with_cpp_install_dir\n" "with_e_\n" "..............................\n" "with_FGHIJKLMNOPQRSTUVWXYZ\n" "with_567890123456789\n" "with_multilib_list\n"; size_t h_len = strlen (h); char *haystack = malloc (h_len + 1); size_t i; ASSERT (haystack); for (i = 0; i < h_len - strlen (needle); i++) { const char *p; memcpy (haystack, h, h_len + 1); memcpy (haystack + i, needle, strlen (needle) + 1); p = strcasestr (haystack, needle); ASSERT (p); ASSERT (p - haystack == i); } } return 0; } ������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-frexpl.c�������������������������������������������������0000664�0000000�0000000�00000012721�12166360012�016444� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of splitting a 'long double' into fraction and mantissa. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <math.h> #include "signature.h" SIGNATURE_CHECK (frexpl, long double, (long double, int *)); #include <float.h> #include "fpucw.h" #include "isnanl-nolibm.h" #include "minus-zero.h" #include "infinity.h" #include "nan.h" #include "macros.h" /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() function. */ #undef exp #define exp exponent /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -964. Similarly, on PowerPC machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -968. For exponents below that, the precision may be truncated to the precision used for 'double'. */ #ifdef __sgi # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57) #elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__ # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53) #else # define MIN_NORMAL_EXP LDBL_MIN_EXP #endif static long double my_ldexp (long double x, int d) { for (; d > 0; d--) x *= 2.0L; for (; d < 0; d++) x *= 0.5L; return x; } int main () { int i; long double x; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); { /* NaN. */ int exp = -9999; long double mantissa; x = NaNl (); mantissa = frexpl (x, &exp); ASSERT (isnanl (mantissa)); } { /* Positive infinity. */ int exp = -9999; long double mantissa; x = Infinityl (); mantissa = frexpl (x, &exp); ASSERT (mantissa == x); } { /* Negative infinity. */ int exp = -9999; long double mantissa; x = - Infinityl (); mantissa = frexpl (x, &exp); ASSERT (mantissa == x); } { /* Positive zero. */ int exp = -9999; long double mantissa; x = 0.0L; mantissa = frexpl (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (!signbit (mantissa)); } { /* Negative zero. */ int exp = -9999; long double mantissa; x = minus_zerol; mantissa = frexpl (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (signbit (mantissa)); } for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505L); } for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa >= 0.5L); ASSERT (mantissa < 1.0L); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025L); } for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i || exp == i + 1); ASSERT (mantissa >= 0.5L); ASSERT (mantissa < 1.0L); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } �����������������������������������������������id-utils-4.6+git20120811/gnulib-tests/gnulib.mk�����������������������������������������������������0000664�0000000�0000000�00000112206�12166360012�015633� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file 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 file 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 file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects SUBDIRS = . TESTS = XFAIL_TESTS = TESTS_ENVIRONMENT = noinst_PROGRAMS = check_PROGRAMS = noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -D@gltests_WITNESS@=1 \ -I. -I$(srcdir) \ -I.. -I$(srcdir)/.. \ -I../lib -I$(srcdir)/../lib LDADD = libtests.a ../lib/libgnu.a libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = AM_LIBTOOLFLAGS = --preserve-dup-deps TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' ## begin gnulib module alloca-opt-tests TESTS += test-alloca-opt check_PROGRAMS += test-alloca-opt EXTRA_DIST += test-alloca-opt.c ## end gnulib module alloca-opt-tests ## begin gnulib module argmatch libtests_a_SOURCES += argmatch.c EXTRA_DIST += argmatch.h ## end gnulib module argmatch ## begin gnulib module argmatch-tests TESTS += test-argmatch check_PROGRAMS += test-argmatch test_argmatch_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-argmatch.c macros.h ## end gnulib module argmatch-tests ## begin gnulib module argv-iter-tests TESTS += test-argv-iter check_PROGRAMS += test-argv-iter EXTRA_DIST += test-argv-iter.c macros.h ## end gnulib module argv-iter-tests ## begin gnulib module binary-io libtests_a_SOURCES += binary-io.h ## end gnulib module binary-io ## begin gnulib module binary-io-tests TESTS += test-binary-io.sh check_PROGRAMS += test-binary-io EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h ## end gnulib module binary-io-tests ## begin gnulib module bitrotate-tests TESTS += test-bitrotate check_PROGRAMS += test-bitrotate EXTRA_DIST += test-bitrotate.c macros.h ## end gnulib module bitrotate-tests ## begin gnulib module btowc-tests TESTS += test-btowc1.sh test-btowc2.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-btowc EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h ## end gnulib module btowc-tests ## begin gnulib module c-ctype-tests TESTS += test-c-ctype check_PROGRAMS += test-c-ctype EXTRA_DIST += test-c-ctype.c macros.h ## end gnulib module c-ctype-tests ## begin gnulib module c-strcase-tests TESTS += test-c-strcase.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h ## end gnulib module c-strcase-tests ## begin gnulib module calloc-gnu-tests TESTS += test-calloc-gnu check_PROGRAMS += test-calloc-gnu EXTRA_DIST += test-calloc-gnu.c ## end gnulib module calloc-gnu-tests ## begin gnulib module chdir-tests TESTS += test-chdir check_PROGRAMS += test-chdir EXTRA_DIST += test-chdir.c signature.h macros.h ## end gnulib module chdir-tests ## begin gnulib module cloexec-tests TESTS += test-cloexec check_PROGRAMS += test-cloexec EXTRA_DIST += test-cloexec.c macros.h ## end gnulib module cloexec-tests ## begin gnulib module close-tests TESTS += test-close check_PROGRAMS += test-close EXTRA_DIST += test-close.c signature.h macros.h ## end gnulib module close-tests ## begin gnulib module dirent-tests TESTS += test-dirent check_PROGRAMS += test-dirent EXTRA_DIST += test-dirent.c ## end gnulib module dirent-tests ## begin gnulib module dirname-tests TESTS += test-dirname check_PROGRAMS += test-dirname test_dirname_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-dirname.c ## end gnulib module dirname-tests ## begin gnulib module dup-tests TESTS += test-dup check_PROGRAMS += test-dup EXTRA_DIST += test-dup.c signature.h macros.h ## end gnulib module dup-tests ## begin gnulib module dup2-tests TESTS += test-dup2 check_PROGRAMS += test-dup2 EXTRA_DIST += test-dup2.c signature.h macros.h ## end gnulib module dup2-tests ## begin gnulib module environ-tests TESTS += test-environ check_PROGRAMS += test-environ EXTRA_DIST += test-environ.c ## end gnulib module environ-tests ## begin gnulib module errno-tests TESTS += test-errno check_PROGRAMS += test-errno EXTRA_DIST += test-errno.c ## end gnulib module errno-tests ## begin gnulib module exclude-tests TESTS += \ test-exclude1.sh\ test-exclude2.sh\ test-exclude3.sh\ test-exclude4.sh\ test-exclude5.sh\ test-exclude6.sh\ test-exclude7.sh\ test-exclude8.sh check_PROGRAMS += test-exclude test_exclude_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-exclude.c test-exclude1.sh test-exclude2.sh test-exclude3.sh test-exclude4.sh test-exclude5.sh test-exclude6.sh test-exclude7.sh test-exclude8.sh ## end gnulib module exclude-tests ## begin gnulib module fchdir-tests TESTS += test-fchdir check_PROGRAMS += test-fchdir test_fchdir_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-fchdir.c signature.h macros.h ## end gnulib module fchdir-tests ## begin gnulib module fcntl-h-tests TESTS += test-fcntl-h check_PROGRAMS += test-fcntl-h EXTRA_DIST += test-fcntl-h.c ## end gnulib module fcntl-h-tests ## begin gnulib module fcntl-tests TESTS += test-fcntl check_PROGRAMS += test-fcntl EXTRA_DIST += test-fcntl.c signature.h macros.h ## end gnulib module fcntl-tests ## begin gnulib module fd-safer-flag libtests_a_SOURCES += fd-safer-flag.c dup-safer-flag.c ## end gnulib module fd-safer-flag ## begin gnulib module fdopen EXTRA_DIST += fdopen.c EXTRA_libtests_a_SOURCES += fdopen.c ## end gnulib module fdopen ## begin gnulib module fdopen-tests TESTS += test-fdopen check_PROGRAMS += test-fdopen EXTRA_DIST += test-fdopen.c signature.h macros.h ## end gnulib module fdopen-tests ## begin gnulib module fdopendir-tests TESTS += test-fdopendir check_PROGRAMS += test-fdopendir test_fdopendir_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-fdopendir.c signature.h macros.h ## end gnulib module fdopendir-tests ## begin gnulib module fflush-tests TESTS += test-fflush test-fflush2.sh check_PROGRAMS += test-fflush test-fflush2 MOSTLYCLEANFILES += test-fflush.txt EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h ## end gnulib module fflush-tests ## begin gnulib module fgetc-tests TESTS += test-fgetc check_PROGRAMS += test-fgetc EXTRA_DIST += test-fgetc.c signature.h macros.h ## end gnulib module fgetc-tests ## begin gnulib module float-tests TESTS += test-float check_PROGRAMS += test-float EXTRA_DIST += test-float.c macros.h ## end gnulib module float-tests ## begin gnulib module fnmatch-tests TESTS += test-fnmatch check_PROGRAMS += test-fnmatch EXTRA_DIST += test-fnmatch.c signature.h macros.h ## end gnulib module fnmatch-tests ## begin gnulib module fopen-tests TESTS += test-fopen check_PROGRAMS += test-fopen EXTRA_DIST += test-fopen.h test-fopen.c signature.h macros.h ## end gnulib module fopen-tests ## begin gnulib module fpending-tests TESTS += test-fpending.sh check_PROGRAMS += test-fpending MOSTLYCLEANFILES += test-fpending.t EXTRA_DIST += test-fpending.c test-fpending.sh macros.h ## end gnulib module fpending-tests ## begin gnulib module fprintf-posix-tests TESTS += test-fprintf-posix.sh test-fprintf-posix2.sh test-fprintf-posix3.sh check_PROGRAMS += test-fprintf-posix test-fprintf-posix2 test-fprintf-posix3 EXTRA_DIST += test-fprintf-posix.sh test-fprintf-posix.c test-fprintf-posix.h test-printf-posix.output test-fprintf-posix2.sh test-fprintf-posix2.c test-fprintf-posix3.sh test-fprintf-posix3.c infinity.h signature.h macros.h ## end gnulib module fprintf-posix-tests ## begin gnulib module fpurge-tests TESTS += test-fpurge check_PROGRAMS += test-fpurge MOSTLYCLEANFILES += t-fpurge.tmp EXTRA_DIST += test-fpurge.c macros.h ## end gnulib module fpurge-tests ## begin gnulib module fputc-tests TESTS += test-fputc check_PROGRAMS += test-fputc EXTRA_DIST += test-fputc.c signature.h macros.h ## end gnulib module fputc-tests ## begin gnulib module fread-tests TESTS += test-fread check_PROGRAMS += test-fread EXTRA_DIST += test-fread.c signature.h macros.h ## end gnulib module fread-tests ## begin gnulib module freading-tests TESTS += test-freading check_PROGRAMS += test-freading MOSTLYCLEANFILES += t-freading.tmp EXTRA_DIST += test-freading.c macros.h ## end gnulib module freading-tests ## begin gnulib module freopen-tests TESTS += test-freopen check_PROGRAMS += test-freopen EXTRA_DIST += test-freopen.c signature.h macros.h ## end gnulib module freopen-tests ## begin gnulib module frexp-nolibm-tests TESTS += test-frexp-nolibm check_PROGRAMS += test-frexp-nolibm test_frexp_nolibm_SOURCES = test-frexp.c EXTRA_DIST += test-frexp.c minus-zero.h infinity.h nan.h signature.h macros.h ## end gnulib module frexp-nolibm-tests ## begin gnulib module frexpl-nolibm-tests TESTS += test-frexpl-nolibm check_PROGRAMS += test-frexpl-nolibm test_frexpl_nolibm_SOURCES = test-frexpl.c EXTRA_DIST += test-frexpl.c minus-zero.h infinity.h nan.h signature.h macros.h ## end gnulib module frexpl-nolibm-tests ## begin gnulib module fseek-tests TESTS += test-fseek.sh test-fseek2.sh check_PROGRAMS += test-fseek EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h ## end gnulib module fseek-tests ## begin gnulib module fseeko-tests TESTS += test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh check_PROGRAMS += test-fseeko test-fseeko3 test-fseeko4 EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c test-fseeko3.sh test-fseeko4.c test-fseeko4.sh signature.h macros.h ## end gnulib module fseeko-tests ## begin gnulib module fseterr-tests TESTS += test-fseterr check_PROGRAMS += test-fseterr EXTRA_DIST += test-fseterr.c ## end gnulib module fseterr-tests ## begin gnulib module fstat-tests TESTS += test-fstat check_PROGRAMS += test-fstat EXTRA_DIST += test-fstat.c signature.h macros.h ## end gnulib module fstat-tests ## begin gnulib module fstatat-tests TESTS += test-fstatat check_PROGRAMS += test-fstatat test_fstatat_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-fstatat.c test-lstat.h test-stat.h signature.h macros.h ## end gnulib module fstatat-tests ## begin gnulib module ftell-tests TESTS += test-ftell.sh test-ftell2.sh test-ftell3 check_PROGRAMS += test-ftell test-ftell3 MOSTLYCLEANFILES += t-ftell3.tmp EXTRA_DIST += test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c signature.h macros.h ## end gnulib module ftell-tests ## begin gnulib module ftello-tests TESTS += test-ftello.sh test-ftello2.sh test-ftello3 test-ftello4.sh check_PROGRAMS += test-ftello test-ftello3 test-ftello4 MOSTLYCLEANFILES += t-ftello3.tmp EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c test-ftello4.c test-ftello4.sh signature.h macros.h ## end gnulib module ftello-tests ## begin gnulib module fwrite-tests TESTS += test-fwrite check_PROGRAMS += test-fwrite EXTRA_DIST += test-fwrite.c signature.h macros.h ## end gnulib module fwrite-tests ## begin gnulib module get-rusage-as libtests_a_SOURCES += get-rusage-as.c EXTRA_DIST += resource-ext.h ## end gnulib module get-rusage-as ## begin gnulib module getcwd-lgpl-tests TESTS += test-getcwd-lgpl check_PROGRAMS += test-getcwd-lgpl test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-getcwd-lgpl.c signature.h macros.h ## end gnulib module getcwd-lgpl-tests ## begin gnulib module getcwd-tests TESTS += test-getcwd.sh check_PROGRAMS += test-getcwd test_getcwd_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-getcwd.c test-getcwd.sh ## end gnulib module getcwd-tests ## begin gnulib module getdelim-tests TESTS += test-getdelim check_PROGRAMS += test-getdelim MOSTLYCLEANFILES += test-getdelim.txt EXTRA_DIST += test-getdelim.c signature.h macros.h ## end gnulib module getdelim-tests ## begin gnulib module getdtablesize-tests TESTS += test-getdtablesize check_PROGRAMS += test-getdtablesize EXTRA_DIST += test-getdtablesize.c signature.h macros.h ## end gnulib module getdtablesize-tests ## begin gnulib module getopt-posix-tests TESTS += test-getopt check_PROGRAMS += test-getopt test_getopt_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += macros.h signature.h test-getopt.c test-getopt.h test-getopt_long.h ## end gnulib module getopt-posix-tests ## begin gnulib module getpagesize EXTRA_DIST += getpagesize.c EXTRA_libtests_a_SOURCES += getpagesize.c ## end gnulib module getpagesize ## begin gnulib module hash-pjw libtests_a_SOURCES += hash-pjw.h hash-pjw.c ## end gnulib module hash-pjw ## begin gnulib module hash-tests TESTS += test-hash check_PROGRAMS += test-hash EXTRA_DIST += test-hash.c macros.h ## end gnulib module hash-tests ## begin gnulib module ignore-value-tests TESTS += test-ignore-value check_PROGRAMS += test-ignore-value EXTRA_DIST += test-ignore-value.c ## end gnulib module ignore-value-tests ## begin gnulib module intprops-tests TESTS += test-intprops check_PROGRAMS += test-intprops EXTRA_DIST += test-intprops.c macros.h ## end gnulib module intprops-tests ## begin gnulib module inttostr-tests TESTS += test-inttostr check_PROGRAMS += test-inttostr EXTRA_DIST += macros.h test-inttostr.c ## end gnulib module inttostr-tests ## begin gnulib module inttypes-incomplete BUILT_SOURCES += inttypes.h # We need the following in order to create <inttypes.h> when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h ## end gnulib module inttypes-incomplete ## begin gnulib module inttypes-tests TESTS += test-inttypes check_PROGRAMS += test-inttypes EXTRA_DIST += test-inttypes.c ## end gnulib module inttypes-tests ## begin gnulib module isnand-nolibm-tests TESTS += test-isnand-nolibm check_PROGRAMS += test-isnand-nolibm EXTRA_DIST += test-isnand-nolibm.c test-isnand.h minus-zero.h infinity.h nan.h macros.h ## end gnulib module isnand-nolibm-tests ## begin gnulib module isnanf-nolibm-tests TESTS += test-isnanf-nolibm check_PROGRAMS += test-isnanf-nolibm EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h minus-zero.h infinity.h nan.h macros.h ## end gnulib module isnanf-nolibm-tests ## begin gnulib module isnanl-nolibm-tests TESTS += test-isnanl-nolibm check_PROGRAMS += test-isnanl-nolibm EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h minus-zero.h infinity.h nan.h macros.h ## end gnulib module isnanl-nolibm-tests ## begin gnulib module iswblank-tests TESTS += test-iswblank check_PROGRAMS += test-iswblank EXTRA_DIST += test-iswblank.c macros.h ## end gnulib module iswblank-tests ## begin gnulib module langinfo-tests TESTS += test-langinfo check_PROGRAMS += test-langinfo EXTRA_DIST += test-langinfo.c ## end gnulib module langinfo-tests ## begin gnulib module locale BUILT_SOURCES += locale.h # We need the following in order to create <locale.h> when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/locale.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += locale.h locale.h-t EXTRA_DIST += locale.in.h ## end gnulib module locale ## begin gnulib module locale-tests TESTS += test-locale check_PROGRAMS += test-locale EXTRA_DIST += test-locale.c ## end gnulib module locale-tests ## begin gnulib module localename libtests_a_SOURCES += localename.c EXTRA_DIST += localename.h ## end gnulib module localename ## begin gnulib module localename-tests TESTS += test-localename check_PROGRAMS += test-localename test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) EXTRA_DIST += test-localename.c macros.h ## end gnulib module localename-tests ## begin gnulib module lock libtests_a_SOURCES += glthread/lock.h glthread/lock.c ## end gnulib module lock ## begin gnulib module lock-tests TESTS += test-lock check_PROGRAMS += test-lock test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ EXTRA_DIST += test-lock.c ## end gnulib module lock-tests ## begin gnulib module lseek-tests TESTS += test-lseek.sh check_PROGRAMS += test-lseek EXTRA_DIST += test-lseek.c test-lseek.sh signature.h macros.h ## end gnulib module lseek-tests ## begin gnulib module lstat-tests TESTS += test-lstat check_PROGRAMS += test-lstat EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h ## end gnulib module lstat-tests ## begin gnulib module malloc-gnu-tests TESTS += test-malloc-gnu check_PROGRAMS += test-malloc-gnu EXTRA_DIST += test-malloc-gnu.c ## end gnulib module malloc-gnu-tests ## begin gnulib module malloca libtests_a_SOURCES += malloca.c EXTRA_DIST += malloca.h malloca.valgrind ## end gnulib module malloca ## begin gnulib module malloca-tests TESTS += test-malloca check_PROGRAMS += test-malloca EXTRA_DIST += test-malloca.c ## end gnulib module malloca-tests ## begin gnulib module math-tests TESTS += test-math check_PROGRAMS += test-math EXTRA_DIST += test-math.c ## end gnulib module math-tests ## begin gnulib module mbrtowc-tests TESTS += \ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \ test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-mbrtowc test-mbrtowc-w32 EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h ## end gnulib module mbrtowc-tests ## begin gnulib module mbscasecmp-tests TESTS += test-mbscasecmp.sh TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' check_PROGRAMS += test-mbscasecmp EXTRA_DIST += test-mbscasecmp.sh test-mbscasecmp.c macros.h ## end gnulib module mbscasecmp-tests ## begin gnulib module mbsinit-tests TESTS += test-mbsinit.sh TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-mbsinit EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h ## end gnulib module mbsinit-tests ## begin gnulib module mbsrtowcs-tests TESTS += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-mbsrtowcs EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h ## end gnulib module mbsrtowcs-tests ## begin gnulib module memchr-tests TESTS += test-memchr check_PROGRAMS += test-memchr EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memchr-tests ## begin gnulib module memrchr-tests TESTS += test-memrchr check_PROGRAMS += test-memrchr EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memrchr-tests ## begin gnulib module nl_langinfo-tests TESTS += test-nl_langinfo.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-nl_langinfo EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h ## end gnulib module nl_langinfo-tests ## begin gnulib module open-tests TESTS += test-open check_PROGRAMS += test-open EXTRA_DIST += test-open.h test-open.c signature.h macros.h ## end gnulib module open-tests ## begin gnulib module openat-tests TESTS += test-openat check_PROGRAMS += test-openat test_openat_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-openat.c test-open.h signature.h macros.h ## end gnulib module openat-tests ## begin gnulib module pathmax-tests TESTS += test-pathmax check_PROGRAMS += test-pathmax EXTRA_DIST += test-pathmax.c ## end gnulib module pathmax-tests ## begin gnulib module printf-frexp-tests TESTS += test-printf-frexp check_PROGRAMS += test-printf-frexp EXTRA_DIST += test-printf-frexp.c macros.h ## end gnulib module printf-frexp-tests ## begin gnulib module printf-frexpl-tests TESTS += test-printf-frexpl check_PROGRAMS += test-printf-frexpl EXTRA_DIST += test-printf-frexpl.c macros.h ## end gnulib module printf-frexpl-tests ## begin gnulib module printf-posix-tests TESTS += test-printf-posix.sh test-printf-posix2.sh check_PROGRAMS += test-printf-posix test-printf-posix2 EXTRA_DIST += test-printf-posix.sh test-printf-posix.c test-printf-posix.h test-printf-posix.output test-printf-posix2.sh test-printf-posix2.c infinity.h signature.h macros.h ## end gnulib module printf-posix-tests ## begin gnulib module putenv EXTRA_DIST += putenv.c EXTRA_libtests_a_SOURCES += putenv.c ## end gnulib module putenv ## begin gnulib module quotearg-simple-tests TESTS += test-quotearg-simple check_PROGRAMS += test-quotearg-simple test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h ## end gnulib module quotearg-simple-tests ## begin gnulib module realloc-gnu-tests TESTS += test-realloc-gnu check_PROGRAMS += test-realloc-gnu EXTRA_DIST += test-realloc-gnu.c ## end gnulib module realloc-gnu-tests ## begin gnulib module same-inode EXTRA_DIST += same-inode.h ## end gnulib module same-inode ## begin gnulib module setenv EXTRA_DIST += setenv.c EXTRA_libtests_a_SOURCES += setenv.c ## end gnulib module setenv ## begin gnulib module setenv-tests TESTS += test-setenv check_PROGRAMS += test-setenv EXTRA_DIST += test-setenv.c signature.h macros.h ## end gnulib module setenv-tests ## begin gnulib module setlocale EXTRA_DIST += setlocale.c EXTRA_libtests_a_SOURCES += setlocale.c ## end gnulib module setlocale ## begin gnulib module setlocale-tests TESTS += test-setlocale1.sh test-setlocale2.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-setlocale1 test-setlocale2 EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h ## end gnulib module setlocale-tests ## begin gnulib module signbit-tests TESTS += test-signbit check_PROGRAMS += test-signbit EXTRA_DIST += test-signbit.c minus-zero.h infinity.h macros.h ## end gnulib module signbit-tests ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += c++defs.h # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += c++defs.h c++defs.h-t CXXDEFS_H=c++defs.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h ## end gnulib module snippet/warn-on-use ## begin gnulib module snprintf EXTRA_DIST += snprintf.c EXTRA_libtests_a_SOURCES += snprintf.c ## end gnulib module snprintf ## begin gnulib module snprintf-tests TESTS += test-snprintf check_PROGRAMS += test-snprintf EXTRA_DIST += test-snprintf.c signature.h macros.h ## end gnulib module snprintf-tests ## begin gnulib module sprintf-posix-tests TESTS += test-sprintf-posix check_PROGRAMS += test-sprintf-posix EXTRA_DIST += test-sprintf-posix.c test-sprintf-posix.h minus-zero.h infinity.h nan.h signature.h macros.h ## end gnulib module sprintf-posix-tests ## begin gnulib module stat-tests TESTS += test-stat check_PROGRAMS += test-stat test_stat_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h ## end gnulib module stat-tests ## begin gnulib module stdbool-tests TESTS += test-stdbool check_PROGRAMS += test-stdbool EXTRA_DIST += test-stdbool.c ## end gnulib module stdbool-tests ## begin gnulib module stddef-tests TESTS += test-stddef check_PROGRAMS += test-stddef EXTRA_DIST += test-stddef.c ## end gnulib module stddef-tests ## begin gnulib module stdint-tests TESTS += test-stdint check_PROGRAMS += test-stdint EXTRA_DIST += test-stdint.c ## end gnulib module stdint-tests ## begin gnulib module stdio-tests TESTS += test-stdio check_PROGRAMS += test-stdio EXTRA_DIST += test-stdio.c ## end gnulib module stdio-tests ## begin gnulib module stdlib-tests TESTS += test-stdlib check_PROGRAMS += test-stdlib EXTRA_DIST += test-stdlib.c test-sys_wait.h ## end gnulib module stdlib-tests ## begin gnulib module strcasestr-tests TESTS += test-strcasestr check_PROGRAMS += test-strcasestr EXTRA_DIST += test-strcasestr.c signature.h macros.h ## end gnulib module strcasestr-tests ## begin gnulib module strerror-tests TESTS += test-strerror check_PROGRAMS += test-strerror EXTRA_DIST += test-strerror.c signature.h macros.h ## end gnulib module strerror-tests ## begin gnulib module string-tests TESTS += test-string check_PROGRAMS += test-string EXTRA_DIST += test-string.c ## end gnulib module string-tests ## begin gnulib module strings-tests TESTS += test-strings check_PROGRAMS += test-strings EXTRA_DIST += test-strings.c ## end gnulib module strings-tests ## begin gnulib module strnlen-tests TESTS += test-strnlen check_PROGRAMS += test-strnlen EXTRA_DIST += test-strnlen.c zerosize-ptr.h signature.h macros.h ## end gnulib module strnlen-tests ## begin gnulib module symlink EXTRA_DIST += symlink.c EXTRA_libtests_a_SOURCES += symlink.c ## end gnulib module symlink ## begin gnulib module symlink-tests TESTS += test-symlink check_PROGRAMS += test-symlink EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h ## end gnulib module symlink-tests ## begin gnulib module sys_ioctl-tests TESTS += test-sys_ioctl check_PROGRAMS += test-sys_ioctl EXTRA_DIST += test-sys_ioctl.c ## end gnulib module sys_ioctl-tests ## begin gnulib module sys_stat-tests TESTS += test-sys_stat check_PROGRAMS += test-sys_stat EXTRA_DIST += test-sys_stat.c ## end gnulib module sys_stat-tests ## begin gnulib module sys_types-tests TESTS += test-sys_types check_PROGRAMS += test-sys_types EXTRA_DIST += test-sys_types.c ## end gnulib module sys_types-tests ## begin gnulib module test-framework-sh-tests TESTS += test-init.sh EXTRA_DIST += init.sh EXTRA_DIST += test-init.sh ## end gnulib module test-framework-sh-tests ## begin gnulib module thread libtests_a_SOURCES += glthread/thread.h glthread/thread.c ## end gnulib module thread ## begin gnulib module thread-tests TESTS += test-thread_self test-thread_create check_PROGRAMS += test-thread_self test-thread_create test_thread_self_LDADD = $(LDADD) @LIBTHREAD@ test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@ EXTRA_DIST += test-thread_self.c test-thread_create.c macros.h ## end gnulib module thread-tests ## begin gnulib module threadlib libtests_a_SOURCES += glthread/threadlib.c EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath ## end gnulib module threadlib ## begin gnulib module time-tests TESTS += test-time check_PROGRAMS += test-time EXTRA_DIST += test-time.c ## end gnulib module time-tests ## begin gnulib module unistd-safer-tests TESTS += test-dup-safer check_PROGRAMS += test-dup-safer EXTRA_DIST += test-dup-safer.c macros.h ## end gnulib module unistd-safer-tests ## begin gnulib module unistd-tests TESTS += test-unistd check_PROGRAMS += test-unistd EXTRA_DIST += test-unistd.c ## end gnulib module unistd-tests ## begin gnulib module uniwidth/width-tests TESTS += test-uc_width uniwidth/test-uc_width2.sh check_PROGRAMS += test-uc_width test-uc_width2 test_uc_width_SOURCES = uniwidth/test-uc_width.c test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING) test_uc_width2_SOURCES = uniwidth/test-uc_width2.c test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING) EXTRA_DIST += uniwidth/test-uc_width.c uniwidth/test-uc_width2.c uniwidth/test-uc_width2.sh macros.h ## end gnulib module uniwidth/width-tests ## begin gnulib module unsetenv EXTRA_DIST += unsetenv.c EXTRA_libtests_a_SOURCES += unsetenv.c ## end gnulib module unsetenv ## begin gnulib module unsetenv-tests TESTS += test-unsetenv check_PROGRAMS += test-unsetenv EXTRA_DIST += test-unsetenv.c signature.h macros.h ## end gnulib module unsetenv-tests ## begin gnulib module update-copyright-tests TESTS += test-update-copyright.sh TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)' EXTRA_DIST += test-update-copyright.sh ## end gnulib module update-copyright-tests ## begin gnulib module vasnprintf-tests TESTS += test-vasnprintf check_PROGRAMS += test-vasnprintf EXTRA_DIST += test-vasnprintf.c macros.h ## end gnulib module vasnprintf-tests ## begin gnulib module vc-list-files-tests TESTS += test-vc-list-files-git.sh TESTS += test-vc-list-files-cvs.sh TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)' EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh ## end gnulib module vc-list-files-tests ## begin gnulib module verify-tests TESTS_ENVIRONMENT += MAKE='$(MAKE)' TESTS += test-verify test-verify.sh check_PROGRAMS += test-verify EXTRA_DIST += test-verify.c test-verify.sh ## end gnulib module verify-tests ## begin gnulib module vfprintf-posix-tests TESTS += test-vfprintf-posix.sh check_PROGRAMS += test-vfprintf-posix EXTRA_DIST += test-vfprintf-posix.sh test-vfprintf-posix.c test-fprintf-posix.h test-printf-posix.output infinity.h signature.h macros.h ## end gnulib module vfprintf-posix-tests ## begin gnulib module vma-iter libtests_a_SOURCES += vma-iter.c EXTRA_DIST += vma-iter.h ## end gnulib module vma-iter ## begin gnulib module wchar-tests TESTS += test-wchar check_PROGRAMS += test-wchar EXTRA_DIST += test-wchar.c ## end gnulib module wchar-tests ## begin gnulib module wcrtomb-tests TESTS += \ test-wcrtomb.sh \ test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \ test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-wcrtomb test-wcrtomb-w32 EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h ## end gnulib module wcrtomb-tests ## begin gnulib module wctob EXTRA_DIST += wctob.c EXTRA_libtests_a_SOURCES += wctob.c ## end gnulib module wctob ## begin gnulib module wctomb EXTRA_DIST += wctomb-impl.h wctomb.c EXTRA_libtests_a_SOURCES += wctomb.c ## end gnulib module wctomb ## begin gnulib module wctype-h-tests TESTS += test-wctype-h check_PROGRAMS += test-wctype-h EXTRA_DIST += test-wctype-h.c macros.h ## end gnulib module wctype-h-tests ## begin gnulib module wcwidth-tests TESTS += test-wcwidth check_PROGRAMS += test-wcwidth EXTRA_DIST += test-wcwidth.c signature.h macros.h ## end gnulib module wcwidth-tests ## begin gnulib module xalloc-die-tests TESTS += test-xalloc-die.sh check_PROGRAMS += test-xalloc-die test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh ## end gnulib module xalloc-die-tests ## begin gnulib module yield libtests_a_SOURCES += glthread/yield.h ## end gnulib module yield # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fread.c��������������������������������������������������0000664�0000000�0000000�00000005161�12166360012�016225� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fread() function. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *)); #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "msvc-inval.h" #include "macros.h" int main (int argc, char **argv) { const char *filename = "test-fread.txt"; /* We don't have an fread() function that installs an invalid parameter handler so far. So install that handler here, explicitly. */ #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING gl_msvc_inval_ensure_handler (); #endif /* Prepare a file. */ { const char text[] = "hello world"; int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600); ASSERT (fd >= 0); ASSERT (write (fd, text, sizeof (text)) == sizeof (text)); ASSERT (close (fd) == 0); } /* Test that fread() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "r"); char buf[5]; ASSERT (fp != NULL); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fread (buf, 1, sizeof (buf), fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } /* Test that fread() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "r"); if (fp != NULL) { char buf[1]; errno = 0; ASSERT (fread (buf, 1, 1, fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } { FILE *fp = fdopen (99, "r"); if (fp != NULL) { char buf[1]; errno = 0; ASSERT (fread (buf, 1, 1, fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } /* Clean up. */ unlink (filename); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-vc-list-files-cvs.sh�������������������������������������0000775�0000000�0000000�00000003240�12166360012�020605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Unit tests for vc-list-files # Copyright (C) 2008-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" . tmpdir=vc-cvs repo=`pwd`/$tmpdir/repo fail=0 for i in with-cvsu without; do # On the first iteration, test using cvsu, if it's in your path. # On the second iteration, ensure that cvsu fails, so we'll # exercise the awk-using code. if test $i = without; then printf '%s\n' '#!/bin/sh' 'exit 1' > cvsu chmod a+x cvsu PATH=`pwd`:$PATH export PATH fi ok=0 mkdir $tmpdir && cd $tmpdir && # without cvs, skip the test { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \ || skip_ "cvs not found in PATH"; } && mkdir w && cd w && mkdir d && touch d/a b c && cvs -Q -d "$repo" import -m imp m M M0 && cvs -Q -d "$repo" co m && cd m && printf '%s\n' b c d/a > expected && vc-list-files | sort > actual && compare expected actual && ok=1 test $ok = 0 && fail=1 done Exit $fail ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/binary-io.h���������������������������������������������������0000664�0000000�0000000�00000003563�12166360012�016071� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Binary mode I/O. Copyright (C) 2001, 2003, 2005, 2008-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 <http://www.gnu.org/licenses/>. */ #ifndef _BINARY_H #define _BINARY_H /* For systems that distinguish between text and binary I/O. O_BINARY is guaranteed by the gnulib <fcntl.h>. */ #include <fcntl.h> /* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...', so we include it here first. */ #include <stdio.h> /* SET_BINARY (fd); changes the file descriptor fd to perform binary I/O. */ #if O_BINARY # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ # include <io.h> /* declares setmode() */ # else # define setmode _setmode # undef fileno # define fileno _fileno # endif # ifdef __DJGPP__ # include <unistd.h> /* declares isatty() */ /* Avoid putting stdin/stdout in binary mode if it is connected to the console, because that would make it impossible for the user to interrupt the program through Ctrl-C or Ctrl-Break. */ # define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)) # else # define SET_BINARY(fd) ((void) setmode (fd, O_BINARY)) # endif #else /* On reasonable systems, binary I/O is the default. */ # define SET_BINARY(fd) /* do nothing */ ((void) 0) #endif #endif /* _BINARY_H */ ���������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftell.c��������������������������������������������������0000664�0000000�0000000�00000005411�12166360012�016250� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of ftell() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (ftell, long, (FILE *)); #include "binary-io.h" #include "macros.h" #ifndef FUNC_UNGETC_BROKEN # define FUNC_UNGETC_BROKEN 0 #endif int main (int argc, char **argv) { int ch; /* Assume stdin is seekable iff argc > 1. */ if (argc == 1) { ASSERT (ftell (stdin) == -1); return 0; } /* mingw ftell is unreliable on text mode input. */ SET_BINARY (0); /* Simple tests. */ ASSERT (ftell (stdin) == 0); ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 1); /* Test ftell after ungetc of read input. */ ch = ungetc ('#', stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 0); ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 1); /* Test ftell after fseek. */ ASSERT (fseek (stdin, 2, SEEK_SET) == 0); ASSERT (ftell (stdin) == 2); /* Test ftell after random ungetc. */ ch = fgetc (stdin); ASSERT (ch == '/'); ch = ungetc ('@', stdin); ASSERT (ch == '@'); ASSERT (ftell (stdin) == 2); ch = fgetc (stdin); ASSERT (ch == '@'); ASSERT (ftell (stdin) == 3); if (2 < argc) { if (FUNC_UNGETC_BROKEN) { fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", stderr); return 77; } /* Test ftell after ungetc without read. */ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0); ASSERT (ftell (stdin) == 3); ch = ungetc ('~', stdin); ASSERT (ch == '~'); ASSERT (ftell (stdin) == 2); } #if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */ /* Test ftell beyond end of file. */ ASSERT (fseek (stdin, 0, SEEK_END) == 0); ch = ftell (stdin); ASSERT (fseek (stdin, 10, SEEK_END) == 0); ASSERT (ftell (stdin) == ch + 10); #endif return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix2.sh����������������������������������������0000775�0000000�0000000�00000001230�11433657032�020231� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test out-of-memory handling. (./test-fprintf-posix2${EXEEXT} 0 result=$? if test $result != 77 && test $result != 78; then result=1; fi exit $result ) 2>/dev/null malloc_result=$? if test $malloc_result = 77; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi for arg in 1 2 3 4 5 6 do ./test-fprintf-posix2${EXEEXT} $arg > /dev/null result=$? if test $result = 77; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi if test $result != 0; then exit 1 fi done if test $malloc_result = 78; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi exit 0 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-isnand-nolibm.c������������������������������������������0000664�0000000�0000000�00000001454�12166360012�017677� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnand() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "isnand-nolibm.h" #include "test-isnand.h" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/signature.h���������������������������������������������������0000664�0000000�0000000�00000003676�12166360012�016206� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Macro for checking that a function declaration is compliant. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #ifndef SIGNATURE_CHECK /* Check that the function FN takes the specified arguments ARGS with a return type of RET. This header is designed to be included after <config.h> and the one system header that is supposed to contain the function being checked, but prior to any other system headers that are necessary for the unit test. Therefore, this file does not include any system headers, nor reference anything outside of the macro arguments. For an example, if foo.h should provide: extern int foo (char, float); then the unit test named test-foo.c would start out with: #include <config.h> #include <foo.h> #include "signature.h" SIGNATURE_CHECK (foo, int, (char, float)); #include <other.h> ... */ # define SIGNATURE_CHECK(fn, ret, args) \ SIGNATURE_CHECK1 (fn, ret, args, __LINE__) /* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. Note that the checks must not occupy the same line. */ # define SIGNATURE_CHECK1(fn, ret, args, id) \ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ # define SIGNATURE_CHECK2(fn, ret, args, id) \ static ret (* _GL_UNUSED signature_check ## id) args = fn #endif /* SIGNATURE_CHECK */ ������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fflush2.sh�����������������������������������������������0000775�0000000�0000000�00000000526�11433657032�016717� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Execute the test only with seekable input stream. # The behaviour of fflush() on a non-seekable input stream is undefined. ./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $? ./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $? #cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $? exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wctype-h.c�����������������������������������������������0000664�0000000�0000000�00000003765�12166360012�016714� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <wctype.h> substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <wctype.h> #include "macros.h" /* Check that the type wint_t is defined. */ wint_t a = 'x'; /* Check that WEOF is defined. */ wint_t e = WEOF; /* Check that the type wctype_t is defined. */ wctype_t p; /* Check that the type wctrans_t is defined. */ wctrans_t q; int main (void) { /* Check that the isw* functions exist as functions or as macros. */ (void) iswalnum (0); (void) iswalpha (0); (void) iswcntrl (0); (void) iswdigit (0); (void) iswgraph (0); (void) iswlower (0); (void) iswprint (0); (void) iswpunct (0); (void) iswspace (0); (void) iswupper (0); (void) iswxdigit (0); /* Check that the isw* functions map WEOF to 0. */ ASSERT (!iswalnum (e)); ASSERT (!iswalpha (e)); ASSERT (!iswcntrl (e)); ASSERT (!iswdigit (e)); ASSERT (!iswgraph (e)); ASSERT (!iswlower (e)); ASSERT (!iswprint (e)); ASSERT (!iswpunct (e)); ASSERT (!iswspace (e)); ASSERT (!iswupper (e)); ASSERT (!iswxdigit (e)); /* Check that the tow* functions exist as functions or as macros. */ (void) towlower (0); (void) towupper (0); /* Check that the tow* functions map WEOF to WEOF. */ ASSERT (towlower (e) == e); ASSERT (towupper (e) == e); return 0; } �����������id-utils-4.6+git20120811/gnulib-tests/test-string.c�������������������������������������������������0000664�0000000�0000000�00000002007�12166360012�016446� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <string.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <string.h> #include "verify.h" /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix.output��������������������������������������0000664�0000000�0000000�00000000761�11433657032�020734� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������12345671 33 12345672 33 12345673 33 0x0p+0 33 inf 33 -inf 33 inf 33 12.750000 33 1234567.000000 33 -0.031250 33 0.000000 33 00001234.000000 33 1234 33 999.95 33 1000.00 33 12.750000 33 1234567.000000 33 -0.031250 33 0.000000 33 00001234.000000 33 1234 33 999.95 33 1000.00 33 12.750000 33 1234567.000000 33 -0.031250 33 0.000000 33 00001234.000000 33 1234 33 999.95 33 1000.00 33 12.750000 33 1234567.000000 33 -0.031250 33 0.000000 33 00001234.000000 33 1234 33 999.95 33 1000.00 33 55 33 ���������������id-utils-4.6+git20120811/gnulib-tests/test-isnanf-nolibm.c������������������������������������������0000664�0000000�0000000�00000001454�12166360012�017701� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnanf() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "isnanf-nolibm.h" #include "test-isnanf.h" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/locale.in.h���������������������������������������������������0000664�0000000�0000000�00000005756�12166360012�016052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A POSIX <locale.h>. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_LOCALE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ #ifndef _@GUARD_PREFIX@_LOCALE_H #define _@GUARD_PREFIX@_LOCALE_H /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> /* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */ #if @HAVE_XLOCALE_H@ # include <xlocale.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. On systems that don't define it, use the same value as GNU libintl. */ #if !defined LC_MESSAGES # define LC_MESSAGES 1729 #endif #if @GNULIB_SETLOCALE@ # if @REPLACE_SETLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setlocale # define setlocale rpl_setlocale # define GNULIB_defined_setlocale 1 # endif _GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); # else _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); # endif _GL_CXXALIASWARN (setlocale); #elif defined GNULIB_POSIXCHECK # undef setlocale # if HAVE_RAW_DECL_SETLOCALE _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " "use gnulib module setlocale for portability"); # endif #endif #if @GNULIB_DUPLOCALE@ # if @REPLACE_DUPLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef duplocale # define duplocale rpl_duplocale # endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); # else # if @HAVE_DUPLOCALE@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif # if @HAVE_DUPLOCALE@ _GL_CXXALIASWARN (duplocale); # endif #elif defined GNULIB_POSIXCHECK # undef duplocale # if HAVE_RAW_DECL_DUPLOCALE _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " "use gnulib module duplocale for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_LOCALE_H */ #endif /* _@GUARD_PREFIX@_LOCALE_H */ ������������������id-utils-4.6+git20120811/gnulib-tests/test-dup.c����������������������������������������������������0000664�0000000�0000000�00000002160�12166360012�015730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test duplicating a file descriptor. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (dup, int, (int)); #include <errno.h> #include "macros.h" int main (void) { /* Test behaviour for invalid file descriptors. */ { errno = 0; ASSERT (dup (-1) == -1); ASSERT (errno == EBADF); } { errno = 0; ASSERT (dup (99) == -1); ASSERT (errno == EBADF); } return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftell.sh�������������������������������������������������0000775�0000000�0000000�00000000170�11433657032�016447� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-ftell${EXEEXT} 1 < "$srcdir/test-ftell.sh" || exit 1 echo hi | ./test-ftell${EXEEXT} || exit 1 exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/wctomb-impl.h�������������������������������������������������0000664�0000000�0000000�00000002112�12166360012�016417� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert wide character to multibyte character. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ int wctomb (char *s, wchar_t wc) { if (s == NULL) return 0; else { mbstate_t state; size_t result; memset (&state, 0, sizeof (mbstate_t)); result = wcrtomb (s, wc, &state); if (result == (size_t)-1) return -1; return result; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-c-strcase.sh���������������������������������������������0000775�0000000�0000000�00000001143�11433657032�017226� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test in the C locale. ./test-c-strcasecmp${EXEEXT} || exit 1 ./test-c-strncasecmp${EXEEXT} || exit 1 # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1 LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1 fi # Test in a Turkish UTF-8 locale. : ${LOCALE_TR_UTF8=tr_TR.UTF-8} if test $LOCALE_TR_UTF8 != none; then LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1 LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1 fi exit 0 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-dup2.c���������������������������������������������������0000664�0000000�0000000�00000013214�12166360012�016014� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test duplicating file descriptors. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (dup2, int, (int, int)); #include <errno.h> #include <fcntl.h> #include "binary-io.h" #if GNULIB_TEST_CLOEXEC # include "cloexec.h" #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" #endif #include "macros.h" /* Return non-zero if FD is open. */ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; #else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); #endif } #if GNULIB_TEST_CLOEXEC /* Return non-zero if FD is open and inheritable across exec/spawn. */ static int is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) return 0; return (flags & HANDLE_FLAG_INHERIT) != 0; # else # ifndef F_GETFD # error Please port fcntl to your platform # endif int i = fcntl (fd, F_GETFD); return 0 <= i && (i & FD_CLOEXEC) == 0; # endif } #endif /* GNULIB_TEST_CLOEXEC */ #if !O_BINARY # define setmode(f,m) zero () static int zero (void) { return 0; } #endif /* Return non-zero if FD is open in the given MODE, which is either O_TEXT or O_BINARY. */ static int is_mode (int fd, int mode) { int value = setmode (fd, O_BINARY); setmode (fd, value); return mode == value; } int main (void) { const char *file = "test-dup2.tmp"; char buffer[1]; int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600); /* Assume std descriptors were provided by invoker. */ ASSERT (STDERR_FILENO < fd); ASSERT (is_open (fd)); /* Ignore any other fd's leaked into this process. */ close (fd + 1); close (fd + 2); ASSERT (!is_open (fd + 1)); ASSERT (!is_open (fd + 2)); /* Assigning to self must be a no-op. */ ASSERT (dup2 (fd, fd) == fd); ASSERT (is_open (fd)); /* The source must be valid. */ errno = 0; ASSERT (dup2 (-1, fd) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (99, fd) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (AT_FDCWD, fd) == -1); ASSERT (errno == EBADF); ASSERT (is_open (fd)); /* If the source is not open, then the destination is unaffected. */ errno = 0; ASSERT (dup2 (fd + 1, fd + 1) == -1); ASSERT (errno == EBADF); ASSERT (!is_open (fd + 1)); errno = 0; ASSERT (dup2 (fd + 1, fd) == -1); ASSERT (errno == EBADF); ASSERT (is_open (fd)); /* The destination must be valid. */ errno = 0; ASSERT (dup2 (fd, -2) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (fd, 10000000) == -1); ASSERT (errno == EBADF); /* Using dup2 can skip fds. */ ASSERT (dup2 (fd, fd + 2) == fd + 2); ASSERT (is_open (fd)); ASSERT (!is_open (fd + 1)); ASSERT (is_open (fd + 2)); /* Verify that dup2 closes the previous occupant of a fd. */ ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1); ASSERT (dup2 (fd + 1, fd) == fd); ASSERT (close (fd + 1) == 0); ASSERT (write (fd, "1", 1) == 1); ASSERT (dup2 (fd + 2, fd) == fd); ASSERT (lseek (fd, 0, SEEK_END) == 0); ASSERT (write (fd + 2, "2", 1) == 1); ASSERT (lseek (fd, 0, SEEK_SET) == 0); ASSERT (read (fd, buffer, 1) == 1); ASSERT (*buffer == '2'); #if GNULIB_TEST_CLOEXEC /* Any new fd created by dup2 must not be cloexec. */ ASSERT (close (fd + 2) == 0); ASSERT (dup_cloexec (fd) == fd + 1); ASSERT (!is_inheritable (fd + 1)); ASSERT (dup2 (fd + 1, fd + 1) == fd + 1); ASSERT (!is_inheritable (fd + 1)); ASSERT (dup2 (fd + 1, fd + 2) == fd + 2); ASSERT (!is_inheritable (fd + 1)); ASSERT (is_inheritable (fd + 2)); errno = 0; ASSERT (dup2 (fd + 1, -1) == -1); ASSERT (errno == EBADF); ASSERT (!is_inheritable (fd + 1)); #endif /* On systems that distinguish between text and binary mode, dup2 reuses the mode of the source. */ setmode (fd, O_BINARY); ASSERT (is_mode (fd, O_BINARY)); ASSERT (dup2 (fd, fd + 1) == fd + 1); ASSERT (is_mode (fd + 1, O_BINARY)); setmode (fd, O_TEXT); ASSERT (is_mode (fd, O_TEXT)); ASSERT (dup2 (fd, fd + 1) == fd + 1); ASSERT (is_mode (fd + 1, O_TEXT)); /* Clean up. */ ASSERT (close (fd + 2) == 0); ASSERT (close (fd + 1) == 0); ASSERT (close (fd) == 0); ASSERT (unlink (file) == 0); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko3.c������������������������������������������������0000664�0000000�0000000�00000002404�12166360012�016500� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fseeko() function. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <eblake@redhat.com>, 2011. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include "macros.h" int main (int argc, char **argv) { int do_initial_ftell = atoi (argv[1]); const char *filename = argv[2]; FILE *fp = fopen (filename, "r"); ASSERT (fp != NULL); if (do_initial_ftell) { off_t pos = ftell (fp); ASSERT (pos == 0); } ASSERT (fseeko (fp, 0, SEEK_END) == 0); { off_t pos = ftell (fp); ASSERT (pos > 0); } ASSERT (fclose (fp) == 0); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fpending.sh����������������������������������������������0000775�0000000�0000000�00000000225�11433657032�017134� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfile= trap 'rm -fr $tmpfile' 1 2 3 15 tmpfile=test-fpending.t ./test-fpending${EXEEXT} > $tmpfile || exit 1 rm -fr $tmpfile exit 0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-open.c���������������������������������������������������0000664�0000000�0000000�00000002147�12166360012�016106� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of opening a file descriptor. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <fcntl.h> #include "signature.h" SIGNATURE_CHECK (open, int, (char const *, int, ...)); #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <unistd.h> #include "macros.h" #define BASE "test-open.t" #include "test-open.h" int main (void) { return test_open (open, true); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stdlib.c�������������������������������������������������0000664�0000000�0000000�00000002624�12166360012�016426� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <stdlib.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdlib.h> #include "verify.h" /* Check that EXIT_SUCCESS is 0, per POSIX. */ static int exitcode = EXIT_SUCCESS; #if EXIT_SUCCESS "oops" #endif /* Check for GNU value (not guaranteed by POSIX, but is guaranteed by gnulib). */ #if EXIT_FAILURE != 1 "oops" #endif /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); #if GNULIB_TEST_SYSTEM_POSIX # include "test-sys_wait.h" #else # define test_sys_wait_macros() 0 #endif int main (void) { if (test_sys_wait_macros ()) return 1; return exitcode; } ������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-thread_self.c��������������������������������������������0000664�0000000�0000000�00000002150�12166360012�017417� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of gl_thread_self () macro. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2011. */ #include <config.h> #include "glthread/thread.h" gl_thread_t main_thread; int main () { /* Check that gl_thread_self () can be used with just $(LIBTHREAD), not $(LIBMULTITHREAD), i.e. in libraries that are multithread-safe but don't create threads themselves. */ main_thread = gl_thread_self (); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/localename.h��������������������������������������������������0000664�0000000�0000000�00000010561�12166360012�016274� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine name of the currently selected locale. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ #ifndef _GL_LOCALENAME_H #define _GL_LOCALENAME_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's name. It considers both the POSIX notion of locale name (see functions gl_locale_name_thread and gl_locale_name_posix) and the system notion of locale name (see function gl_locale_name_default). CATEGORY is a locale category abbreviation, as defined in <locale.h>, but not LC_ALL. E.g. LC_MESSAGES. CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". Return the locale category's name, canonicalized into XPG syntax language[_territory][.codeset][@modifier] The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name (int category, const char *categoryname); /* Determine the current per-thread locale's name, as specified by uselocale() calls. CATEGORY is a locale category abbreviation, as defined in <locale.h>, but not LC_ALL. E.g. LC_MESSAGES. CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". Return the locale category's name, canonicalized into XPG syntax language[_territory][.codeset][@modifier] or NULL if no locale has been specified for the current thread. The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_thread (int category, const char *categoryname); /* Determine the thread-independent current locale's name, as specified by setlocale() calls or by environment variables. CATEGORY is a locale category abbreviation, as defined in <locale.h>, but not LC_ALL. E.g. LC_MESSAGES. CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". Return the locale category's name, canonicalized into XPG syntax language[_territory][.codeset][@modifier] or NULL if no locale has been specified to setlocale() or by environment variables. The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_posix (int category, const char *categoryname); /* Determine the default locale's name, as specified by environment variables. Return the locale category's name, or NULL if no locale has been specified by environment variables. The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_environ (int category, const char *categoryname); /* Determine the default locale's name. This is the current locale's name, if not specified by uselocale() calls, by setlocale() calls, or by environment variables. This locale name is usually determined by systems settings that the user can manipulate through a GUI. Quoting POSIX:2001: "All implementations shall define a locale as the default locale, to be invoked when no environment variables are set, or set to the empty string. This default locale can be the C locale or any other implementation-defined locale. Some implementations may provide facilities for local installation administrators to set the default locale, customizing it for each location. IEEE Std 1003.1-2001 does not require such a facility." The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_default (void); #ifdef __cplusplus } #endif #endif /* _GL_LOCALENAME_H */ �����������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-setenv.c�������������������������������������������������0000664�0000000�0000000�00000003106�12166360012�016445� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of setenv. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <stdlib.h> #include "signature.h" SIGNATURE_CHECK (setenv, int, (char const *, char const *, int)); #include <errno.h> #include <string.h> #include <unistd.h> #include "macros.h" int main (void) { /* Test overwriting. */ ASSERT (setenv ("a", "==", -1) == 0); ASSERT (setenv ("a", "2", 0) == 0); ASSERT (strcmp (getenv ("a"), "==") == 0); /* Required to fail with EINVAL. */ errno = 0; ASSERT (setenv ("", "", 1) == -1); ASSERT (errno == EINVAL); errno = 0; ASSERT (setenv ("a=b", "", 0) == -1); ASSERT (errno == EINVAL); #if 0 /* glibc and gnulib's implementation guarantee this, but POSIX no longer requires it: http://austingroupbugs.net/view.php?id=185 */ errno = 0; ASSERT (setenv (NULL, "", 0) == -1); ASSERT (errno == EINVAL); #endif return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/uniwidth/�����������������������������������������������������0000775�0000000�0000000�00000000000�12210465166�015661� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/uniwidth/test-uc_width.c��������������������������������������0000664�0000000�0000000�00000003424�12166360012�020605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of uc_width() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "uniwidth.h" #include "macros.h" int main () { ucs4_t uc; /* Test width of ASCII characters. */ for (uc = 0x0020; uc < 0x007F; uc++) ASSERT (uc_width (uc, "ISO-8859-2") == 1); /* Test width of some non-spacing characters. */ ASSERT (uc_width (0x0301, "UTF-8") == 0); ASSERT (uc_width (0x05B0, "UTF-8") == 0); /* Test width of some format control characters. */ ASSERT (uc_width (0x200E, "UTF-8") == 0); ASSERT (uc_width (0x2060, "UTF-8") == 0); ASSERT (uc_width (0xE0001, "UTF-8") == 0); ASSERT (uc_width (0xE0044, "UTF-8") == 0); /* Test width of some zero width characters. */ ASSERT (uc_width (0x200B, "UTF-8") == 0); ASSERT (uc_width (0xFEFF, "UTF-8") == 0); /* Test width of some CJK characters. */ ASSERT (uc_width (0x3000, "UTF-8") == 2); ASSERT (uc_width (0xB250, "UTF-8") == 2); ASSERT (uc_width (0xFF1A, "UTF-8") == 2); ASSERT (uc_width (0x20369, "UTF-8") == 2); ASSERT (uc_width (0x2F876, "UTF-8") == 2); return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/uniwidth/test-uc_width2.sh������������������������������������0000775�0000000�0000000�00000013066�12166360012�021065� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles uc_width.out" ./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out tmpfiles="$tmpfiles uc_width.ok" cat > uc_width.ok <<\EOF 0000 0 0020..007E 1 00A0 1 00A1..00AC A 00AD 0 00AE..02FF A 0300..036F 0 0370..0482 A 0483..0489 0 048A..0590 A 0591..05BD 0 05BE A 05BF 0 05C0 A 05C1..05C2 0 05C3 A 05C4..05C5 0 05C6 A 05C7 0 05C8..05FF A 0600..0603 0 0604..060F A 0610..061A 0 061B..064A A 064B..065F 0 0660..066F A 0670 0 0671..06D5 A 06D6..06DD 0 06DE A 06DF..06E4 0 06E5..06E6 A 06E7..06E8 0 06E9 A 06EA..06ED 0 06EE..070E A 070F 0 0710 A 0711 0 0712..072F A 0730..074A 0 074B..07A5 A 07A6..07B0 0 07B1..07EA A 07EB..07F3 0 07F4..0815 A 0816..0819 0 081A A 081B..0823 0 0824 A 0825..0827 0 0828 A 0829..082D 0 082E..0858 A 0859..085B 0 085C..08FF A 0900..0902 0 0903..0939 A 093A 0 093B A 093C 0 093D..0940 A 0941..0948 0 0949..094C A 094D 0 094E..0950 A 0951..0957 0 0958..0961 A 0962..0963 0 0964..0980 A 0981 0 0982..09BB A 09BC 0 09BD..09C0 A 09C1..09C4 0 09C5..09CC A 09CD 0 09CE..09E1 A 09E2..09E3 0 09E4..0A00 A 0A01..0A02 0 0A03..0A3B A 0A3C 0 0A3D..0A40 A 0A41..0A42 0 0A43..0A46 A 0A47..0A48 0 0A49..0A4A A 0A4B..0A4D 0 0A4E..0A50 A 0A51 0 0A52..0A6F A 0A70..0A71 0 0A72..0A74 A 0A75 0 0A76..0A80 A 0A81..0A82 0 0A83..0ABB A 0ABC 0 0ABD..0AC0 A 0AC1..0AC5 0 0AC6 A 0AC7..0AC8 0 0AC9..0ACC A 0ACD 0 0ACE..0AE1 A 0AE2..0AE3 0 0AE4..0B00 A 0B01 0 0B02..0B3B A 0B3C 0 0B3D..0B3E A 0B3F 0 0B40 A 0B41..0B44 0 0B45..0B4C A 0B4D 0 0B4E..0B55 A 0B56 0 0B57..0B61 A 0B62..0B63 0 0B64..0B81 A 0B82 0 0B83..0BBF A 0BC0 0 0BC1..0BCC A 0BCD 0 0BCE..0C3D A 0C3E..0C40 0 0C41..0C45 A 0C46..0C48 0 0C49 A 0C4A..0C4D 0 0C4E..0C54 A 0C55..0C56 0 0C57..0C61 A 0C62..0C63 0 0C64..0CBB A 0CBC 0 0CBD..0CCB A 0CCC..0CCD 0 0CCE..0CE1 A 0CE2..0CE3 0 0CE4..0D40 A 0D41..0D44 0 0D45..0D4C A 0D4D 0 0D4E..0D61 A 0D62..0D63 0 0D64..0DC9 A 0DCA 0 0DCB..0DD1 A 0DD2..0DD4 0 0DD5 A 0DD6 0 0DD7..0E30 A 0E31 0 0E32..0E33 A 0E34..0E3A 0 0E3B..0E46 A 0E47..0E4E 0 0E4F..0EB0 A 0EB1 0 0EB2..0EB3 A 0EB4..0EB9 0 0EBA A 0EBB..0EBC 0 0EBD..0EC7 A 0EC8..0ECD 0 0ECE..0F17 A 0F18..0F19 0 0F1A..0F34 A 0F35 0 0F36 A 0F37 0 0F38 A 0F39 0 0F3A..0F70 A 0F71..0F7E 0 0F7F A 0F80..0F84 0 0F85 A 0F86..0F87 0 0F88..0F8C A 0F8D..0F97 0 0F98 A 0F99..0FBC 0 0FBD..0FC5 A 0FC6 0 0FC7..102C A 102D..1030 0 1031 A 1032..1037 0 1038 A 1039..103A 0 103B..103C A 103D..103E 0 103F..1057 A 1058..1059 0 105A..105D A 105E..1060 0 1061..1070 A 1071..1074 0 1075..1081 A 1082 0 1083..1084 A 1085..1086 0 1087..108C A 108D 0 108E..109C A 109D 0 109E..10FF A 1100..115F 2 1160..135C A 135D..135F 0 1360..1711 A 1712..1714 0 1715..1731 A 1732..1734 0 1735..1751 A 1752..1753 0 1754..1771 A 1772..1773 0 1774..17B3 A 17B4..17B5 0 17B6 A 17B7..17BD 0 17BE..17C5 A 17C6 0 17C7..17C8 A 17C9..17D3 0 17D4..17DC A 17DD 0 17DE..180A A 180B..180D 0 180E..18A8 A 18A9 0 18AA..191F A 1920..1922 0 1923..1926 A 1927..1928 0 1929..1931 A 1932 0 1933..1938 A 1939..193B 0 193C..1A16 A 1A17..1A18 0 1A19..1A55 A 1A56 0 1A57 A 1A58..1A5E 0 1A5F A 1A60 0 1A61 A 1A62 0 1A63..1A64 A 1A65..1A6C 0 1A6D..1A72 A 1A73..1A7C 0 1A7D..1A7E A 1A7F 0 1A80..1AFF A 1B00..1B03 0 1B04..1B33 A 1B34 0 1B35 A 1B36..1B3A 0 1B3B A 1B3C 0 1B3D..1B41 A 1B42 0 1B43..1B6A A 1B6B..1B73 0 1B74..1B7F A 1B80..1B81 0 1B82..1BA1 A 1BA2..1BA5 0 1BA6..1BA7 A 1BA8..1BA9 0 1BAA..1BE5 A 1BE6 0 1BE7 A 1BE8..1BE9 0 1BEA..1BEC A 1BED 0 1BEE A 1BEF..1BF1 0 1BF2..1C2B A 1C2C..1C33 0 1C34..1C35 A 1C36..1C37 0 1C38..1CCF A 1CD0..1CD2 0 1CD3 A 1CD4..1CE0 0 1CE1 A 1CE2..1CE8 0 1CE9..1CEC A 1CED 0 1CEE..1DBF A 1DC0..1DE6 0 1DE7..1DFB A 1DFC..1DFF 0 1E00..200A A 200B..200F 0 2010..2029 A 202A..202E 0 202F..205F A 2060..2064 0 2065..2069 A 206A..206F 0 2070..20A8 A 20A9 1 20AA..20CF A 20D0..20F0 0 20F1..2328 A 2329..232A 2 232B..2CEE A 2CEF..2CF1 0 2CF2..2D7E A 2D7F 0 2D80..2DDF A 2DE0..2DFF 0 2E00..2E7F A 2E80..3029 2 302A..302F 0 3030..303E 2 303F A 3040..3098 2 3099..309A 0 309B..4DBF 2 4DC0..4DFF A 4E00..A4CF 2 A4D0..A66E A A66F..A672 0 A673..A67B A A67C..A67D 0 A67E..A6EF A A6F0..A6F1 0 A6F2..A801 A A802 0 A803..A805 A A806 0 A807..A80A A A80B 0 A80C..A824 A A825..A826 0 A827..A8C3 A A8C4 0 A8C5..A8DF A A8E0..A8F1 0 A8F2..A925 A A926..A92D 0 A92E..A946 A A947..A951 0 A952..A97F A A980..A982 0 A983..A9B2 A A9B3 0 A9B4..A9B5 A A9B6..A9B9 0 A9BA..A9BB A A9BC 0 A9BD..AA28 A AA29..AA2E 0 AA2F..AA30 A AA31..AA32 0 AA33..AA34 A AA35..AA36 0 AA37..AA42 A AA43 0 AA44..AA4B A AA4C 0 AA4D..AAAF A AAB0 0 AAB1 A AAB2..AAB4 0 AAB5..AAB6 A AAB7..AAB8 0 AAB9..AABD A AABE..AABF 0 AAC0 A AAC1 0 AAC2..ABE4 A ABE5 0 ABE6..ABE7 A ABE8 0 ABE9..ABEC A ABED 0 ABEE..ABFF A AC00..D7A3 2 D7A4..F8FF A F900..FAFF 2 FB00..FB1D A FB1E 0 FB1F..FDFF A FE00..FE0F 0 FE10..FE1F 2 FE20..FE26 0 FE27..FE2F A FE30..FE6F 2 FE70..FEFE A FEFF 0 FF00..FF60 2 FF61..FFDF 1 FFE0..FFE6 2 FFE7..FFF8 1 FFF9..FFFB 0 FFFC..101FC 1 101FD 0 101FE..10A00 1 10A01..10A03 0 10A04 1 10A05..10A06 0 10A07..10A0B 1 10A0C..10A0F 0 10A10..10A37 1 10A38..10A3A 0 10A3B..10A3E 1 10A3F 0 10A40..11000 1 11001 0 11002..11037 1 11038..11046 0 11047..1107F 1 11080..11081 0 11082..110B2 1 110B3..110B6 0 110B7..110B8 1 110B9..110BA 0 110BB..110BC 1 110BD 0 110BE..1D166 1 1D167..1D169 0 1D16A..1D172 1 1D173..1D182 0 1D183..1D184 1 1D185..1D18B 0 1D18C..1D1A9 1 1D1AA..1D1AD 0 1D1AE..1D241 1 1D242..1D244 0 1D245..1FFFF 1 20000..3FFFF 2 40000..E0000 1 E0001 0 E0002..E001F 1 E0020..E007F 0 E0080..E00FF 1 E0100..E01EF 0 E01F0..10FFFF 1 EOF : ${DIFF=diff} ${DIFF} uc_width.ok uc_width.out result=$? rm -fr $tmpfiles exit $result ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/uniwidth/test-uc_width2.c�������������������������������������0000664�0000000�0000000�00000004217�12166360012�020670� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of uc_width() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include "uniwidth.h" #include <stdio.h> #include "macros.h" /* One of 0, '0', '1', 'A', '2'. */ static char current_width; /* The interval for which the current_width holds. */ static ucs4_t current_start; static ucs4_t current_end; static void finish_interval (void) { if (current_width != 0) { if (current_start == current_end) printf ("%04X\t\t%c\n", (unsigned) current_start, current_width); else printf ("%04X..%04X\t%c\n", (unsigned) current_start, (unsigned) current_end, current_width); current_width = 0; } } static void add_to_interval (ucs4_t uc, char width) { if (current_width == width && uc == current_end + 1) current_end = uc; else { finish_interval (); current_width = width; current_start = current_end = uc; } } int main () { ucs4_t uc; for (uc = 0; uc < 0x110000; uc++) { int w1 = uc_width (uc, "UTF-8"); int w2 = uc_width (uc, "GBK"); char width = (w1 == 0 && w2 == 0 ? '0' : w1 == 1 && w2 == 1 ? '1' : w1 == 1 && w2 == 2 ? 'A' : w1 == 2 && w2 == 2 ? '2' : 0); if (width == 0) { /* uc must be a control character. */ ASSERT (w1 < 0 && w2 < 0); } else add_to_interval (uc, width); } finish_interval (); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-lseek.sh�������������������������������������������������0000775�0000000�0000000�00000000607�11433657032�016451� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles= trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles=t-lseek.tmp # seekable files ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1 # pipes echo hi | { ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat test "`cat t-lseek.tmp`" = "0" || exit 1 # closed descriptors ./test-lseek${EXEEXT} 2 <&- >&- || exit 1 rm -rf $tmpfiles exit 0 �������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-nl_langinfo.sh�������������������������������������������0000775�0000000�0000000�00000000665�11433657032�017640� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1 # Test whether a specific traditional locale is installed. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1 fi # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 != none; then LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1 fi exit 0 ���������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko.sh������������������������������������������������0000775�0000000�0000000�00000000173�11433657032�016620� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1 echo hi | ./test-fseeko${EXEEXT} || exit 1 exit 0 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/fd-safer-flag.c�����������������������������������������������0000664�0000000�0000000�00000003351�12166360012�016564� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Adjust a file descriptor result so that it avoids clobbering STD{IN,OUT,ERR}_FILENO, with specific flags. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert and Eric Blake. */ #include <config.h> /* Specification. */ #include "unistd-safer.h" #include <errno.h> #include <unistd.h> /* Return FD, unless FD would be a copy of standard input, output, or error; in that case, return a duplicate of FD, closing FD. If FLAG contains O_CLOEXEC, the returned FD will have close-on-exec semantics. On failure to duplicate, close FD, set errno, and return -1. Preserve errno if FD is negative, so that the caller can always inspect errno when the returned value is negative. This function is usefully wrapped around functions that return file descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */ int fd_safer_flag (int fd, int flag) { if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) { int f = dup_safer_flag (fd, flag); int e = errno; close (fd); errno = e; fd = f; } return fd; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-strings.c������������������������������������������������0000664�0000000�0000000�00000001553�12166360012�016636� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <strings.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <strings.h> int main () { return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix3.sh����������������������������������������0000775�0000000�0000000�00000001145�12166360012�020230� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test against a memory leak. (./test-fprintf-posix3${EXEEXT} 0 result=$? if test $result != 77 && test $result != 78; then result=1; fi exit $result ) 2>/dev/null malloc_result=$? if test $malloc_result = 77; then echo "Skipping test: no way to determine address space size" exit 77 fi ./test-fprintf-posix3${EXEEXT} 1 > /dev/null result=$? if test $result = 77; then echo "Skipping test: no way to determine address space size" exit 77 fi if test $result != 0; then exit 1 fi if test $malloc_result = 78; then echo "Skipping test: get_rusage_as() doesn't work" exit 77 fi exit 0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko4.c������������������������������������������������0000664�0000000�0000000�00000003542�12166360012�016505� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fseeko() function. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include "macros.h" int main (int argc, char **argv) { const char *filename = argv[1]; /* Test that fseeko() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "r"); ASSERT (fp != NULL); setvbuf (fp, NULL, _IONBF, 0); ASSERT (ftell (fp) == 0); ASSERT (fseeko (fp, 0, SEEK_END) == 0); ASSERT (ftell (fp) > 0); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fseeko (fp, 0, SEEK_SET) == -1); ASSERT (errno == EBADF); fclose (fp); } /* Test that fseeko() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w"); if (fp != NULL) { errno = 0; ASSERT (fseeko (fp, 0, SEEK_END) == -1); ASSERT (errno == EBADF); fclose (fp); } } { FILE *fp = fdopen (99, "w"); if (fp != NULL) { errno = 0; ASSERT (fseeko (fp, 0, SEEK_END) == -1); ASSERT (errno == EBADF); fclose (fp); } } return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-c-strncasecmp.c������������������������������������������0000664�0000000�0000000�00000005732�12166360012�017712� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of case-insensitive string comparison function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "c-strcase.h" #include <locale.h> #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { if (argc > 1) { /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; } ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0); ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0); ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0); ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0); ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0); ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0); /* The following tests shows how c_strncasecmp() is different from strncasecmp(). */ ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0); ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0); /* The following tests shows how c_strncasecmp() is different from mbsncasecmp(). */ ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */ /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0); ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0); return 0; } ��������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-close.c��������������������������������������������������0000664�0000000�0000000�00000002161�12166360012�016246� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test closing a file or socket. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (close, int, (int)); #include <errno.h> #include "macros.h" int main (void) { /* Test behaviour for invalid file descriptors. */ { errno = 0; ASSERT (close (-1) == -1); ASSERT (errno == EBADF); } { errno = 0; ASSERT (close (99) == -1); ASSERT (errno == EBADF); } return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32-3.sh�����������������������������������������0000775�0000000�0000000�00000000121�12166360012�017554� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP932 locale. ./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32-1.sh�����������������������������������������0000775�0000000�0000000�00000000122�12166360012�017553� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP1252 locale. ./test-mbrtowc-w32${EXEEXT} French_France 1252 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb.c������������������������������������������������0000664�0000000�0000000�00000011016�12166360012�016615� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of wide character to multibyte character. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *)); #include <locale.h> #include <stdlib.h> #include <string.h> #include "macros.h" /* Check the multibyte character s[0..n-1]. */ static void check_character (const char *s, size_t n) { wchar_t wc; char buf[64]; int iret; size_t ret; wc = (wchar_t) 0xBADFACE; iret = mbtowc (&wc, s, n); ASSERT (iret == n); ret = wcrtomb (buf, wc, NULL); ASSERT (ret == n); ASSERT (memcmp (buf, s, n) == 0); /* Test special calling convention, passing a NULL pointer. */ ret = wcrtomb (NULL, wc, NULL); ASSERT (ret == 1); } int main (int argc, char *argv[]) { char buf[64]; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Test NUL character. */ { buf[0] = 'x'; ret = wcrtomb (buf, 0, NULL); ASSERT (ret == 1); ASSERT (buf[0] == '\0'); } /* Test single bytes. */ { int c; for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ ret = wcrtomb (buf, btowc (c), NULL); ASSERT (ret == 1); ASSERT (buf[0] == (char) c); break; } } /* Test special calling convention, passing a NULL pointer. */ { ret = wcrtomb (NULL, '\0', NULL); ASSERT (ret == 1); ret = wcrtomb (NULL, btowc ('x'), NULL); ASSERT (ret == 1); } if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { const char input[] = "B\374\337er"; /* "Büßer" */ check_character (input + 1, 1); check_character (input + 2, 1); } return 0; case '2': /* Locale encoding is UTF-8. */ { const char input[] = "B\303\274\303\237er"; /* "Büßer" */ check_character (input + 1, 2); check_character (input + 3, 2); } return 0; case '3': /* Locale encoding is EUC-JP. */ { const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ check_character (input + 1, 2); check_character (input + 3, 2); check_character (input + 5, 2); } return 0; case '4': /* Locale encoding is GB18030. */ { const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ check_character (input + 1, 2); check_character (input + 3, 4); } return 0; } return 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello4.c������������������������������������������������0000664�0000000�0000000�00000003351�12166360012�016514� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of ftello() function. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include "macros.h" int main (int argc, char **argv) { const char *filename = argv[1]; /* Test that ftello() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "r"); ASSERT (fp != NULL); setvbuf (fp, NULL, _IONBF, 0); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (ftello (fp) == (off_t)-1); ASSERT (errno == EBADF); fclose (fp); } /* Test that ftello() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w"); if (fp != NULL) { errno = 0; ASSERT (ftello (fp) == (off_t)-1); ASSERT (errno == EBADF); fclose (fp); } } { FILE *fp = fdopen (99, "w"); if (fp != NULL) { errno = 0; ASSERT (ftello (fp) == (off_t)-1); ASSERT (errno == EBADF); fclose (fp); } } return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseek.c��������������������������������������������������0000664�0000000�0000000�00000004354�12166360012�016244� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fseek() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if the user requested GNULIB_POSIXCHECK. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fseek, int, (FILE *, long, int)); #include "macros.h" #ifndef FUNC_UNGETC_BROKEN # define FUNC_UNGETC_BROKEN 0 #endif int main (int argc, char **argv) { /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' iff argc > 1. */ int expected = argc > 1 ? 0 : -1; ASSERT (fseek (stdin, 0, SEEK_CUR) == expected); if (argc > 1) { /* Test that fseek discards previously read ungetc data. */ int ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ungetc (ch, stdin) == ch); ASSERT (fseek (stdin, 2, SEEK_SET) == 0); ch = fgetc (stdin); ASSERT (ch == '/'); if (2 < argc) { if (FUNC_UNGETC_BROKEN) { fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", stderr); return 77; } /* Test that fseek discards random ungetc data. */ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff)); } ASSERT (fseek (stdin, 0, SEEK_END) == 0); ASSERT (fgetc (stdin) == EOF); /* Test that fseek resets end-of-file marker. */ ASSERT (feof (stdin)); ASSERT (fseek (stdin, 0, SEEK_END) == 0); ASSERT (!feof (stdin)); } return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stat.c���������������������������������������������������0000664�0000000�0000000�00000003107�12166360012�016115� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of stat. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <sys/stat.h> /* Caution: stat may be a function-like macro. Although this signature check must pass, it may be the signature of the real (and broken) stat rather than rpl_stat. Most code should not use the address of stat. */ #include "signature.h" SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <unistd.h> #include "same-inode.h" #include "macros.h" #define BASE "test-stat.t" #include "test-stat.h" /* Wrapper around stat, which works even if stat is a function-like macro, where test_stat_func(stat) would do the wrong thing. */ static int do_stat (char const *name, struct stat *st) { return stat (name, st); } int main (void) { return test_stat_func (do_stat, true); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/wctob.c�������������������������������������������������������0000664�0000000�0000000�00000002264�12166360012�015306� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convert wide character to unibyte character. Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <wchar.h> #include <stdio.h> #include <stdlib.h> int wctob (wint_t wc) { char buf[64]; if (!(MB_CUR_MAX <= sizeof (buf))) abort (); /* Handle the case where WEOF is a value that does not fit in a wchar_t. */ if (wc == (wchar_t)wc) if (wctomb (buf, (wchar_t)wc) == 1) return (unsigned char) buf[0]; return EOF; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-errno.c��������������������������������������������������0000664�0000000�0000000�00000005471�12166360012�016275� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <errno.h> substitute. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <errno.h> /* Verify that the POSIX mandated errno values exist and can be used as initializers outside of a function. The variable names happen to match the Linux/x86 error numbers. */ int e1 = EPERM; int e2 = ENOENT; int e3 = ESRCH; int e4 = EINTR; int e5 = EIO; int e6 = ENXIO; int e7 = E2BIG; int e8 = ENOEXEC; int e9 = EBADF; int e10 = ECHILD; int e11 = EAGAIN; int e11a = EWOULDBLOCK; int e12 = ENOMEM; int e13 = EACCES; int e14 = EFAULT; int e16 = EBUSY; int e17 = EEXIST; int e18 = EXDEV; int e19 = ENODEV; int e20 = ENOTDIR; int e21 = EISDIR; int e22 = EINVAL; int e23 = ENFILE; int e24 = EMFILE; int e25 = ENOTTY; int e26 = ETXTBSY; int e27 = EFBIG; int e28 = ENOSPC; int e29 = ESPIPE; int e30 = EROFS; int e31 = EMLINK; int e32 = EPIPE; int e33 = EDOM; int e34 = ERANGE; int e35 = EDEADLK; int e36 = ENAMETOOLONG; int e37 = ENOLCK; int e38 = ENOSYS; int e39 = ENOTEMPTY; int e40 = ELOOP; int e42 = ENOMSG; int e43 = EIDRM; int e67 = ENOLINK; int e71 = EPROTO; int e72 = EMULTIHOP; int e74 = EBADMSG; int e75 = EOVERFLOW; int e84 = EILSEQ; int e88 = ENOTSOCK; int e89 = EDESTADDRREQ; int e90 = EMSGSIZE; int e91 = EPROTOTYPE; int e92 = ENOPROTOOPT; int e93 = EPROTONOSUPPORT; int e95 = EOPNOTSUPP; int e95a = ENOTSUP; int e97 = EAFNOSUPPORT; int e98 = EADDRINUSE; int e99 = EADDRNOTAVAIL; int e100 = ENETDOWN; int e101 = ENETUNREACH; int e102 = ENETRESET; int e103 = ECONNABORTED; int e104 = ECONNRESET; int e105 = ENOBUFS; int e106 = EISCONN; int e107 = ENOTCONN; int e110 = ETIMEDOUT; int e111 = ECONNREFUSED; int e113 = EHOSTUNREACH; int e114 = EALREADY; int e115 = EINPROGRESS; int e116 = ESTALE; int e122 = EDQUOT; int e125 = ECANCELED; /* Don't verify that these errno values are all different, except for possibly EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has ENOTSUP == EOPNOTSUPP. */ int main () { /* Verify that errno can be assigned. */ errno = EOVERFLOW; /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */ if (errno == EINVAL) return 1; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-alloca-opt.c���������������������������������������������0000664�0000000�0000000�00000002761�12166360012�017202� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of optional automatic memory allocation. Copyright (C) 2005, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <alloca.h> #if HAVE_ALLOCA static void do_allocation (int n) { void *ptr = alloca (n); (void) ptr; } void (*func) (int) = do_allocation; #endif int main () { #if HAVE_ALLOCA int i; /* Repeat a lot of times, to make sure there's no memory leak. */ for (i = 0; i < 100000; i++) { /* Try various values. n = 0 gave a crash on Alpha with gcc-2.5.8. Some versions of MacOS X have a stack size limit of 512 KB. */ func (34); func (134); func (399); func (510823); func (129321); func (0); func (4070); func (4095); func (1); func (16582); } #endif return 0; } ���������������id-utils-4.6+git20120811/gnulib-tests/test-mbscasecmp.sh��������������������������������������������0000775�0000000�0000000�00000000575�11433657032�017467� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific Turkish locale is installed. : ${LOCALE_TR_UTF8=tr_TR.UTF-8} if test $LOCALE_TR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no turkish Unicode locale is installed" else echo "Skipping test: no turkish Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_TR_UTF8 \ ./test-mbscasecmp${EXEEXT} �����������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc2.sh����������������������������������������������0000775�0000000�0000000�00000000570�11433657032�017104� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-mbrtowc${EXEEXT} 2 ����������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-localename.c���������������������������������������������0000664�0000000�0000000�00000053164�12166360012�017252� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of gl_locale_name function and its variants. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "localename.h" #include <locale.h> #include <stdlib.h> #include <string.h> #include "macros.h" #if HAVE_NEWLOCALE static struct { int cat; int mask; const char *string; } const categories[] = { { LC_CTYPE, LC_CTYPE_MASK, "LC_CTYPE" }, { LC_NUMERIC, LC_NUMERIC_MASK, "LC_NUMERIC" }, { LC_TIME, LC_TIME_MASK, "LC_TIME" }, { LC_COLLATE, LC_COLLATE_MASK, "LC_COLLATE" }, { LC_MONETARY, LC_MONETARY_MASK, "LC_MONETARY" }, { LC_MESSAGES, LC_MESSAGES_MASK, "LC_MESSAGES" } # ifdef LC_PAPER , { LC_PAPER, LC_PAPER_MASK, "LC_PAPER" } # endif # ifdef LC_NAME , { LC_NAME, LC_NAME_MASK, "LC_NAME" } # endif # ifdef LC_ADDRESS , { LC_ADDRESS, LC_ADDRESS_MASK, "LC_ADDRESS" } # endif # ifdef LC_TELEPHONE , { LC_TELEPHONE, LC_TELEPHONE_MASK, "LC_TELEPHONE" } # endif # ifdef LC_MEASUREMENT , { LC_MEASUREMENT, LC_MEASUREMENT_MASK, "LC_MEASUREMENT" } # endif # ifdef LC_IDENTIFICATION , { LC_IDENTIFICATION, LC_IDENTIFICATION_MASK, "LC_IDENTIFICATION" } # endif }; #endif /* Test the gl_locale_name() function. */ static void test_locale_name (void) { const char *name; /* Check that gl_locale_name returns non-NULL. */ ASSERT (gl_locale_name (LC_MESSAGES, "LC_MESSAGES") != NULL); /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); #if HAVE_NEWLOCALE uselocale (LC_GLOBAL_LOCALE); #endif /* Check that when all environment variables are unset, gl_locale_name returns the default locale. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LC_NUMERIC"); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"), gl_locale_name_default ()) == 0); /* Check that an empty environment variable is treated like an unset environment variable. */ setenv ("LC_ALL", "", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "", 1); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "", 1); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "", 1); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), gl_locale_name_default ()) == 0); /* Check that LC_ALL overrides the others, and LANG is overridden by the others. */ setenv ("LC_ALL", "C", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "C", 1); setenv ("LC_MESSAGES", "C", 1); unsetenv ("LANG"); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "C", 1); setlocale (LC_ALL, ""); ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); /* Check mixed situations. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); setenv ("LANG", "de_DE.UTF-8", 1); if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, "de_DE.UTF-8") == 0); name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); unsetenv ("LANG"); if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, gl_locale_name_default ()) == 0); name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } #if HAVE_NEWLOCALE /* Check that gl_locale_name considers the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { uselocale (locale); name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } } /* Check that gl_locale_name distinguishes different categories of the thread locale, and that the name is the right one for each. */ { unsigned int i; for (i = 0; i < SIZEOF (categories); i++) { int category_mask = categories[i].mask; locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { locale = newlocale (category_mask, "de_DE.UTF-8", locale); if (locale != NULL) { unsigned int j; uselocale (locale); for (j = 0; j < SIZEOF (categories); j++) { const char *name_j = gl_locale_name (categories[j].cat, categories[j].string); if (j == i) ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0); else ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); } } } } } #endif } /* Test the gl_locale_name_thread() function. */ static void test_locale_name_thread (void) { /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); #if HAVE_NEWLOCALE /* Check that gl_locale_name_thread returns NULL when no thread locale is set. */ uselocale (LC_GLOBAL_LOCALE); ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL); ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL); /* Check that gl_locale_name_thread considers the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { const char *name; uselocale (locale); name = gl_locale_name_thread (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } } /* Check that gl_locale_name_thread distinguishes different categories of the thread locale, and that the name is the right one for each. */ { unsigned int i; for (i = 0; i < SIZEOF (categories); i++) { int category_mask = categories[i].mask; locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { locale = newlocale (category_mask, "de_DE.UTF-8", locale); if (locale != NULL) { unsigned int j; uselocale (locale); for (j = 0; j < SIZEOF (categories); j++) { const char *name_j = gl_locale_name_thread (categories[j].cat, categories[j].string); if (j == i) ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0); else ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); } } } } } /* Check that gl_locale_name_thread returns a string that is allocated with indefinite extent. */ { /* Try many locale names in turn, in order to defeat possible caches. */ static const char * const choices[] = { "C", "POSIX", "af_ZA", "af_ZA.UTF-8", "am_ET", "am_ET.UTF-8", "be_BY", "be_BY.UTF-8", "bg_BG", "bg_BG.UTF-8", "ca_ES", "ca_ES.UTF-8", "cs_CZ", "cs_CZ.UTF-8", "da_DK", "da_DK.UTF-8", "de_AT", "de_AT.UTF-8", "de_CH", "de_CH.UTF-8", "de_DE", "de_DE.UTF-8", "el_GR", "el_GR.UTF-8", "en_AU", "en_AU.UTF-8", "en_CA", "en_CA.UTF-8", "en_GB", "en_GB.UTF-8", "en_IE", "en_IE.UTF-8", "en_NZ", "en_NZ.UTF-8", "en_US", "en_US.UTF-8", "es_ES", "es_ES.UTF-8", "et_EE", "et_EE.UTF-8", "eu_ES", "eu_ES.UTF-8", "fi_FI", "fi_FI.UTF-8", "fr_BE", "fr_BE.UTF-8", "fr_CA", "fr_CA.UTF-8", "fr_CH", "fr_CH.UTF-8", "fr_FR", "fr_FR.UTF-8", "he_IL", "he_IL.UTF-8", "hr_HR", "hr_HR.UTF-8", "hu_HU", "hu_HU.UTF-8", "hy_AM", "is_IS", "is_IS.UTF-8", "it_CH", "it_CH.UTF-8", "it_IT", "it_IT.UTF-8", "ja_JP.UTF-8", "kk_KZ", "kk_KZ.UTF-8", "ko_KR.UTF-8", "lt_LT", "lt_LT.UTF-8", "nl_BE", "nl_BE.UTF-8", "nl_NL", "nl_NL.UTF-8", "no_NO", "no_NO.UTF-8", "pl_PL", "pl_PL.UTF-8", "pt_BR", "pt_BR.UTF-8", "pt_PT", "pt_PT.UTF-8", "ro_RO", "ro_RO.UTF-8", "ru_RU", "ru_RU.UTF-8", "sk_SK", "sk_SK.UTF-8", "sl_SI", "sl_SI.UTF-8", "sv_SE", "sv_SE.UTF-8", "tr_TR", "tr_TR.UTF-8", "uk_UA", "uk_UA.UTF-8", "zh_CN", "zh_CN.UTF-8", "zh_HK", "zh_HK.UTF-8", "zh_TW", "zh_TW.UTF-8" }; /* Remember which locales are available. */ unsigned char /* bool */ available[SIZEOF (choices)]; /* Array of remembered results of gl_locale_name_thread. */ const char *unsaved_names[SIZEOF (choices)][SIZEOF (categories)]; /* Array of remembered results of gl_locale_name_thread, stored in safe memory. */ char *saved_names[SIZEOF (choices)][SIZEOF (categories)]; unsigned int j; for (j = 0; j < SIZEOF (choices); j++) { locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL); available[j] = (locale != NULL); if (locale != NULL) { unsigned int i; uselocale (locale); for (i = 0; i < SIZEOF (categories); i++) { unsaved_names[j][i] = gl_locale_name_thread (categories[i].cat, categories[i].string); saved_names[j][i] = strdup (unsaved_names[j][i]); } uselocale (LC_GLOBAL_LOCALE); freelocale (locale); } } /* Verify the unsaved_names are still valid. */ for (j = 0; j < SIZEOF (choices); j++) if (available[j]) { unsigned int i; for (i = 0; i < SIZEOF (categories); i++) ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); } /* Allocate many locales, without freeing them. This is an attempt at overwriting as much of the previously allocated memory as possible. */ for (j = SIZEOF (choices); j > 0; ) { j--; if (available[j]) { locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL); unsigned int i; ASSERT (locale != NULL); uselocale (locale); for (i = 0; i < SIZEOF (categories); i++) { const char *name = gl_locale_name_thread (categories[i].cat, categories[i].string); ASSERT (strcmp (unsaved_names[j][i], name) == 0); } uselocale (LC_GLOBAL_LOCALE); } } /* Verify the unsaved_names are still valid. */ for (j = 0; j < SIZEOF (choices); j++) if (available[j]) { unsigned int i; for (i = 0; i < SIZEOF (categories); i++) ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); } } #else /* Check that gl_locale_name_thread always returns NULL. */ ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL); ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL); #endif } /* Test the gl_locale_name_posix() function. */ static void test_locale_name_posix (void) { const char *name; /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); #if HAVE_NEWLOCALE uselocale (LC_GLOBAL_LOCALE); #endif /* Check that when all environment variables are unset, gl_locale_name_posix returns either NULL or the default locale. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LC_NUMERIC"); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); /* Check that an empty environment variable is treated like an unset environment variable. */ setenv ("LC_ALL", "", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "", 1); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "", 1); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "", 1); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); /* Check that LC_ALL overrides the others, and LANG is overridden by the others. */ setenv ("LC_ALL", "C", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "C", 1); setenv ("LC_MESSAGES", "C", 1); unsetenv ("LANG"); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "C", 1); setlocale (LC_ALL, ""); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); /* Check mixed situations. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); setenv ("LANG", "de_DE.UTF-8", 1); if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, "de_DE.UTF-8") == 0); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); unsetenv ("LANG"); if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); } #if HAVE_NEWLOCALE /* Check that gl_locale_name_posix ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "C", 1); setlocale (LC_ALL, ""); uselocale (locale); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); } } #endif } /* Test the gl_locale_name_environ() function. */ static void test_locale_name_environ (void) { const char *name; /* Get into a defined state, */ setlocale (LC_ALL, "en_US.UTF-8"); #if HAVE_NEWLOCALE uselocale (LC_GLOBAL_LOCALE); #endif /* Check that when all environment variables are unset, gl_locale_name_environ returns NULL. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LC_NUMERIC"); unsetenv ("LANG"); ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); ASSERT (gl_locale_name_environ (LC_NUMERIC, "LC_NUMERIC") == NULL); /* Check that an empty environment variable is treated like an unset environment variable. */ setenv ("LC_ALL", "", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "", 1); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "", 1); unsetenv ("LANG"); ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "", 1); ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); /* Check that LC_ALL overrides the others, and LANG is overridden by the others. */ setenv ("LC_ALL", "C", 1); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); unsetenv ("LANG"); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); unsetenv ("LC_ALL"); setenv ("LC_CTYPE", "C", 1); setenv ("LC_MESSAGES", "C", 1); unsetenv ("LANG"); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "C", 1); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); /* Check mixed situations. */ unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); setenv ("LANG", "de_DE.UTF-8", 1); name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE"); ASSERT (strcmp (name, "de_DE.UTF-8") == 0); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); unsetenv ("LANG"); name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE"); ASSERT (name == NULL); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); #if HAVE_NEWLOCALE /* Check that gl_locale_name_environ ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { unsetenv ("LC_ALL"); unsetenv ("LC_CTYPE"); unsetenv ("LC_MESSAGES"); setenv ("LANG", "C", 1); setlocale (LC_ALL, ""); uselocale (locale); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); } } #endif } /* Test the gl_locale_name_default() function. */ static void test_locale_name_default (void) { const char *name = gl_locale_name_default (); ASSERT (name != NULL); /* Only MacOS X and Windows have a facility for the user to set the default locale. */ #if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)) ASSERT (strcmp (name, "C") == 0); #endif #if HAVE_NEWLOCALE /* Check that gl_locale_name_default ignores the thread locale. */ { locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); if (locale != NULL) { uselocale (locale); ASSERT (strcmp (gl_locale_name_default (), name) == 0); } } #endif } int main () { test_locale_name (); test_locale_name_thread (); test_locale_name_posix (); test_locale_name_environ (); test_locale_name_default (); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/vma-iter.h����������������������������������������������������0000664�0000000�0000000�00000005157�12166360012�015725� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Iteration over virtual memory areas. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #ifndef _VMA_ITER_H #define _VMA_ITER_H #include <stdint.h> #ifdef __cplusplus extern "C" { #endif /* Bit mask for the FLAGS parameter of a vma_iterate callback function. */ #define VMA_PROT_READ (1<<0) #define VMA_PROT_WRITE (1<<1) #define VMA_PROT_EXECUTE (1<<2) typedef int (*vma_iterate_callback_fn) (void *data, uintptr_t start, uintptr_t end, unsigned int flags); /* Iterate over the virtual memory areas of the current process. If such iteration is supported, the callback is called once for every virtual memory area, in ascending order, with the following arguments: - DATA is the same argument as passed to vma_iterate. - START is the address of the first byte in the area, page-aligned. - END is the address of the last byte in the area plus 1, page-aligned. Note that it may be 0 for the last area in the address space. - FLAGS is a combination of the VMA_* bits. If the callback returns 0, the iteration continues. If it returns 1, the iteration terminates prematurely. This function may open file descriptors, but does not call malloc(). */ extern void vma_iterate (vma_iterate_callback_fn callback, void *data); /* The macro VMA_ITERATE_SUPPORTED indicates that vma_iterate is supported on this platform. Note that even when this macro is defined, vma_iterate() may still fail to find any virtual memory area, for example if /proc is not mounted. */ #if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ || defined __sgi || defined __osf__ || (defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ || defined __BEOS__ || defined __HAIKU__ || HAVE_MQUERY # define VMA_ITERATE_SUPPORTED 1 #endif #ifdef __cplusplus } #endif #endif /* _VMA_ITER_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix.c������������������������������������������0000664�0000000�0000000�00000002175�12166360012�017756� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible fprintf() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fprintf, int, (FILE *, char const *, ...)); #include <stdarg.h> #include <stddef.h> #include <stdint.h> #include <string.h> #include "macros.h" #include "test-fprintf-posix.h" int main (int argc, char *argv[]) { test_function (fprintf); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32-4.sh�����������������������������������������0000775�0000000�0000000�00000000121�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP950 locale. ./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/localename.c��������������������������������������������������0000664�0000000�0000000�00000250736�12166360012�016301� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine name of the currently selected locale. Copyright (C) 1995-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 <http://www.gnu.org/licenses/>. */ /* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */ /* Native Windows code written by Tor Lillqvist <tml@iki.fi>. */ /* MacOS X code written by Bruno Haible <bruno@clisp.org>. */ #include <config.h> /* Specification. */ #ifdef IN_LIBINTL # include "gettextP.h" #else # include "localename.h" #endif #include <limits.h> #include <stddef.h> #include <stdlib.h> #include <locale.h> #include <string.h> #if HAVE_USELOCALE /* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */ # if defined __APPLE__ && defined __MACH__ # include <xlocale.h> # endif # include <langinfo.h> # if !defined IN_LIBINTL # include "glthread/lock.h" # endif #endif #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE # include <CoreFoundation/CFString.h> # if HAVE_CFLOCALECOPYCURRENT # include <CoreFoundation/CFLocale.h> # elif HAVE_CFPREFERENCESCOPYAPPVALUE # include <CoreFoundation/CFPreferences.h> # endif #endif #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE #endif #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* List of language codes, sorted by value: 0x01 LANG_ARABIC 0x02 LANG_BULGARIAN 0x03 LANG_CATALAN 0x04 LANG_CHINESE 0x05 LANG_CZECH 0x06 LANG_DANISH 0x07 LANG_GERMAN 0x08 LANG_GREEK 0x09 LANG_ENGLISH 0x0a LANG_SPANISH 0x0b LANG_FINNISH 0x0c LANG_FRENCH 0x0d LANG_HEBREW 0x0e LANG_HUNGARIAN 0x0f LANG_ICELANDIC 0x10 LANG_ITALIAN 0x11 LANG_JAPANESE 0x12 LANG_KOREAN 0x13 LANG_DUTCH 0x14 LANG_NORWEGIAN 0x15 LANG_POLISH 0x16 LANG_PORTUGUESE 0x17 LANG_ROMANSH 0x18 LANG_ROMANIAN 0x19 LANG_RUSSIAN 0x1a LANG_CROATIAN == LANG_SERBIAN 0x1b LANG_SLOVAK 0x1c LANG_ALBANIAN 0x1d LANG_SWEDISH 0x1e LANG_THAI 0x1f LANG_TURKISH 0x20 LANG_URDU 0x21 LANG_INDONESIAN 0x22 LANG_UKRAINIAN 0x23 LANG_BELARUSIAN 0x24 LANG_SLOVENIAN 0x25 LANG_ESTONIAN 0x26 LANG_LATVIAN 0x27 LANG_LITHUANIAN 0x28 LANG_TAJIK 0x29 LANG_FARSI 0x2a LANG_VIETNAMESE 0x2b LANG_ARMENIAN 0x2c LANG_AZERI 0x2d LANG_BASQUE 0x2e LANG_SORBIAN 0x2f LANG_MACEDONIAN 0x30 LANG_SUTU 0x31 LANG_TSONGA 0x32 LANG_TSWANA 0x33 LANG_VENDA 0x34 LANG_XHOSA 0x35 LANG_ZULU 0x36 LANG_AFRIKAANS 0x37 LANG_GEORGIAN 0x38 LANG_FAEROESE 0x39 LANG_HINDI 0x3a LANG_MALTESE 0x3b LANG_SAMI 0x3c LANG_GAELIC 0x3d LANG_YIDDISH 0x3e LANG_MALAY 0x3f LANG_KAZAK 0x40 LANG_KYRGYZ 0x41 LANG_SWAHILI 0x42 LANG_TURKMEN 0x43 LANG_UZBEK 0x44 LANG_TATAR 0x45 LANG_BENGALI 0x46 LANG_PUNJABI 0x47 LANG_GUJARATI 0x48 LANG_ORIYA 0x49 LANG_TAMIL 0x4a LANG_TELUGU 0x4b LANG_KANNADA 0x4c LANG_MALAYALAM 0x4d LANG_ASSAMESE 0x4e LANG_MARATHI 0x4f LANG_SANSKRIT 0x50 LANG_MONGOLIAN 0x51 LANG_TIBETAN 0x52 LANG_WELSH 0x53 LANG_CAMBODIAN 0x54 LANG_LAO 0x55 LANG_BURMESE 0x56 LANG_GALICIAN 0x57 LANG_KONKANI 0x58 LANG_MANIPURI 0x59 LANG_SINDHI 0x5a LANG_SYRIAC 0x5b LANG_SINHALESE 0x5c LANG_CHEROKEE 0x5d LANG_INUKTITUT 0x5e LANG_AMHARIC 0x5f LANG_TAMAZIGHT 0x60 LANG_KASHMIRI 0x61 LANG_NEPALI 0x62 LANG_FRISIAN 0x63 LANG_PASHTO 0x64 LANG_TAGALOG 0x65 LANG_DIVEHI 0x66 LANG_EDO 0x67 LANG_FULFULDE 0x68 LANG_HAUSA 0x69 LANG_IBIBIO 0x6a LANG_YORUBA 0x6d LANG_BASHKIR 0x6e LANG_LUXEMBOURGISH 0x6f LANG_GREENLANDIC 0x70 LANG_IGBO 0x71 LANG_KANURI 0x72 LANG_OROMO 0x73 LANG_TIGRINYA 0x74 LANG_GUARANI 0x75 LANG_HAWAIIAN 0x76 LANG_LATIN 0x77 LANG_SOMALI 0x78 LANG_YI 0x79 LANG_PAPIAMENTU 0x7a LANG_MAPUDUNGUN 0x7c LANG_MOHAWK 0x7e LANG_BRETON 0x82 LANG_OCCITAN 0x83 LANG_CORSICAN 0x84 LANG_ALSATIAN 0x85 LANG_YAKUT 0x86 LANG_KICHE 0x87 LANG_KINYARWANDA 0x88 LANG_WOLOF 0x8c LANG_DARI 0x91 LANG_SCOTTISH_GAELIC */ /* Mingw headers don't have latest language and sublanguage codes. */ # ifndef LANG_AFRIKAANS # define LANG_AFRIKAANS 0x36 # endif # ifndef LANG_ALBANIAN # define LANG_ALBANIAN 0x1c # endif # ifndef LANG_ALSATIAN # define LANG_ALSATIAN 0x84 # endif # ifndef LANG_AMHARIC # define LANG_AMHARIC 0x5e # endif # ifndef LANG_ARABIC # define LANG_ARABIC 0x01 # endif # ifndef LANG_ARMENIAN # define LANG_ARMENIAN 0x2b # endif # ifndef LANG_ASSAMESE # define LANG_ASSAMESE 0x4d # endif # ifndef LANG_AZERI # define LANG_AZERI 0x2c # endif # ifndef LANG_BASHKIR # define LANG_BASHKIR 0x6d # endif # ifndef LANG_BASQUE # define LANG_BASQUE 0x2d # endif # ifndef LANG_BELARUSIAN # define LANG_BELARUSIAN 0x23 # endif # ifndef LANG_BENGALI # define LANG_BENGALI 0x45 # endif # ifndef LANG_BRETON # define LANG_BRETON 0x7e # endif # ifndef LANG_BURMESE # define LANG_BURMESE 0x55 # endif # ifndef LANG_CAMBODIAN # define LANG_CAMBODIAN 0x53 # endif # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif # ifndef LANG_CHEROKEE # define LANG_CHEROKEE 0x5c # endif # ifndef LANG_CORSICAN # define LANG_CORSICAN 0x83 # endif # ifndef LANG_DARI # define LANG_DARI 0x8c # endif # ifndef LANG_DIVEHI # define LANG_DIVEHI 0x65 # endif # ifndef LANG_EDO # define LANG_EDO 0x66 # endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif # ifndef LANG_FAEROESE # define LANG_FAEROESE 0x38 # endif # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif # ifndef LANG_FRISIAN # define LANG_FRISIAN 0x62 # endif # ifndef LANG_FULFULDE # define LANG_FULFULDE 0x67 # endif # ifndef LANG_GAELIC # define LANG_GAELIC 0x3c # endif # ifndef LANG_GALICIAN # define LANG_GALICIAN 0x56 # endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif # ifndef LANG_GREENLANDIC # define LANG_GREENLANDIC 0x6f # endif # ifndef LANG_GUARANI # define LANG_GUARANI 0x74 # endif # ifndef LANG_GUJARATI # define LANG_GUJARATI 0x47 # endif # ifndef LANG_HAUSA # define LANG_HAUSA 0x68 # endif # ifndef LANG_HAWAIIAN # define LANG_HAWAIIAN 0x75 # endif # ifndef LANG_HEBREW # define LANG_HEBREW 0x0d # endif # ifndef LANG_HINDI # define LANG_HINDI 0x39 # endif # ifndef LANG_IBIBIO # define LANG_IBIBIO 0x69 # endif # ifndef LANG_IGBO # define LANG_IGBO 0x70 # endif # ifndef LANG_INDONESIAN # define LANG_INDONESIAN 0x21 # endif # ifndef LANG_INUKTITUT # define LANG_INUKTITUT 0x5d # endif # ifndef LANG_KANNADA # define LANG_KANNADA 0x4b # endif # ifndef LANG_KANURI # define LANG_KANURI 0x71 # endif # ifndef LANG_KASHMIRI # define LANG_KASHMIRI 0x60 # endif # ifndef LANG_KAZAK # define LANG_KAZAK 0x3f # endif # ifndef LANG_KICHE # define LANG_KICHE 0x86 # endif # ifndef LANG_KINYARWANDA # define LANG_KINYARWANDA 0x87 # endif # ifndef LANG_KONKANI # define LANG_KONKANI 0x57 # endif # ifndef LANG_KYRGYZ # define LANG_KYRGYZ 0x40 # endif # ifndef LANG_LAO # define LANG_LAO 0x54 # endif # ifndef LANG_LATIN # define LANG_LATIN 0x76 # endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif # ifndef LANG_LITHUANIAN # define LANG_LITHUANIAN 0x27 # endif # ifndef LANG_LUXEMBOURGISH # define LANG_LUXEMBOURGISH 0x6e # endif # ifndef LANG_MACEDONIAN # define LANG_MACEDONIAN 0x2f # endif # ifndef LANG_MALAY # define LANG_MALAY 0x3e # endif # ifndef LANG_MALAYALAM # define LANG_MALAYALAM 0x4c # endif # ifndef LANG_MALTESE # define LANG_MALTESE 0x3a # endif # ifndef LANG_MANIPURI # define LANG_MANIPURI 0x58 # endif # ifndef LANG_MAORI # define LANG_MAORI 0x81 # endif # ifndef LANG_MAPUDUNGUN # define LANG_MAPUDUNGUN 0x7a # endif # ifndef LANG_MARATHI # define LANG_MARATHI 0x4e # endif # ifndef LANG_MOHAWK # define LANG_MOHAWK 0x7c # endif # ifndef LANG_MONGOLIAN # define LANG_MONGOLIAN 0x50 # endif # ifndef LANG_NEPALI # define LANG_NEPALI 0x61 # endif # ifndef LANG_OCCITAN # define LANG_OCCITAN 0x82 # endif # ifndef LANG_ORIYA # define LANG_ORIYA 0x48 # endif # ifndef LANG_OROMO # define LANG_OROMO 0x72 # endif # ifndef LANG_PAPIAMENTU # define LANG_PAPIAMENTU 0x79 # endif # ifndef LANG_PASHTO # define LANG_PASHTO 0x63 # endif # ifndef LANG_PUNJABI # define LANG_PUNJABI 0x46 # endif # ifndef LANG_QUECHUA # define LANG_QUECHUA 0x6b # endif # ifndef LANG_ROMANSH # define LANG_ROMANSH 0x17 # endif # ifndef LANG_SAMI # define LANG_SAMI 0x3b # endif # ifndef LANG_SANSKRIT # define LANG_SANSKRIT 0x4f # endif # ifndef LANG_SCOTTISH_GAELIC # define LANG_SCOTTISH_GAELIC 0x91 # endif # ifndef LANG_SERBIAN # define LANG_SERBIAN 0x1a # endif # ifndef LANG_SINDHI # define LANG_SINDHI 0x59 # endif # ifndef LANG_SINHALESE # define LANG_SINHALESE 0x5b # endif # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif # ifndef LANG_SOMALI # define LANG_SOMALI 0x77 # endif # ifndef LANG_SORBIAN # define LANG_SORBIAN 0x2e # endif # ifndef LANG_SOTHO # define LANG_SOTHO 0x6c # endif # ifndef LANG_SUTU # define LANG_SUTU 0x30 # endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif # ifndef LANG_SYRIAC # define LANG_SYRIAC 0x5a # endif # ifndef LANG_TAGALOG # define LANG_TAGALOG 0x64 # endif # ifndef LANG_TAJIK # define LANG_TAJIK 0x28 # endif # ifndef LANG_TAMAZIGHT # define LANG_TAMAZIGHT 0x5f # endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif # ifndef LANG_TATAR # define LANG_TATAR 0x44 # endif # ifndef LANG_TELUGU # define LANG_TELUGU 0x4a # endif # ifndef LANG_THAI # define LANG_THAI 0x1e # endif # ifndef LANG_TIBETAN # define LANG_TIBETAN 0x51 # endif # ifndef LANG_TIGRINYA # define LANG_TIGRINYA 0x73 # endif # ifndef LANG_TSONGA # define LANG_TSONGA 0x31 # endif # ifndef LANG_TSWANA # define LANG_TSWANA 0x32 # endif # ifndef LANG_TURKMEN # define LANG_TURKMEN 0x42 # endif # ifndef LANG_UIGHUR # define LANG_UIGHUR 0x80 # endif # ifndef LANG_UKRAINIAN # define LANG_UKRAINIAN 0x22 # endif # ifndef LANG_URDU # define LANG_URDU 0x20 # endif # ifndef LANG_UZBEK # define LANG_UZBEK 0x43 # endif # ifndef LANG_VENDA # define LANG_VENDA 0x33 # endif # ifndef LANG_VIETNAMESE # define LANG_VIETNAMESE 0x2a # endif # ifndef LANG_WELSH # define LANG_WELSH 0x52 # endif # ifndef LANG_WOLOF # define LANG_WOLOF 0x88 # endif # ifndef LANG_XHOSA # define LANG_XHOSA 0x34 # endif # ifndef LANG_YAKUT # define LANG_YAKUT 0x85 # endif # ifndef LANG_YI # define LANG_YI 0x78 # endif # ifndef LANG_YIDDISH # define LANG_YIDDISH 0x3d # endif # ifndef LANG_YORUBA # define LANG_YORUBA 0x6a # endif # ifndef LANG_ZULU # define LANG_ZULU 0x35 # endif # ifndef SUBLANG_AFRIKAANS_SOUTH_AFRICA # define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 # endif # ifndef SUBLANG_ALBANIAN_ALBANIA # define SUBLANG_ALBANIAN_ALBANIA 0x01 # endif # ifndef SUBLANG_ALSATIAN_FRANCE # define SUBLANG_ALSATIAN_FRANCE 0x01 # endif # ifndef SUBLANG_AMHARIC_ETHIOPIA # define SUBLANG_AMHARIC_ETHIOPIA 0x01 # endif # ifndef SUBLANG_ARABIC_SAUDI_ARABIA # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 # endif # ifndef SUBLANG_ARABIC_IRAQ # define SUBLANG_ARABIC_IRAQ 0x02 # endif # ifndef SUBLANG_ARABIC_EGYPT # define SUBLANG_ARABIC_EGYPT 0x03 # endif # ifndef SUBLANG_ARABIC_LIBYA # define SUBLANG_ARABIC_LIBYA 0x04 # endif # ifndef SUBLANG_ARABIC_ALGERIA # define SUBLANG_ARABIC_ALGERIA 0x05 # endif # ifndef SUBLANG_ARABIC_MOROCCO # define SUBLANG_ARABIC_MOROCCO 0x06 # endif # ifndef SUBLANG_ARABIC_TUNISIA # define SUBLANG_ARABIC_TUNISIA 0x07 # endif # ifndef SUBLANG_ARABIC_OMAN # define SUBLANG_ARABIC_OMAN 0x08 # endif # ifndef SUBLANG_ARABIC_YEMEN # define SUBLANG_ARABIC_YEMEN 0x09 # endif # ifndef SUBLANG_ARABIC_SYRIA # define SUBLANG_ARABIC_SYRIA 0x0a # endif # ifndef SUBLANG_ARABIC_JORDAN # define SUBLANG_ARABIC_JORDAN 0x0b # endif # ifndef SUBLANG_ARABIC_LEBANON # define SUBLANG_ARABIC_LEBANON 0x0c # endif # ifndef SUBLANG_ARABIC_KUWAIT # define SUBLANG_ARABIC_KUWAIT 0x0d # endif # ifndef SUBLANG_ARABIC_UAE # define SUBLANG_ARABIC_UAE 0x0e # endif # ifndef SUBLANG_ARABIC_BAHRAIN # define SUBLANG_ARABIC_BAHRAIN 0x0f # endif # ifndef SUBLANG_ARABIC_QATAR # define SUBLANG_ARABIC_QATAR 0x10 # endif # ifndef SUBLANG_ARMENIAN_ARMENIA # define SUBLANG_ARMENIAN_ARMENIA 0x01 # endif # ifndef SUBLANG_ASSAMESE_INDIA # define SUBLANG_ASSAMESE_INDIA 0x01 # endif # ifndef SUBLANG_AZERI_LATIN # define SUBLANG_AZERI_LATIN 0x01 # endif # ifndef SUBLANG_AZERI_CYRILLIC # define SUBLANG_AZERI_CYRILLIC 0x02 # endif # ifndef SUBLANG_BASHKIR_RUSSIA # define SUBLANG_BASHKIR_RUSSIA 0x01 # endif # ifndef SUBLANG_BASQUE_BASQUE # define SUBLANG_BASQUE_BASQUE 0x01 # endif # ifndef SUBLANG_BELARUSIAN_BELARUS # define SUBLANG_BELARUSIAN_BELARUS 0x01 # endif # ifndef SUBLANG_BENGALI_INDIA # define SUBLANG_BENGALI_INDIA 0x01 # endif # ifndef SUBLANG_BENGALI_BANGLADESH # define SUBLANG_BENGALI_BANGLADESH 0x02 # endif # ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN # define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 # endif # ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC # define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 # endif # ifndef SUBLANG_BRETON_FRANCE # define SUBLANG_BRETON_FRANCE 0x01 # endif # ifndef SUBLANG_BULGARIAN_BULGARIA # define SUBLANG_BULGARIAN_BULGARIA 0x01 # endif # ifndef SUBLANG_CAMBODIAN_CAMBODIA # define SUBLANG_CAMBODIAN_CAMBODIA 0x01 # endif # ifndef SUBLANG_CATALAN_SPAIN # define SUBLANG_CATALAN_SPAIN 0x01 # endif # ifndef SUBLANG_CORSICAN_FRANCE # define SUBLANG_CORSICAN_FRANCE 0x01 # endif # ifndef SUBLANG_CROATIAN_CROATIA # define SUBLANG_CROATIAN_CROATIA 0x01 # endif # ifndef SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN # define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 # endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 # endif # ifndef SUBLANG_CZECH_CZECH_REPUBLIC # define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 # endif # ifndef SUBLANG_DANISH_DENMARK # define SUBLANG_DANISH_DENMARK 0x01 # endif # ifndef SUBLANG_DARI_AFGHANISTAN # define SUBLANG_DARI_AFGHANISTAN 0x01 # endif # ifndef SUBLANG_DIVEHI_MALDIVES # define SUBLANG_DIVEHI_MALDIVES 0x01 # endif # ifndef SUBLANG_DUTCH_SURINAM # define SUBLANG_DUTCH_SURINAM 0x03 # endif # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 # endif # ifndef SUBLANG_ENGLISH_JAMAICA # define SUBLANG_ENGLISH_JAMAICA 0x08 # endif # ifndef SUBLANG_ENGLISH_CARIBBEAN # define SUBLANG_ENGLISH_CARIBBEAN 0x09 # endif # ifndef SUBLANG_ENGLISH_BELIZE # define SUBLANG_ENGLISH_BELIZE 0x0a # endif # ifndef SUBLANG_ENGLISH_TRINIDAD # define SUBLANG_ENGLISH_TRINIDAD 0x0b # endif # ifndef SUBLANG_ENGLISH_ZIMBABWE # define SUBLANG_ENGLISH_ZIMBABWE 0x0c # endif # ifndef SUBLANG_ENGLISH_PHILIPPINES # define SUBLANG_ENGLISH_PHILIPPINES 0x0d # endif # ifndef SUBLANG_ENGLISH_INDONESIA # define SUBLANG_ENGLISH_INDONESIA 0x0e # endif # ifndef SUBLANG_ENGLISH_HONGKONG # define SUBLANG_ENGLISH_HONGKONG 0x0f # endif # ifndef SUBLANG_ENGLISH_INDIA # define SUBLANG_ENGLISH_INDIA 0x10 # endif # ifndef SUBLANG_ENGLISH_MALAYSIA # define SUBLANG_ENGLISH_MALAYSIA 0x11 # endif # ifndef SUBLANG_ENGLISH_SINGAPORE # define SUBLANG_ENGLISH_SINGAPORE 0x12 # endif # ifndef SUBLANG_ESTONIAN_ESTONIA # define SUBLANG_ESTONIAN_ESTONIA 0x01 # endif # ifndef SUBLANG_FAEROESE_FAROE_ISLANDS # define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 # endif # ifndef SUBLANG_FARSI_IRAN # define SUBLANG_FARSI_IRAN 0x01 # endif # ifndef SUBLANG_FINNISH_FINLAND # define SUBLANG_FINNISH_FINLAND 0x01 # endif # ifndef SUBLANG_FRENCH_LUXEMBOURG # define SUBLANG_FRENCH_LUXEMBOURG 0x05 # endif # ifndef SUBLANG_FRENCH_MONACO # define SUBLANG_FRENCH_MONACO 0x06 # endif # ifndef SUBLANG_FRENCH_WESTINDIES # define SUBLANG_FRENCH_WESTINDIES 0x07 # endif # ifndef SUBLANG_FRENCH_REUNION # define SUBLANG_FRENCH_REUNION 0x08 # endif # ifndef SUBLANG_FRENCH_CONGO # define SUBLANG_FRENCH_CONGO 0x09 # endif # ifndef SUBLANG_FRENCH_SENEGAL # define SUBLANG_FRENCH_SENEGAL 0x0a # endif # ifndef SUBLANG_FRENCH_CAMEROON # define SUBLANG_FRENCH_CAMEROON 0x0b # endif # ifndef SUBLANG_FRENCH_COTEDIVOIRE # define SUBLANG_FRENCH_COTEDIVOIRE 0x0c # endif # ifndef SUBLANG_FRENCH_MALI # define SUBLANG_FRENCH_MALI 0x0d # endif # ifndef SUBLANG_FRENCH_MOROCCO # define SUBLANG_FRENCH_MOROCCO 0x0e # endif # ifndef SUBLANG_FRENCH_HAITI # define SUBLANG_FRENCH_HAITI 0x0f # endif # ifndef SUBLANG_FRISIAN_NETHERLANDS # define SUBLANG_FRISIAN_NETHERLANDS 0x01 # endif # ifndef SUBLANG_GALICIAN_SPAIN # define SUBLANG_GALICIAN_SPAIN 0x01 # endif # ifndef SUBLANG_GEORGIAN_GEORGIA # define SUBLANG_GEORGIAN_GEORGIA 0x01 # endif # ifndef SUBLANG_GERMAN_LUXEMBOURG # define SUBLANG_GERMAN_LUXEMBOURG 0x04 # endif # ifndef SUBLANG_GERMAN_LIECHTENSTEIN # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 # endif # ifndef SUBLANG_GREEK_GREECE # define SUBLANG_GREEK_GREECE 0x01 # endif # ifndef SUBLANG_GREENLANDIC_GREENLAND # define SUBLANG_GREENLANDIC_GREENLAND 0x01 # endif # ifndef SUBLANG_GUJARATI_INDIA # define SUBLANG_GUJARATI_INDIA 0x01 # endif # ifndef SUBLANG_HAUSA_NIGERIA_LATIN # define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 # endif # ifndef SUBLANG_HEBREW_ISRAEL # define SUBLANG_HEBREW_ISRAEL 0x01 # endif # ifndef SUBLANG_HINDI_INDIA # define SUBLANG_HINDI_INDIA 0x01 # endif # ifndef SUBLANG_HUNGARIAN_HUNGARY # define SUBLANG_HUNGARIAN_HUNGARY 0x01 # endif # ifndef SUBLANG_ICELANDIC_ICELAND # define SUBLANG_ICELANDIC_ICELAND 0x01 # endif # ifndef SUBLANG_IGBO_NIGERIA # define SUBLANG_IGBO_NIGERIA 0x01 # endif # ifndef SUBLANG_INDONESIAN_INDONESIA # define SUBLANG_INDONESIAN_INDONESIA 0x01 # endif # ifndef SUBLANG_INUKTITUT_CANADA # define SUBLANG_INUKTITUT_CANADA 0x01 # endif # undef SUBLANG_INUKTITUT_CANADA_LATIN # define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 # undef SUBLANG_IRISH_IRELAND # define SUBLANG_IRISH_IRELAND 0x02 # ifndef SUBLANG_JAPANESE_JAPAN # define SUBLANG_JAPANESE_JAPAN 0x01 # endif # ifndef SUBLANG_KANNADA_INDIA # define SUBLANG_KANNADA_INDIA 0x01 # endif # ifndef SUBLANG_KASHMIRI_INDIA # define SUBLANG_KASHMIRI_INDIA 0x02 # endif # ifndef SUBLANG_KAZAK_KAZAKHSTAN # define SUBLANG_KAZAK_KAZAKHSTAN 0x01 # endif # ifndef SUBLANG_KICHE_GUATEMALA # define SUBLANG_KICHE_GUATEMALA 0x01 # endif # ifndef SUBLANG_KINYARWANDA_RWANDA # define SUBLANG_KINYARWANDA_RWANDA 0x01 # endif # ifndef SUBLANG_KONKANI_INDIA # define SUBLANG_KONKANI_INDIA 0x01 # endif # ifndef SUBLANG_KYRGYZ_KYRGYZSTAN # define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 # endif # ifndef SUBLANG_LAO_LAOS # define SUBLANG_LAO_LAOS 0x01 # endif # ifndef SUBLANG_LATVIAN_LATVIA # define SUBLANG_LATVIAN_LATVIA 0x01 # endif # ifndef SUBLANG_LITHUANIAN_LITHUANIA # define SUBLANG_LITHUANIAN_LITHUANIA 0x01 # endif # undef SUBLANG_LOWER_SORBIAN_GERMANY # define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 # ifndef SUBLANG_LUXEMBOURGISH_LUXEMBOURG # define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 # endif # ifndef SUBLANG_MACEDONIAN_MACEDONIA # define SUBLANG_MACEDONIAN_MACEDONIA 0x01 # endif # ifndef SUBLANG_MALAY_MALAYSIA # define SUBLANG_MALAY_MALAYSIA 0x01 # endif # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 # endif # ifndef SUBLANG_MALAYALAM_INDIA # define SUBLANG_MALAYALAM_INDIA 0x01 # endif # ifndef SUBLANG_MALTESE_MALTA # define SUBLANG_MALTESE_MALTA 0x01 # endif # ifndef SUBLANG_MAORI_NEW_ZEALAND # define SUBLANG_MAORI_NEW_ZEALAND 0x01 # endif # ifndef SUBLANG_MAPUDUNGUN_CHILE # define SUBLANG_MAPUDUNGUN_CHILE 0x01 # endif # ifndef SUBLANG_MARATHI_INDIA # define SUBLANG_MARATHI_INDIA 0x01 # endif # ifndef SUBLANG_MOHAWK_CANADA # define SUBLANG_MOHAWK_CANADA 0x01 # endif # ifndef SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA # define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 # endif # ifndef SUBLANG_MONGOLIAN_PRC # define SUBLANG_MONGOLIAN_PRC 0x02 # endif # ifndef SUBLANG_NEPALI_NEPAL # define SUBLANG_NEPALI_NEPAL 0x01 # endif # ifndef SUBLANG_NEPALI_INDIA # define SUBLANG_NEPALI_INDIA 0x02 # endif # ifndef SUBLANG_OCCITAN_FRANCE # define SUBLANG_OCCITAN_FRANCE 0x01 # endif # ifndef SUBLANG_ORIYA_INDIA # define SUBLANG_ORIYA_INDIA 0x01 # endif # ifndef SUBLANG_PASHTO_AFGHANISTAN # define SUBLANG_PASHTO_AFGHANISTAN 0x01 # endif # ifndef SUBLANG_POLISH_POLAND # define SUBLANG_POLISH_POLAND 0x01 # endif # ifndef SUBLANG_PUNJABI_INDIA # define SUBLANG_PUNJABI_INDIA 0x01 # endif # ifndef SUBLANG_PUNJABI_PAKISTAN # define SUBLANG_PUNJABI_PAKISTAN 0x02 # endif # ifndef SUBLANG_QUECHUA_BOLIVIA # define SUBLANG_QUECHUA_BOLIVIA 0x01 # endif # ifndef SUBLANG_QUECHUA_ECUADOR # define SUBLANG_QUECHUA_ECUADOR 0x02 # endif # ifndef SUBLANG_QUECHUA_PERU # define SUBLANG_QUECHUA_PERU 0x03 # endif # ifndef SUBLANG_ROMANIAN_ROMANIA # define SUBLANG_ROMANIAN_ROMANIA 0x01 # endif # ifndef SUBLANG_ROMANIAN_MOLDOVA # define SUBLANG_ROMANIAN_MOLDOVA 0x02 # endif # ifndef SUBLANG_ROMANSH_SWITZERLAND # define SUBLANG_ROMANSH_SWITZERLAND 0x01 # endif # ifndef SUBLANG_RUSSIAN_RUSSIA # define SUBLANG_RUSSIAN_RUSSIA 0x01 # endif # ifndef SUBLANG_RUSSIAN_MOLDAVIA # define SUBLANG_RUSSIAN_MOLDAVIA 0x02 # endif # ifndef SUBLANG_SAMI_NORTHERN_NORWAY # define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 # endif # ifndef SUBLANG_SAMI_NORTHERN_SWEDEN # define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 # endif # ifndef SUBLANG_SAMI_NORTHERN_FINLAND # define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 # endif # ifndef SUBLANG_SAMI_LULE_NORWAY # define SUBLANG_SAMI_LULE_NORWAY 0x04 # endif # ifndef SUBLANG_SAMI_LULE_SWEDEN # define SUBLANG_SAMI_LULE_SWEDEN 0x05 # endif # ifndef SUBLANG_SAMI_SOUTHERN_NORWAY # define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 # endif # ifndef SUBLANG_SAMI_SOUTHERN_SWEDEN # define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 # endif # undef SUBLANG_SAMI_SKOLT_FINLAND # define SUBLANG_SAMI_SKOLT_FINLAND 0x08 # undef SUBLANG_SAMI_INARI_FINLAND # define SUBLANG_SAMI_INARI_FINLAND 0x09 # ifndef SUBLANG_SANSKRIT_INDIA # define SUBLANG_SANSKRIT_INDIA 0x01 # endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 # endif # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif # ifndef SUBLANG_SINDHI_INDIA # define SUBLANG_SINDHI_INDIA 0x01 # endif # undef SUBLANG_SINDHI_PAKISTAN # define SUBLANG_SINDHI_PAKISTAN 0x02 # ifndef SUBLANG_SINDHI_AFGHANISTAN # define SUBLANG_SINDHI_AFGHANISTAN 0x02 # endif # ifndef SUBLANG_SINHALESE_SRI_LANKA # define SUBLANG_SINHALESE_SRI_LANKA 0x01 # endif # ifndef SUBLANG_SLOVAK_SLOVAKIA # define SUBLANG_SLOVAK_SLOVAKIA 0x01 # endif # ifndef SUBLANG_SLOVENIAN_SLOVENIA # define SUBLANG_SLOVENIAN_SLOVENIA 0x01 # endif # ifndef SUBLANG_SOTHO_SOUTH_AFRICA # define SUBLANG_SOTHO_SOUTH_AFRICA 0x01 # endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif # ifndef SUBLANG_SPANISH_COSTA_RICA # define SUBLANG_SPANISH_COSTA_RICA 0x05 # endif # ifndef SUBLANG_SPANISH_PANAMA # define SUBLANG_SPANISH_PANAMA 0x06 # endif # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 # endif # ifndef SUBLANG_SPANISH_VENEZUELA # define SUBLANG_SPANISH_VENEZUELA 0x08 # endif # ifndef SUBLANG_SPANISH_COLOMBIA # define SUBLANG_SPANISH_COLOMBIA 0x09 # endif # ifndef SUBLANG_SPANISH_PERU # define SUBLANG_SPANISH_PERU 0x0a # endif # ifndef SUBLANG_SPANISH_ARGENTINA # define SUBLANG_SPANISH_ARGENTINA 0x0b # endif # ifndef SUBLANG_SPANISH_ECUADOR # define SUBLANG_SPANISH_ECUADOR 0x0c # endif # ifndef SUBLANG_SPANISH_CHILE # define SUBLANG_SPANISH_CHILE 0x0d # endif # ifndef SUBLANG_SPANISH_URUGUAY # define SUBLANG_SPANISH_URUGUAY 0x0e # endif # ifndef SUBLANG_SPANISH_PARAGUAY # define SUBLANG_SPANISH_PARAGUAY 0x0f # endif # ifndef SUBLANG_SPANISH_BOLIVIA # define SUBLANG_SPANISH_BOLIVIA 0x10 # endif # ifndef SUBLANG_SPANISH_EL_SALVADOR # define SUBLANG_SPANISH_EL_SALVADOR 0x11 # endif # ifndef SUBLANG_SPANISH_HONDURAS # define SUBLANG_SPANISH_HONDURAS 0x12 # endif # ifndef SUBLANG_SPANISH_NICARAGUA # define SUBLANG_SPANISH_NICARAGUA 0x13 # endif # ifndef SUBLANG_SPANISH_PUERTO_RICO # define SUBLANG_SPANISH_PUERTO_RICO 0x14 # endif # ifndef SUBLANG_SPANISH_US # define SUBLANG_SPANISH_US 0x15 # endif # ifndef SUBLANG_SWAHILI_KENYA # define SUBLANG_SWAHILI_KENYA 0x01 # endif # ifndef SUBLANG_SWEDISH_SWEDEN # define SUBLANG_SWEDISH_SWEDEN 0x01 # endif # ifndef SUBLANG_SWEDISH_FINLAND # define SUBLANG_SWEDISH_FINLAND 0x02 # endif # ifndef SUBLANG_SYRIAC_SYRIA # define SUBLANG_SYRIAC_SYRIA 0x01 # endif # ifndef SUBLANG_TAGALOG_PHILIPPINES # define SUBLANG_TAGALOG_PHILIPPINES 0x01 # endif # ifndef SUBLANG_TAJIK_TAJIKISTAN # define SUBLANG_TAJIK_TAJIKISTAN 0x01 # endif # ifndef SUBLANG_TAMAZIGHT_ARABIC # define SUBLANG_TAMAZIGHT_ARABIC 0x01 # endif # ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN # define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 # endif # ifndef SUBLANG_TAMIL_INDIA # define SUBLANG_TAMIL_INDIA 0x01 # endif # ifndef SUBLANG_TATAR_RUSSIA # define SUBLANG_TATAR_RUSSIA 0x01 # endif # ifndef SUBLANG_TELUGU_INDIA # define SUBLANG_TELUGU_INDIA 0x01 # endif # ifndef SUBLANG_THAI_THAILAND # define SUBLANG_THAI_THAILAND 0x01 # endif # ifndef SUBLANG_TIBETAN_PRC # define SUBLANG_TIBETAN_PRC 0x01 # endif # undef SUBLANG_TIBETAN_BHUTAN # define SUBLANG_TIBETAN_BHUTAN 0x02 # ifndef SUBLANG_TIGRINYA_ETHIOPIA # define SUBLANG_TIGRINYA_ETHIOPIA 0x01 # endif # ifndef SUBLANG_TIGRINYA_ERITREA # define SUBLANG_TIGRINYA_ERITREA 0x02 # endif # ifndef SUBLANG_TSWANA_SOUTH_AFRICA # define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 # endif # ifndef SUBLANG_TURKISH_TURKEY # define SUBLANG_TURKISH_TURKEY 0x01 # endif # ifndef SUBLANG_TURKMEN_TURKMENISTAN # define SUBLANG_TURKMEN_TURKMENISTAN 0x01 # endif # ifndef SUBLANG_UIGHUR_PRC # define SUBLANG_UIGHUR_PRC 0x01 # endif # ifndef SUBLANG_UKRAINIAN_UKRAINE # define SUBLANG_UKRAINIAN_UKRAINE 0x01 # endif # ifndef SUBLANG_UPPER_SORBIAN_GERMANY # define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 # endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 # endif # ifndef SUBLANG_URDU_INDIA # define SUBLANG_URDU_INDIA 0x02 # endif # ifndef SUBLANG_UZBEK_LATIN # define SUBLANG_UZBEK_LATIN 0x01 # endif # ifndef SUBLANG_UZBEK_CYRILLIC # define SUBLANG_UZBEK_CYRILLIC 0x02 # endif # ifndef SUBLANG_VIETNAMESE_VIETNAM # define SUBLANG_VIETNAMESE_VIETNAM 0x01 # endif # ifndef SUBLANG_WELSH_UNITED_KINGDOM # define SUBLANG_WELSH_UNITED_KINGDOM 0x01 # endif # ifndef SUBLANG_WOLOF_SENEGAL # define SUBLANG_WOLOF_SENEGAL 0x01 # endif # ifndef SUBLANG_XHOSA_SOUTH_AFRICA # define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 # endif # ifndef SUBLANG_YAKUT_RUSSIA # define SUBLANG_YAKUT_RUSSIA 0x01 # endif # ifndef SUBLANG_YI_PRC # define SUBLANG_YI_PRC 0x01 # endif # ifndef SUBLANG_YORUBA_NIGERIA # define SUBLANG_YORUBA_NIGERIA 0x01 # endif # ifndef SUBLANG_ZULU_SOUTH_AFRICA # define SUBLANG_ZULU_SOUTH_AFRICA 0x01 # endif /* GetLocaleInfoA operations. */ # ifndef LOCALE_SNAME # define LOCALE_SNAME 0x5c # endif #endif #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ /* Canonicalize a MacOS X locale name to a Unix locale name. NAME is a sufficiently large buffer. On input, it contains the MacOS X locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static # endif void gl_locale_name_canonicalize (char *name) { /* This conversion is based on a posting by Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08, http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this. Therefore we do it ourselves, using a table based on the results of the MacOS X 10.3.8 function CFLocaleCreateCanonicalLocaleIdentifierFromString(). */ typedef struct { const char legacy[21+1]; const char unixy[5+1]; } legacy_entry; static const legacy_entry legacy_table[] = { { "Afrikaans", "af" }, { "Albanian", "sq" }, { "Amharic", "am" }, { "Arabic", "ar" }, { "Armenian", "hy" }, { "Assamese", "as" }, { "Aymara", "ay" }, { "Azerbaijani", "az" }, { "Basque", "eu" }, { "Belarusian", "be" }, { "Belorussian", "be" }, { "Bengali", "bn" }, { "Brazilian Portugese", "pt_BR" }, { "Brazilian Portuguese", "pt_BR" }, { "Breton", "br" }, { "Bulgarian", "bg" }, { "Burmese", "my" }, { "Byelorussian", "be" }, { "Catalan", "ca" }, { "Chewa", "ny" }, { "Chichewa", "ny" }, { "Chinese", "zh" }, { "Chinese, Simplified", "zh_CN" }, { "Chinese, Traditional", "zh_TW" }, { "Chinese, Tradtional", "zh_TW" }, { "Croatian", "hr" }, { "Czech", "cs" }, { "Danish", "da" }, { "Dutch", "nl" }, { "Dzongkha", "dz" }, { "English", "en" }, { "Esperanto", "eo" }, { "Estonian", "et" }, { "Faroese", "fo" }, { "Farsi", "fa" }, { "Finnish", "fi" }, { "Flemish", "nl_BE" }, { "French", "fr" }, { "Galician", "gl" }, { "Gallegan", "gl" }, { "Georgian", "ka" }, { "German", "de" }, { "Greek", "el" }, { "Greenlandic", "kl" }, { "Guarani", "gn" }, { "Gujarati", "gu" }, { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */ { "Hebrew", "he" }, { "Hindi", "hi" }, { "Hungarian", "hu" }, { "Icelandic", "is" }, { "Indonesian", "id" }, { "Inuktitut", "iu" }, { "Irish", "ga" }, { "Italian", "it" }, { "Japanese", "ja" }, { "Javanese", "jv" }, { "Kalaallisut", "kl" }, { "Kannada", "kn" }, { "Kashmiri", "ks" }, { "Kazakh", "kk" }, { "Khmer", "km" }, { "Kinyarwanda", "rw" }, { "Kirghiz", "ky" }, { "Korean", "ko" }, { "Kurdish", "ku" }, { "Latin", "la" }, { "Latvian", "lv" }, { "Lithuanian", "lt" }, { "Macedonian", "mk" }, { "Malagasy", "mg" }, { "Malay", "ms" }, { "Malayalam", "ml" }, { "Maltese", "mt" }, { "Manx", "gv" }, { "Marathi", "mr" }, { "Moldavian", "mo" }, { "Mongolian", "mn" }, { "Nepali", "ne" }, { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */ { "Nyanja", "ny" }, { "Nynorsk", "nn" }, { "Oriya", "or" }, { "Oromo", "om" }, { "Panjabi", "pa" }, { "Pashto", "ps" }, { "Persian", "fa" }, { "Polish", "pl" }, { "Portuguese", "pt" }, { "Portuguese, Brazilian", "pt_BR" }, { "Punjabi", "pa" }, { "Pushto", "ps" }, { "Quechua", "qu" }, { "Romanian", "ro" }, { "Ruanda", "rw" }, { "Rundi", "rn" }, { "Russian", "ru" }, { "Sami", "se_NO" }, /* Not just "se". */ { "Sanskrit", "sa" }, { "Scottish", "gd" }, { "Serbian", "sr" }, { "Simplified Chinese", "zh_CN" }, { "Sindhi", "sd" }, { "Sinhalese", "si" }, { "Slovak", "sk" }, { "Slovenian", "sl" }, { "Somali", "so" }, { "Spanish", "es" }, { "Sundanese", "su" }, { "Swahili", "sw" }, { "Swedish", "sv" }, { "Tagalog", "tl" }, { "Tajik", "tg" }, { "Tajiki", "tg" }, { "Tamil", "ta" }, { "Tatar", "tt" }, { "Telugu", "te" }, { "Thai", "th" }, { "Tibetan", "bo" }, { "Tigrinya", "ti" }, { "Tongan", "to" }, { "Traditional Chinese", "zh_TW" }, { "Turkish", "tr" }, { "Turkmen", "tk" }, { "Uighur", "ug" }, { "Ukrainian", "uk" }, { "Urdu", "ur" }, { "Uzbek", "uz" }, { "Vietnamese", "vi" }, { "Welsh", "cy" }, { "Yiddish", "yi" } }; /* Convert new-style locale names with language tags (ISO 639 and ISO 15924) to Unix (ISO 639 and ISO 3166) names. */ typedef struct { const char langtag[7+1]; const char unixy[12+1]; } langtag_entry; static const langtag_entry langtag_table[] = { /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn". The default script for az on Unix is Latin. */ { "az-Latn", "az" }, /* MacOS X has "ga-dots". Does not yet exist on Unix. */ { "ga-dots", "ga" }, /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */ /* MacOS X has "mn-Cyrl", "mn-Mong". The default script for mn on Unix is Cyrillic. */ { "mn-Cyrl", "mn" }, /* MacOS X has "ms-Arab", "ms-Latn". The default script for ms on Unix is Latin. */ { "ms-Latn", "ms" }, /* MacOS X has "tg-Cyrl". The default script for tg on Unix is Cyrillic. */ { "tg-Cyrl", "tg" }, /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */ /* MacOS X has "tt-Cyrl". The default script for tt on Unix is Cyrillic. */ { "tt-Cyrl", "tt" }, /* MacOS X has "zh-Hans", "zh-Hant". Country codes are used to distinguish these on Unix. */ { "zh-Hans", "zh_CN" }, { "zh-Hant", "zh_TW" } }; /* Convert script names (ISO 15924) to Unix conventions. See http://www.unicode.org/iso15924/iso15924-codes.html */ typedef struct { const char script[4+1]; const char unixy[9+1]; } script_entry; static const script_entry script_table[] = { { "Arab", "arabic" }, { "Cyrl", "cyrillic" }, { "Mong", "mongolian" } }; /* Step 1: Convert using legacy_table. */ if (name[0] >= 'A' && name[0] <= 'Z') { unsigned int i1, i2; i1 = 0; i2 = sizeof (legacy_table) / sizeof (legacy_entry); while (i2 - i1 > 1) { /* At this point we know that if name occurs in legacy_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const legacy_entry *p = &legacy_table[i]; if (strcmp (name, p->legacy) < 0) i2 = i; else i1 = i; } if (strcmp (name, legacy_table[i1].legacy) == 0) { strcpy (name, legacy_table[i1].unixy); return; } } /* Step 2: Convert using langtag_table and script_table. */ if (strlen (name) == 7 && name[2] == '-') { unsigned int i1, i2; i1 = 0; i2 = sizeof (langtag_table) / sizeof (langtag_entry); while (i2 - i1 > 1) { /* At this point we know that if name occurs in langtag_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const langtag_entry *p = &langtag_table[i]; if (strcmp (name, p->langtag) < 0) i2 = i; else i1 = i; } if (strcmp (name, langtag_table[i1].langtag) == 0) { strcpy (name, langtag_table[i1].unixy); return; } i1 = 0; i2 = sizeof (script_table) / sizeof (script_entry); while (i2 - i1 > 1) { /* At this point we know that if (name + 3) occurs in script_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const script_entry *p = &script_table[i]; if (strcmp (name + 3, p->script) < 0) i2 = i; else i1 = i; } if (strcmp (name + 3, script_table[i1].script) == 0) { name[2] = '@'; strcpy (name + 3, script_table[i1].unixy); return; } } /* Step 3: Convert new-style dash to Unix underscore. */ { char *p; for (p = name; *p != '\0'; p++) if (*p == '-') *p = '_'; } } #endif #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ /* Canonicalize a Windows native locale name to a Unix locale name. NAME is a sufficiently large buffer. On input, it contains the Windows locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static # endif void gl_locale_name_canonicalize (char *name) { /* FIXME: This is probably incomplete: it does not handle "zh-Hans" and "zh-Hant". */ char *p; for (p = name; *p != '\0'; p++) if (*p == '-') { *p = '_'; p++; for (; *p != '\0'; p++) { if (*p >= 'a' && *p <= 'z') *p += 'A' - 'a'; if (*p == '-') { *p = '\0'; return; } } return; } } # if !defined IN_LIBINTL static # endif const char * gl_locale_name_from_win32_LANGID (LANGID langid) { /* Activate the new code only when the GETTEXT_MUI environment variable is set, for the time being, since the new code is not well tested. */ if (getenv ("GETTEXT_MUI") != NULL) { static char namebuf[256]; /* Query the system's notion of locale name. On Windows95/98/ME, GetLocaleInfoA returns some incorrect results. But we don't need to support systems that are so old. */ if (GetLocaleInfoA (MAKELCID (langid, SORT_DEFAULT), LOCALE_SNAME, namebuf, sizeof (namebuf) - 1)) { /* Convert it to a Unix locale name. */ gl_locale_name_canonicalize (namebuf); return namebuf; } } /* Internet Explorer has an LCID to RFC3066 name mapping stored in HKEY_CLASSES_ROOT\Mime\Database\Rfc1766. But we better don't use that since IE's i18n subsystem is known to be inconsistent with the native Windows base (e.g. they have different character conversion facilities that produce different results). */ /* Use our own table. */ { int primary, sub; /* Split into language and territory part. */ primary = PRIMARYLANGID (langid); sub = SUBLANGID (langid); /* Dispatch on language. See also http://www.unicode.org/unicode/onlinedat/languages.html . For details about languages, see http://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: switch (sub) { case SUBLANG_AFRIKAANS_SOUTH_AFRICA: return "af_ZA"; } return "af"; case LANG_ALBANIAN: switch (sub) { case SUBLANG_ALBANIAN_ALBANIA: return "sq_AL"; } return "sq"; case LANG_ALSATIAN: switch (sub) { case SUBLANG_ALSATIAN_FRANCE: return "gsw_FR"; } return "gsw"; case LANG_AMHARIC: switch (sub) { case SUBLANG_AMHARIC_ETHIOPIA: return "am_ET"; } return "am"; case LANG_ARABIC: switch (sub) { case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; case SUBLANG_ARABIC_EGYPT: return "ar_EG"; case SUBLANG_ARABIC_LIBYA: return "ar_LY"; case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; case SUBLANG_ARABIC_OMAN: return "ar_OM"; case SUBLANG_ARABIC_YEMEN: return "ar_YE"; case SUBLANG_ARABIC_SYRIA: return "ar_SY"; case SUBLANG_ARABIC_JORDAN: return "ar_JO"; case SUBLANG_ARABIC_LEBANON: return "ar_LB"; case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; case SUBLANG_ARABIC_UAE: return "ar_AE"; case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; case SUBLANG_ARABIC_QATAR: return "ar_QA"; } return "ar"; case LANG_ARMENIAN: switch (sub) { case SUBLANG_ARMENIAN_ARMENIA: return "hy_AM"; } return "hy"; case LANG_ASSAMESE: switch (sub) { case SUBLANG_ASSAMESE_INDIA: return "as_IN"; } return "as"; case LANG_AZERI: switch (sub) { /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ case 0x1e: return "az@latin"; case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; case 0x1d: return "az@cyrillic"; case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; } return "az"; case LANG_BASHKIR: switch (sub) { case SUBLANG_BASHKIR_RUSSIA: return "ba_RU"; } return "ba"; case LANG_BASQUE: switch (sub) { case SUBLANG_BASQUE_BASQUE: return "eu_ES"; } return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ case LANG_BELARUSIAN: switch (sub) { case SUBLANG_BELARUSIAN_BELARUS: return "be_BY"; } return "be"; case LANG_BENGALI: switch (sub) { case SUBLANG_BENGALI_INDIA: return "bn_IN"; case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; } return "bn"; case LANG_BRETON: switch (sub) { case SUBLANG_BRETON_FRANCE: return "br_FR"; } return "br"; case LANG_BULGARIAN: switch (sub) { case SUBLANG_BULGARIAN_BULGARIA: return "bg_BG"; } return "bg"; case LANG_BURMESE: switch (sub) { case SUBLANG_DEFAULT: return "my_MM"; } return "my"; case LANG_CAMBODIAN: switch (sub) { case SUBLANG_CAMBODIAN_CAMBODIA: return "km_KH"; } return "km"; case LANG_CATALAN: switch (sub) { case SUBLANG_CATALAN_SPAIN: return "ca_ES"; } return "ca"; case LANG_CHEROKEE: switch (sub) { case SUBLANG_DEFAULT: return "chr_US"; } return "chr"; case LANG_CHINESE: switch (sub) { case SUBLANG_CHINESE_TRADITIONAL: case 0x1f: return "zh_TW"; case SUBLANG_CHINESE_SIMPLIFIED: case 0x00: return "zh_CN"; case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; /* traditional */ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; /* simplified */ case SUBLANG_CHINESE_MACAU: return "zh_MO"; /* traditional */ } return "zh"; case LANG_CORSICAN: switch (sub) { case SUBLANG_CORSICAN_FRANCE: return "co_FR"; } return "co"; case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN * What used to be called Serbo-Croatian * should really now be two separate * languages because of political reasons. * (Says tml, who knows nothing about Serbian * or Croatian.) * (I can feel those flames coming already.) */ switch (sub) { /* Croatian */ case 0x00: return "hr"; case SUBLANG_CROATIAN_CROATIA: return "hr_HR"; case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: return "hr_BA"; /* Serbian */ case 0x1f: return "sr"; case 0x1c: return "sr"; /* latin */ case SUBLANG_SERBIAN_LATIN: return "sr_CS"; /* latin */ case 0x09: return "sr_RS"; /* latin */ case 0x0b: return "sr_ME"; /* latin */ case 0x06: return "sr_BA"; /* latin */ case 0x1b: return "sr@cyrillic"; case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; case 0x0a: return "sr_RS@cyrillic"; case 0x0c: return "sr_ME@cyrillic"; case 0x07: return "sr_BA@cyrillic"; /* Bosnian */ case 0x1e: return "bs"; case 0x1a: return "bs"; /* latin */ case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA"; /* latin */ case 0x19: return "bs@cyrillic"; case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: return "bs_BA@cyrillic"; } return "hr"; case LANG_CZECH: switch (sub) { case SUBLANG_CZECH_CZECH_REPUBLIC: return "cs_CZ"; } return "cs"; case LANG_DANISH: switch (sub) { case SUBLANG_DANISH_DENMARK: return "da_DK"; } return "da"; case LANG_DARI: /* FIXME: Adjust this when such locales appear on Unix. */ switch (sub) { case SUBLANG_DARI_AFGHANISTAN: return "prs_AF"; } return "prs"; case LANG_DIVEHI: switch (sub) { case SUBLANG_DIVEHI_MALDIVES: return "dv_MV"; } return "dv"; case LANG_DUTCH: switch (sub) { case SUBLANG_DUTCH: return "nl_NL"; case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; case SUBLANG_DUTCH_SURINAM: return "nl_SR"; } return "nl"; case LANG_EDO: switch (sub) { case SUBLANG_DEFAULT: return "bin_NG"; } return "bin"; case LANG_ENGLISH: switch (sub) { /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought * English was the language spoken in England. * Oh well. */ case SUBLANG_ENGLISH_US: return "en_US"; case SUBLANG_ENGLISH_UK: return "en_GB"; case SUBLANG_ENGLISH_AUS: return "en_AU"; case SUBLANG_ENGLISH_CAN: return "en_CA"; case SUBLANG_ENGLISH_NZ: return "en_NZ"; case SUBLANG_ENGLISH_EIRE: return "en_IE"; case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; case SUBLANG_ENGLISH_INDIA: return "en_IN"; case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; } return "en"; case LANG_ESTONIAN: switch (sub) { case SUBLANG_ESTONIAN_ESTONIA: return "et_EE"; } return "et"; case LANG_FAEROESE: switch (sub) { case SUBLANG_FAEROESE_FAROE_ISLANDS: return "fo_FO"; } return "fo"; case LANG_FARSI: switch (sub) { case SUBLANG_FARSI_IRAN: return "fa_IR"; } return "fa"; case LANG_FINNISH: switch (sub) { case SUBLANG_FINNISH_FINLAND: return "fi_FI"; } return "fi"; case LANG_FRENCH: switch (sub) { case SUBLANG_FRENCH: return "fr_FR"; case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ case SUBLANG_FRENCH_REUNION: return "fr_RE"; case SUBLANG_FRENCH_CONGO: return "fr_CG"; case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; case SUBLANG_FRENCH_MALI: return "fr_ML"; case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; case SUBLANG_FRENCH_HAITI: return "fr_HT"; } return "fr"; case LANG_FRISIAN: switch (sub) { case SUBLANG_FRISIAN_NETHERLANDS: return "fy_NL"; } return "fy"; case LANG_FULFULDE: /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ switch (sub) { case SUBLANG_DEFAULT: return "ff_NG"; } return "ff"; case LANG_GAELIC: switch (sub) { case 0x01: /* SCOTTISH */ /* old, superseded by LANG_SCOTTISH_GAELIC */ return "gd_GB"; case SUBLANG_IRISH_IRELAND: return "ga_IE"; } return "ga"; case LANG_GALICIAN: switch (sub) { case SUBLANG_GALICIAN_SPAIN: return "gl_ES"; } return "gl"; case LANG_GEORGIAN: switch (sub) { case SUBLANG_GEORGIAN_GEORGIA: return "ka_GE"; } return "ka"; case LANG_GERMAN: switch (sub) { case SUBLANG_GERMAN: return "de_DE"; case SUBLANG_GERMAN_SWISS: return "de_CH"; case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; } return "de"; case LANG_GREEK: switch (sub) { case SUBLANG_GREEK_GREECE: return "el_GR"; } return "el"; case LANG_GREENLANDIC: switch (sub) { case SUBLANG_GREENLANDIC_GREENLAND: return "kl_GL"; } return "kl"; case LANG_GUARANI: switch (sub) { case SUBLANG_DEFAULT: return "gn_PY"; } return "gn"; case LANG_GUJARATI: switch (sub) { case SUBLANG_GUJARATI_INDIA: return "gu_IN"; } return "gu"; case LANG_HAUSA: switch (sub) { case 0x1f: return "ha"; case SUBLANG_HAUSA_NIGERIA_LATIN: return "ha_NG"; } return "ha"; case LANG_HAWAIIAN: /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) or Hawaii Creole English ("cpe_US", 600000 speakers)? */ switch (sub) { case SUBLANG_DEFAULT: return "cpe_US"; } return "cpe"; case LANG_HEBREW: switch (sub) { case SUBLANG_HEBREW_ISRAEL: return "he_IL"; } return "he"; case LANG_HINDI: switch (sub) { case SUBLANG_HINDI_INDIA: return "hi_IN"; } return "hi"; case LANG_HUNGARIAN: switch (sub) { case SUBLANG_HUNGARIAN_HUNGARY: return "hu_HU"; } return "hu"; case LANG_IBIBIO: switch (sub) { case SUBLANG_DEFAULT: return "nic_NG"; } return "nic"; case LANG_ICELANDIC: switch (sub) { case SUBLANG_ICELANDIC_ICELAND: return "is_IS"; } return "is"; case LANG_IGBO: switch (sub) { case SUBLANG_IGBO_NIGERIA: return "ig_NG"; } return "ig"; case LANG_INDONESIAN: switch (sub) { case SUBLANG_INDONESIAN_INDONESIA: return "id_ID"; } return "id"; case LANG_INUKTITUT: switch (sub) { case 0x1e: return "iu"; /* syllabic */ case SUBLANG_INUKTITUT_CANADA: return "iu_CA"; /* syllabic */ case 0x1f: return "iu@latin"; case SUBLANG_INUKTITUT_CANADA_LATIN: return "iu_CA@latin"; } return "iu"; case LANG_ITALIAN: switch (sub) { case SUBLANG_ITALIAN: return "it_IT"; case SUBLANG_ITALIAN_SWISS: return "it_CH"; } return "it"; case LANG_JAPANESE: switch (sub) { case SUBLANG_JAPANESE_JAPAN: return "ja_JP"; } return "ja"; case LANG_KANNADA: switch (sub) { case SUBLANG_KANNADA_INDIA: return "kn_IN"; } return "kn"; case LANG_KANURI: switch (sub) { case SUBLANG_DEFAULT: return "kr_NG"; } return "kr"; case LANG_KASHMIRI: switch (sub) { case SUBLANG_DEFAULT: return "ks_PK"; case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; } return "ks"; case LANG_KAZAK: switch (sub) { case SUBLANG_KAZAK_KAZAKHSTAN: return "kk_KZ"; } return "kk"; case LANG_KICHE: /* FIXME: Adjust this when such locales appear on Unix. */ switch (sub) { case SUBLANG_KICHE_GUATEMALA: return "qut_GT"; } return "qut"; case LANG_KINYARWANDA: switch (sub) { case SUBLANG_KINYARWANDA_RWANDA: return "rw_RW"; } return "rw"; case LANG_KONKANI: /* FIXME: Adjust this when such locales appear on Unix. */ switch (sub) { case SUBLANG_KONKANI_INDIA: return "kok_IN"; } return "kok"; case LANG_KOREAN: switch (sub) { case SUBLANG_DEFAULT: return "ko_KR"; } return "ko"; case LANG_KYRGYZ: switch (sub) { case SUBLANG_KYRGYZ_KYRGYZSTAN: return "ky_KG"; } return "ky"; case LANG_LAO: switch (sub) { case SUBLANG_LAO_LAOS: return "lo_LA"; } return "lo"; case LANG_LATIN: switch (sub) { case SUBLANG_DEFAULT: return "la_VA"; } return "la"; case LANG_LATVIAN: switch (sub) { case SUBLANG_LATVIAN_LATVIA: return "lv_LV"; } return "lv"; case LANG_LITHUANIAN: switch (sub) { case SUBLANG_LITHUANIAN_LITHUANIA: return "lt_LT"; } return "lt"; case LANG_LUXEMBOURGISH: switch (sub) { case SUBLANG_LUXEMBOURGISH_LUXEMBOURG: return "lb_LU"; } return "lb"; case LANG_MACEDONIAN: switch (sub) { case SUBLANG_MACEDONIAN_MACEDONIA: return "mk_MK"; } return "mk"; case LANG_MALAY: switch (sub) { case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; } return "ms"; case LANG_MALAYALAM: switch (sub) { case SUBLANG_MALAYALAM_INDIA: return "ml_IN"; } return "ml"; case LANG_MALTESE: switch (sub) { case SUBLANG_MALTESE_MALTA: return "mt_MT"; } return "mt"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ switch (sub) { case SUBLANG_DEFAULT: return "mni_IN"; } return "mni"; case LANG_MAORI: switch (sub) { case SUBLANG_MAORI_NEW_ZEALAND: return "mi_NZ"; } return "mi"; case LANG_MAPUDUNGUN: switch (sub) { case SUBLANG_MAPUDUNGUN_CHILE: return "arn_CL"; } return "arn"; case LANG_MARATHI: switch (sub) { case SUBLANG_MARATHI_INDIA: return "mr_IN"; } return "mr"; case LANG_MOHAWK: switch (sub) { case SUBLANG_MOHAWK_CANADA: return "moh_CA"; } return "moh"; case LANG_MONGOLIAN: switch (sub) { case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: case 0x1e: return "mn_MN"; case SUBLANG_MONGOLIAN_PRC: case 0x1f: return "mn_CN"; } return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ case LANG_NEPALI: switch (sub) { case SUBLANG_NEPALI_NEPAL: return "ne_NP"; case SUBLANG_NEPALI_INDIA: return "ne_IN"; } return "ne"; case LANG_NORWEGIAN: switch (sub) { case 0x1f: return "nb"; case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO"; case 0x1e: return "nn"; case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; } return "no"; case LANG_OCCITAN: switch (sub) { case SUBLANG_OCCITAN_FRANCE: return "oc_FR"; } return "oc"; case LANG_ORIYA: switch (sub) { case SUBLANG_ORIYA_INDIA: return "or_IN"; } return "or"; case LANG_OROMO: switch (sub) { case SUBLANG_DEFAULT: return "om_ET"; } return "om"; case LANG_PAPIAMENTU: switch (sub) { case SUBLANG_DEFAULT: return "pap_AN"; } return "pap"; case LANG_PASHTO: switch (sub) { case SUBLANG_PASHTO_AFGHANISTAN: return "ps_AF"; } return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: switch (sub) { case SUBLANG_POLISH_POLAND: return "pl_PL"; } return "pl"; case LANG_PORTUGUESE: switch (sub) { /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; case SUBLANG_PORTUGUESE: return "pt_PT"; } return "pt"; case LANG_PUNJABI: switch (sub) { case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ } return "pa"; case LANG_QUECHUA: /* Note: Microsoft uses the non-ISO language code "quz". */ switch (sub) { case SUBLANG_QUECHUA_BOLIVIA: return "qu_BO"; case SUBLANG_QUECHUA_ECUADOR: return "qu_EC"; case SUBLANG_QUECHUA_PERU: return "qu_PE"; } return "qu"; case LANG_ROMANIAN: switch (sub) { case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; } return "ro"; case LANG_ROMANSH: switch (sub) { case SUBLANG_ROMANSH_SWITZERLAND: return "rm_CH"; } return "rm"; case LANG_RUSSIAN: switch (sub) { case SUBLANG_RUSSIAN_RUSSIA: return "ru_RU"; case SUBLANG_RUSSIAN_MOLDAVIA: return "ru_MD"; } return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ case LANG_SAMI: switch (sub) { /* Northern Sami */ case 0x00: return "se"; case SUBLANG_SAMI_NORTHERN_NORWAY: return "se_NO"; case SUBLANG_SAMI_NORTHERN_SWEDEN: return "se_SE"; case SUBLANG_SAMI_NORTHERN_FINLAND: return "se_FI"; /* Lule Sami */ case 0x1f: return "smj"; case SUBLANG_SAMI_LULE_NORWAY: return "smj_NO"; case SUBLANG_SAMI_LULE_SWEDEN: return "smj_SE"; /* Southern Sami */ case 0x1e: return "sma"; case SUBLANG_SAMI_SOUTHERN_NORWAY: return "sma_NO"; case SUBLANG_SAMI_SOUTHERN_SWEDEN: return "sma_SE"; /* Skolt Sami */ case 0x1d: return "sms"; case SUBLANG_SAMI_SKOLT_FINLAND: return "sms_FI"; /* Inari Sami */ case 0x1c: return "smn"; case SUBLANG_SAMI_INARI_FINLAND: return "smn_FI"; } return "se"; /* or "smi"? */ case LANG_SANSKRIT: switch (sub) { case SUBLANG_SANSKRIT_INDIA: return "sa_IN"; } return "sa"; case LANG_SCOTTISH_GAELIC: switch (sub) { case SUBLANG_DEFAULT: return "gd_GB"; } return "gd"; case LANG_SINDHI: switch (sub) { case SUBLANG_SINDHI_INDIA: return "sd_IN"; case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; /*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/ } return "sd"; case LANG_SINHALESE: switch (sub) { case SUBLANG_SINHALESE_SRI_LANKA: return "si_LK"; } return "si"; case LANG_SLOVAK: switch (sub) { case SUBLANG_SLOVAK_SLOVAKIA: return "sk_SK"; } return "sk"; case LANG_SLOVENIAN: switch (sub) { case SUBLANG_SLOVENIAN_SLOVENIA: return "sl_SI"; } return "sl"; case LANG_SOMALI: switch (sub) { case SUBLANG_DEFAULT: return "so_SO"; } return "so"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ switch (sub) { /* Upper Sorbian */ case 0x00: return "hsb"; case SUBLANG_UPPER_SORBIAN_GERMANY: return "hsb_DE"; /* Lower Sorbian */ case 0x1f: return "dsb"; case SUBLANG_LOWER_SORBIAN_GERMANY: return "dsb_DE"; } return "wen"; case LANG_SOTHO: /* <http://www.microsoft.com/globaldev/reference/lcid-all.mspx> calls it "Sepedi"; according to <http://www.ethnologue.com/show_language.asp?code=nso> <http://www.ethnologue.com/show_language.asp?code=sot> it's the same as Northern Sotho. */ switch (sub) { case SUBLANG_SOTHO_SOUTH_AFRICA: return "nso_ZA"; } return "nso"; case LANG_SPANISH: switch (sub) { case SUBLANG_SPANISH: return "es_ES"; case SUBLANG_SPANISH_MEXICAN: return "es_MX"; case SUBLANG_SPANISH_MODERN: return "es_ES@modern"; /* not seen on Unix */ case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; case SUBLANG_SPANISH_PANAMA: return "es_PA"; case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; case SUBLANG_SPANISH_PERU: return "es_PE"; case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; case SUBLANG_SPANISH_ECUADOR: return "es_EC"; case SUBLANG_SPANISH_CHILE: return "es_CL"; case SUBLANG_SPANISH_URUGUAY: return "es_UY"; case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; case SUBLANG_SPANISH_HONDURAS: return "es_HN"; case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; case SUBLANG_SPANISH_US: return "es_US"; } return "es"; case LANG_SUTU: switch (sub) { case SUBLANG_DEFAULT: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ } return "bnt"; case LANG_SWAHILI: switch (sub) { case SUBLANG_SWAHILI_KENYA: return "sw_KE"; } return "sw"; case LANG_SWEDISH: switch (sub) { case SUBLANG_SWEDISH_SWEDEN: return "sv_SE"; case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; } return "sv"; case LANG_SYRIAC: switch (sub) { case SUBLANG_SYRIAC_SYRIA: return "syr_SY"; /* An extinct language. */ } return "syr"; case LANG_TAGALOG: switch (sub) { case SUBLANG_TAGALOG_PHILIPPINES: return "tl_PH"; /* or "fil_PH"? */ } return "tl"; /* or "fil"? */ case LANG_TAJIK: switch (sub) { case 0x1f: return "tg"; case SUBLANG_TAJIK_TAJIKISTAN: return "tg_TJ"; } return "tg"; case LANG_TAMAZIGHT: /* Note: Microsoft uses the non-ISO language code "tmz". */ switch (sub) { /* FIXME: Adjust this when Tamazight locales appear on Unix. */ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; case 0x1f: return "ber@latin"; case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin"; } return "ber"; case LANG_TAMIL: switch (sub) { case SUBLANG_TAMIL_INDIA: return "ta_IN"; } return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ case LANG_TATAR: switch (sub) { case SUBLANG_TATAR_RUSSIA: return "tt_RU"; } return "tt"; case LANG_TELUGU: switch (sub) { case SUBLANG_TELUGU_INDIA: return "te_IN"; } return "te"; case LANG_THAI: switch (sub) { case SUBLANG_THAI_THAILAND: return "th_TH"; } return "th"; case LANG_TIBETAN: switch (sub) { case SUBLANG_TIBETAN_PRC: /* Most Tibetans would not like "bo_CN". But Tibet does not yet have a country code of its own. */ return "bo"; case SUBLANG_TIBETAN_BHUTAN: return "bo_BT"; } return "bo"; case LANG_TIGRINYA: switch (sub) { case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; } return "ti"; case LANG_TSONGA: switch (sub) { case SUBLANG_DEFAULT: return "ts_ZA"; } return "ts"; case LANG_TSWANA: /* Spoken in South Africa, Botswana. */ switch (sub) { case SUBLANG_TSWANA_SOUTH_AFRICA: return "tn_ZA"; } return "tn"; case LANG_TURKISH: switch (sub) { case SUBLANG_TURKISH_TURKEY: return "tr_TR"; } return "tr"; case LANG_TURKMEN: switch (sub) { case SUBLANG_TURKMEN_TURKMENISTAN: return "tk_TM"; } return "tk"; case LANG_UIGHUR: switch (sub) { case SUBLANG_UIGHUR_PRC: return "ug_CN"; } return "ug"; case LANG_UKRAINIAN: switch (sub) { case SUBLANG_UKRAINIAN_UKRAINE: return "uk_UA"; } return "uk"; case LANG_URDU: switch (sub) { case SUBLANG_URDU_PAKISTAN: return "ur_PK"; case SUBLANG_URDU_INDIA: return "ur_IN"; } return "ur"; case LANG_UZBEK: switch (sub) { case 0x1f: return "uz"; case SUBLANG_UZBEK_LATIN: return "uz_UZ"; case 0x1e: return "uz@cyrillic"; case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; case LANG_VENDA: switch (sub) { case SUBLANG_DEFAULT: return "ve_ZA"; } return "ve"; case LANG_VIETNAMESE: switch (sub) { case SUBLANG_VIETNAMESE_VIETNAM: return "vi_VN"; } return "vi"; case LANG_WELSH: switch (sub) { case SUBLANG_WELSH_UNITED_KINGDOM: return "cy_GB"; } return "cy"; case LANG_WOLOF: switch (sub) { case SUBLANG_WOLOF_SENEGAL: return "wo_SN"; } return "wo"; case LANG_XHOSA: switch (sub) { case SUBLANG_XHOSA_SOUTH_AFRICA: return "xh_ZA"; } return "xh"; case LANG_YAKUT: switch (sub) { case SUBLANG_YAKUT_RUSSIA: return "sah_RU"; } return "sah"; case LANG_YI: switch (sub) { case SUBLANG_YI_PRC: return "ii_CN"; } return "ii"; case LANG_YIDDISH: switch (sub) { case SUBLANG_DEFAULT: return "yi_IL"; } return "yi"; case LANG_YORUBA: switch (sub) { case SUBLANG_YORUBA_NIGERIA: return "yo_NG"; } return "yo"; case LANG_ZULU: switch (sub) { case SUBLANG_ZULU_SOUTH_AFRICA: return "zu_ZA"; } return "zu"; default: return "C"; } } } # if !defined IN_LIBINTL static # endif const char * gl_locale_name_from_win32_LCID (LCID lcid) { LANGID langid; /* Strip off the sorting rules, keep only the language part. */ langid = LANGIDFROMLCID (lcid); return gl_locale_name_from_win32_LANGID (langid); } #endif #if HAVE_USELOCALE /* glibc or MacOS X */ /* Simple hash set of strings. We don't want to drag in lots of hash table code here. */ # define SIZE_BITS (sizeof (size_t) * CHAR_BIT) /* A hash function for NUL-terminated char* strings using the method described by Bruno Haible. See http://www.haible.de/bruno/hashfunc.html. */ static size_t string_hash (const void *x) { const char *s = (const char *) x; size_t h = 0; for (; *s; s++) h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); return h; } /* A hash table of fixed size. Multiple threads can access it read-only simultaneously, but only one thread can insert into it at the same time. */ /* A node in a hash bucket collision list. */ struct hash_node { struct hash_node * volatile next; char contents[100]; /* has variable size */ }; # define HASH_TABLE_SIZE 257 static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE] /* = { NULL, ..., NULL } */; /* This lock protects the struniq_hash_table against multiple simultaneous insertions. */ gl_lock_define_initialized(static, struniq_lock) /* Store a copy of the given string in a string pool with indefinite extent. Return a pointer to this copy. */ static const char * struniq (const char *string) { size_t hashcode = string_hash (string); size_t slot = hashcode % HASH_TABLE_SIZE; size_t size; struct hash_node *new_node; struct hash_node *p; for (p = struniq_hash_table[slot]; p != NULL; p = p->next) if (strcmp (p->contents, string) == 0) return p->contents; size = strlen (string) + 1; new_node = (struct hash_node *) malloc (offsetof (struct hash_node, contents[0]) + size); if (new_node == NULL) /* Out of memory. Return a statically allocated string. */ return "C"; memcpy (new_node->contents, string, size); /* Lock while inserting new_node. */ gl_lock_lock (struniq_lock); /* Check whether another thread already added the string while we were waiting on the lock. */ for (p = struniq_hash_table[slot]; p != NULL; p = p->next) if (strcmp (p->contents, string) == 0) { free (new_node); new_node = p; goto done; } /* Really insert new_node into the hash table. Fill new_node entirely first, because other threads may be iterating over the linked list. */ new_node->next = struniq_hash_table[slot]; struniq_hash_table[slot] = new_node; done: /* Unlock after new_node is inserted. */ gl_lock_unlock (struniq_lock); return new_node->contents; } #endif #if defined IN_LIBINTL || HAVE_USELOCALE /* Like gl_locale_name_thread, except that the result is not in storage of indefinite extent. */ # if !defined IN_LIBINTL static # endif const char * gl_locale_name_thread_unsafe (int category, const char *categoryname) { # if HAVE_USELOCALE { locale_t thread_locale = uselocale (NULL); if (thread_locale != LC_GLOBAL_LOCALE) { # if __GLIBC__ >= 2 && !defined __UCLIBC__ /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in glibc < 2.12. See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */ const char *name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); if (name[0] == '\0') /* Fallback code for glibc < 2.4, which did not implement nl_langinfo (_NL_LOCALE_NAME (category)). */ name = thread_locale->__names[category]; return name; # endif # if defined __APPLE__ && defined __MACH__ /* MacOS X */ /* The locale name is found deep in an undocumented data structure. Since it's stored in a buffer of size 32 and newlocale() rejects locale names of length > 31, we can assume that it is NUL terminated in this buffer. But we need to make a copy of the locale name, of indefinite extent. */ struct _xlocale_part1_v0 /* used in MacOS X 10.5 */ { int32_t __refcount; void (*__free_extra)(void *); __darwin_mbstate_t __mbs[10]; int64_t __magic; }; struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */ { int32_t __refcount; void (*__free_extra)(void *); __darwin_mbstate_t __mbs[10]; /*pthread_lock_t*/ int __lock; int64_t __magic; }; struct _xlocale_part2 { int64_t __magic; unsigned char __collate_load_error; unsigned char __collate_substitute_nontrivial; unsigned char _messages_using_locale; unsigned char _monetary_using_locale; unsigned char _numeric_using_locale; unsigned char _time_using_locale; unsigned char __mlocale_changed; unsigned char __nlocale_changed; unsigned char __numeric_fp_cvt; struct __xlocale_st_collate *__lc_collate; struct __xlocale_st_runelocale *__lc_ctype; struct __xlocale_st_messages *__lc_messages; struct __xlocale_st_monetary *__lc_monetary; struct __xlocale_st_numeric *__lc_numeric; struct _xlocale *__lc_numeric_loc; struct __xlocale_st_time *__lc_time; /* more */ }; struct __xlocale_st_collate { int32_t __refcount; void (*__free_extra)(void *); char __encoding[32]; /* more */ }; struct __xlocale_st_runelocale { int32_t __refcount; void (*__free_extra)(void *); char __ctype_encoding[32]; /* more */ }; struct __xlocale_st_messages { int32_t __refcount; void (*__free_extra)(void *); char *_messages_locale_buf; /* more */ }; struct __xlocale_st_monetary { int32_t __refcount; void (*__free_extra)(void *); char *_monetary_locale_buf; /* more */ }; struct __xlocale_st_numeric { int32_t __refcount; void (*__free_extra)(void *); char *_numeric_locale_buf; /* more */ }; struct __xlocale_st_time { int32_t __refcount; void (*__free_extra)(void *); char *_time_locale_buf; /* more */ }; struct _xlocale_part2 *tlp; if (((struct _xlocale_part1_v0 *) thread_locale)->__magic == 0x786C6F63616C6530LL) /* MacOS X 10.5 */ tlp = (struct _xlocale_part2 *) &((struct _xlocale_part1_v0 *) thread_locale)->__magic; else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic == 0x786C6F63616C6530LL) /* MacOS X >= 10.6.0 */ tlp = (struct _xlocale_part2 *) &((struct _xlocale_part1_v1 *) thread_locale)->__magic; else /* Unsupported version of MacOS X: The internals of 'struct _xlocale' have changed again. */ return ""; switch (category) { case LC_CTYPE: return tlp->__lc_ctype->__ctype_encoding; case LC_NUMERIC: return tlp->_numeric_using_locale ? tlp->__lc_numeric->_numeric_locale_buf : "C"; case LC_TIME: return tlp->_time_using_locale ? tlp->__lc_time->_time_locale_buf : "C"; case LC_COLLATE: return !tlp->__collate_load_error ? tlp->__lc_collate->__encoding : "C"; case LC_MONETARY: return tlp->_monetary_using_locale ? tlp->__lc_monetary->_monetary_locale_buf : "C"; case LC_MESSAGES: return tlp->_messages_using_locale ? tlp->__lc_messages->_messages_locale_buf : "C"; default: /* We shouldn't get here. */ return ""; } # endif } } # endif return NULL; } #endif const char * gl_locale_name_thread (int category, const char *categoryname) { #if HAVE_USELOCALE const char *name = gl_locale_name_thread_unsafe (category, categoryname); if (name != NULL) return struniq (name); #endif return NULL; } /* XPG3 defines the result of 'setlocale (category, NULL)' as: "Directs 'setlocale()' to query 'category' and return the current setting of 'local'." However it does not specify the exact format. Neither do SUSV2 and ISO C 99. So we can use this feature only on selected systems (e.g. those using GNU C Library). */ #if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) # define HAVE_LOCALE_NULL #endif const char * gl_locale_name_posix (int category, const char *categoryname) { /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. On some systems this can be done by the 'setlocale' function itself. */ #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL return setlocale (category, NULL); #else /* On other systems we ignore what setlocale reports and instead look at the environment variables directly. This is necessary 1. on systems which have a facility for customizing the default locale (MacOS X, native Windows, Cygwin) and where the system's setlocale() function ignores this default locale (MacOS X, Cygwin), in two cases: a. when the user missed to use the setlocale() override from libintl (for example by not including <libintl.h>), b. when setlocale supports only the "C" locale, such as on Cygwin 1.5.x. In this case even the override from libintl cannot help. 2. on all systems where setlocale supports only the "C" locale. */ /* Strictly speaking, it is a POSIX violation to look at the environment variables regardless whether setlocale has been called or not. POSIX says: "For C-language programs, the POSIX locale shall be the default locale when the setlocale() function is not called." But we assume that all programs that use internationalized APIs call setlocale (LC_ALL, ""). */ return gl_locale_name_environ (category, categoryname); #endif } const char * gl_locale_name_environ (int category, const char *categoryname) { const char *retval; /* Setting of LC_ALL overrides all other. */ retval = getenv ("LC_ALL"); if (retval != NULL && retval[0] != '\0') return retval; /* Next comes the name of the desired category. */ retval = getenv (categoryname); if (retval != NULL && retval[0] != '\0') return retval; /* Last possibility is the LANG environment variable. */ retval = getenv ("LANG"); if (retval != NULL && retval[0] != '\0') { #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer. Ignore invalid LANG value set by the Terminal application. */ if (strcmp (retval, "UTF-8") != 0) #endif #if defined __CYGWIN__ /* Cygwin. Ignore dummy LANG value set by ~/.profile. */ if (strcmp (retval, "C.UTF-8") != 0) #endif return retval; } return NULL; } const char * gl_locale_name_default (void) { /* POSIX:2001 says: "All implementations shall define a locale as the default locale, to be invoked when no environment variables are set, or set to the empty string. This default locale can be the POSIX locale or any other implementation-defined locale. Some implementations may provide facilities for local installation administrators to set the default locale, customizing it for each location. POSIX:2001 does not require such a facility. The systems with such a facility are MacOS X and Windows: They provide a GUI that allows the user to choose a locale. - On MacOS X, by default, none of LC_* or LANG are set. Starting with MacOS X 10.4 or 10.5, LANG is set for processes launched by the 'Terminal' application (but sometimes to an incorrect value "UTF-8"). When no environment variable is set, setlocale (LC_ALL, "") uses the "C" locale. - On native Windows, by default, none of LC_* or LANG are set. When no environment variable is set, setlocale (LC_ALL, "") uses the locale chosen by the user. - On Cygwin 1.5.x, by default, none of LC_* or LANG are set. When no environment variable is set, setlocale (LC_ALL, "") uses the "C" locale. - On Cygwin 1.7, by default, LANG is set to "C.UTF-8" when the default ~/.profile is executed. When no environment variable is set, setlocale (LC_ALL, "") uses the "C.UTF-8" locale, which operates in the same way as the "C" locale. */ #if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__) /* The system does not have a way of setting the locale, other than the POSIX specified environment variables. We use C as default locale. */ return "C"; #else /* Return an XPG style locale name language[_territory][@modifier]. Don't even bother determining the codeset; it's not useful in this context, because message catalogs are not specific to a single codeset. */ # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ { /* Cache the locale name, since CoreFoundation calls are expensive. */ static const char *cached_localename; if (cached_localename == NULL) { char namebuf[256]; # if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */ CFLocaleRef locale = CFLocaleCopyCurrent (); CFStringRef name = CFLocaleGetIdentifier (locale); if (CFStringGetCString (name, namebuf, sizeof (namebuf), kCFStringEncodingASCII)) { gl_locale_name_canonicalize (namebuf); cached_localename = strdup (namebuf); } CFRelease (locale); # elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ CFTypeRef value = CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), kCFPreferencesCurrentApplication); if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID () && CFStringGetCString ((CFStringRef)value, namebuf, sizeof (namebuf), kCFStringEncodingASCII)) { gl_locale_name_canonicalize (namebuf); cached_localename = strdup (namebuf); } # endif if (cached_localename == NULL) cached_localename = "C"; } return cached_localename; } # endif # if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ { LCID lcid; /* Use native Windows API locale ID. */ lcid = GetThreadLocale (); return gl_locale_name_from_win32_LCID (lcid); } # endif #endif } /* Determine the current locale's name, and canonicalize it into XPG syntax language[_territory][.codeset][@modifier] The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ const char * gl_locale_name (int category, const char *categoryname) { const char *retval; retval = gl_locale_name_thread (category, categoryname); if (retval != NULL) return retval; retval = gl_locale_name_posix (category, categoryname); if (retval != NULL) return retval; return gl_locale_name_default (); } ����������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseek2.sh������������������������������������������������0000775�0000000�0000000�00000000105�12166360012�016507� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh exec ./test-fseek${EXEEXT} 1 2 < "$srcdir/test-fseek2.sh" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsrtowcs.c����������������������������������������������0000664�0000000�0000000�00000023054�12166360012�017170� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of string to wide string. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t, mbstate_t *)); #include <locale.h> #include <stdio.h> #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { mbstate_t state; wchar_t wc; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Test NUL byte input. */ { const char *src; memset (&state, '\0', sizeof (mbstate_t)); src = ""; ret = mbsrtowcs (NULL, &src, 0, &state); ASSERT (ret == 0); ASSERT (mbsinit (&state)); src = ""; ret = mbsrtowcs (NULL, &src, 1, &state); ASSERT (ret == 0); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; src = ""; ret = mbsrtowcs (&wc, &src, 0, &state); ASSERT (ret == 0); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; src = ""; ret = mbsrtowcs (&wc, &src, 1, &state); ASSERT (ret == 0); ASSERT (wc == 0); ASSERT (mbsinit (&state)); } if (argc > 1) { int unlimited; for (unlimited = 0; unlimited < 2; unlimited++) { #define BUFSIZE 10 wchar_t buf[BUFSIZE]; const char *src; mbstate_t temp_state; { size_t i; for (i = 0; i < BUFSIZE; i++) buf[i] = (wchar_t) 0xBADFACE; } switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { char input[] = "B\374\337er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\374'); ASSERT (mbsinit (&state)); input[1] = '\0'; src = input + 2; temp_state = state; ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 1, &temp_state); ASSERT (ret == 3); ASSERT (src == input + 2); ASSERT (mbsinit (&state)); src = input + 2; ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 1, &state); ASSERT (ret == (unlimited ? 3 : 1)); ASSERT (src == (unlimited ? NULL : input + 3)); ASSERT (wctob (buf[0]) == (unsigned char) '\337'); if (unlimited) { ASSERT (buf[1] == 'e'); ASSERT (buf[2] == 'r'); ASSERT (buf[3] == 0); ASSERT (buf[4] == (wchar_t) 0xBADFACE); } else ASSERT (buf[1] == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } break; case '2': /* Locale encoding is UTF-8. */ { char input[] = "B\303\274\303\237er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; src = input + 2; temp_state = state; ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); ASSERT (ret == 4); ASSERT (src == input + 2); ASSERT (!mbsinit (&state)); src = input + 2; ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); ASSERT (ret == (unlimited ? 4 : 2)); ASSERT (src == (unlimited ? NULL : input + 5)); ASSERT (wctob (buf[0]) == EOF); ASSERT (wctob (buf[1]) == EOF); if (unlimited) { ASSERT (buf[2] == 'e'); ASSERT (buf[3] == 'r'); ASSERT (buf[4] == 0); ASSERT (buf[5] == (wchar_t) 0xBADFACE); } else ASSERT (buf[2] == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } break; case '3': /* Locale encoding is EUC-JP. */ { char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; src = input + 4; temp_state = state; ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); ASSERT (ret == 3); ASSERT (src == input + 4); ASSERT (!mbsinit (&state)); src = input + 4; ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); ASSERT (ret == (unlimited ? 3 : 2)); ASSERT (src == (unlimited ? NULL : input + 7)); ASSERT (wctob (buf[0]) == EOF); ASSERT (wctob (buf[1]) == EOF); if (unlimited) { ASSERT (buf[2] == '>'); ASSERT (buf[3] == 0); ASSERT (buf[4] == (wchar_t) 0xBADFACE); } else ASSERT (buf[2] == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } break; case '4': /* Locale encoding is GB18030. */ { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; src = input + 2; temp_state = state; ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); ASSERT (ret == 4); ASSERT (src == input + 2); ASSERT (!mbsinit (&state)); src = input + 2; ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); ASSERT (ret == (unlimited ? 4 : 2)); ASSERT (src == (unlimited ? NULL : input + 7)); ASSERT (wctob (buf[0]) == EOF); ASSERT (wctob (buf[1]) == EOF); if (unlimited) { ASSERT (buf[2] == 'e'); ASSERT (buf[3] == 'r'); ASSERT (buf[4] == 0); ASSERT (buf[5] == (wchar_t) 0xBADFACE); } else ASSERT (buf[2] == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } break; default: return 1; } } return 0; } return 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix.c�������������������������������������������0000664�0000000�0000000�00000003234�12166360012�017605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible printf() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (printf, int, (char const *, ...)); #include <stddef.h> #include <stdint.h> #include <string.h> #include "macros.h" #include "test-printf-posix.h" int main (int argc, char *argv[]) { test_function (printf); return 0; } /* Test whether __attribute__ (__format__ (...)) still works. */ #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !defined __STRICT_ANSI__ extern int func1 (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int func2 (char *, size_t, const char *, ...) __attribute__ ((__format__ (printf, 3, 4))); extern int func3 (char *, size_t, const char *, ...) __attribute__ ((format (__printf__, 3, 4))); extern int func4 (char *, size_t, const char *, ...) __attribute__ ((format (printf, 3, 4))); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fdopen.c�������������������������������������������������0000664�0000000�0000000�00000002413�12166360012�016414� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test opening a stream with a file descriptor. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fdopen, FILE *, (int, const char *)); #include <errno.h> #include "macros.h" int main (void) { /* Test behaviour for invalid file descriptors. */ { FILE *fp; errno = 0; fp = fdopen (-1, "r"); if (fp == NULL) ASSERT (errno == EBADF); else fclose (fp); } { FILE *fp; errno = 0; fp = fdopen (99, "r"); if (fp == NULL) ASSERT (errno == EBADF); else fclose (fp); } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sys_ioctl.c����������������������������������������������0000664�0000000�0000000�00000001550�12166360012�017152� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <sys/ioctl.h> substitute. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <sys/ioctl.h> int main (void) { return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/minus-zero.h��������������������������������������������������0000664�0000000�0000000�00000004522�12166360012�016304� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Macros for floating-point negative zero. Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ /* Keep in sync with m4/minus-zero.m4! */ #include <float.h> /* minus_zerof represents the value -0.0f. */ /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f. ICC 10.0 has a bug when optimizing the expression -zero. The expression -FLT_MIN * FLT_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static float compute_minus_zerof (void) { return -FLT_MIN * FLT_MIN; } # define minus_zerof compute_minus_zerof () #else float minus_zerof = -0.0f; #endif /* minus_zerod represents the value -0.0. */ /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zerod (void) { return -DBL_MIN * DBL_MIN; } # define minus_zerod compute_minus_zerod () #else double minus_zerod = -0.0; #endif /* minus_zerol represents the value -0.0L. */ /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L. IRIX cc can't put -0.0L into .data, but can compute at runtime. ICC 10.0 has a bug when optimizing the expression -zero. The expression -LDBL_MIN * LDBL_MIN does not work when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static long double compute_minus_zerol (void) { return -LDBL_MIN * LDBL_MIN; } # define minus_zerol compute_minus_zerol () #else long double minus_zerol = -0.0L; #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc4.sh����������������������������������������������0000775�0000000�0000000�00000000602�11433657032�017102� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific GB18030 locale is installed. : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_ZH_CN = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no transitional chinese locale is installed" else echo "Skipping test: no transitional chinese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_ZH_CN \ ./test-mbrtowc${EXEEXT} 4 ������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc3.sh����������������������������������������������0000775�0000000�0000000�00000000560�11433657032�017104� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific EUC-JP locale is installed. : ${LOCALE_JA=ja_JP} if test $LOCALE_JA = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional japanese locale is installed" else echo "Skipping test: no traditional japanese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_JA \ ./test-mbrtowc${EXEEXT} 3 ������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello4.sh�����������������������������������������������0000775�0000000�0000000�00000000117�12166360012�016704� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-ftello4${EXEEXT} "$srcdir/test-ftello4.sh" || exit 1 exit 0 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-langinfo.c�����������������������������������������������0000664�0000000�0000000�00000003571�12166360012�016744� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <langinfo.h> substitute. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <config.h> #include <langinfo.h> /* Check that all the nl_item values are defined. */ int items[] = { /* nl_langinfo items of the LC_CTYPE category */ CODESET, /* nl_langinfo items of the LC_NUMERIC category */ RADIXCHAR, THOUSEP, /* nl_langinfo items of the LC_TIME category */ D_T_FMT, D_FMT, T_FMT, T_FMT_AMPM, AM_STR, PM_STR, DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7, ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7, MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, MON_11, MON_12, ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12, ERA, ERA_D_FMT, ERA_D_T_FMT, ERA_T_FMT, ALT_DIGITS, /* nl_langinfo items of the LC_MONETARY category */ CRNCYSTR, /* nl_langinfo items of the LC_MESSAGES category */ YESEXPR, NOEXPR }; int main (void) { return 0; } ���������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fcntl.c��������������������������������������������������0000664�0000000�0000000�00000023515�12166360012�016255� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fcntl(2). Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> /* Specification. */ #include <fcntl.h> #include "signature.h" SIGNATURE_CHECK (fcntl, int, (int, int, ...)); /* Helpers. */ #include <errno.h> #include <stdarg.h> #include <stdbool.h> #include <unistd.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" #endif #include "binary-io.h" #include "macros.h" #if !O_BINARY # define setmode(f,m) zero () static int zero (void) { return 0; } #endif /* Return true if FD is open. */ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; #else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); #endif } /* Return true if FD is open and inheritable across exec/spawn. */ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) return false; return (flags & HANDLE_FLAG_INHERIT) != 0; #else # ifndef F_GETFD # error Please port fcntl to your platform # endif int i = fcntl (fd, F_GETFD); return 0 <= i && (i & FD_CLOEXEC) == 0; #endif } /* Return non-zero if FD is open in the given MODE, which is either O_TEXT or O_BINARY. */ static bool is_mode (int fd, int mode) { int value = setmode (fd, O_BINARY); setmode (fd, value); return mode == value; } /* Since native fcntl can have more supported operations than our replacement is aware of, and since various operations assign different types to the vararg argument, a wrapper around fcntl must be able to pass a vararg of unknown type on through to the original fcntl. Make sure that this works properly: func1 behaves like the original fcntl interpreting the vararg as an int or a pointer to a struct, and func2 behaves like rpl_fcntl that doesn't know what type to forward. */ struct dummy_struct { long filler; int value; }; static int func1 (int a, ...) { va_list arg; int i; va_start (arg, a); if (a < 4) i = va_arg (arg, int); else { struct dummy_struct *s = va_arg (arg, struct dummy_struct *); i = s->value; } va_end (arg); return i; } static int func2 (int a, ...) { va_list arg; void *p; va_start (arg, a); p = va_arg (arg, void *); va_end (arg); return func1 (a, p); } /* Ensure that all supported fcntl actions are distinct, and usable in preprocessor expressions. */ static void check_flags (void) { switch (0) { case F_DUPFD: #if F_DUPFD #endif case F_DUPFD_CLOEXEC: #if F_DUPFD_CLOEXEC #endif case F_GETFD: #if F_GETFD #endif #ifdef F_SETFD case F_SETFD: # if F_SETFD # endif #endif #ifdef F_GETFL case F_GETFL: # if F_GETFL # endif #endif #ifdef F_SETFL case F_SETFL: # if F_SETFL # endif #endif #ifdef F_GETOWN case F_GETOWN: # if F_GETOWN # endif #endif #ifdef F_SETOWN case F_SETOWN: # if F_SETOWN # endif #endif #ifdef F_GETLK case F_GETLK: # if F_GETLK # endif #endif #ifdef F_SETLK case F_SETLK: # if F_SETLK # endif #endif #ifdef F_SETLKW case F_SETLKW: # if F_SETLKW # endif #endif ; } } int main (void) { const char *file = "test-fcntl.tmp"; int fd; /* Sanity check that rpl_fcntl is likely to work. */ ASSERT (func2 (1, 2) == 2); ASSERT (func2 (2, -2) == -2); ASSERT (func2 (3, 0x80000000) == 0x80000000); { struct dummy_struct s = { 0L, 4 }; ASSERT (func2 (4, &s) == 4); } check_flags (); /* Assume std descriptors were provided by invoker, and ignore fds that might have been inherited. */ fd = creat (file, 0600); ASSERT (STDERR_FILENO < fd); close (fd + 1); close (fd + 2); /* For F_DUPFD*, the source must be valid. */ errno = 0; ASSERT (fcntl (-1, F_DUPFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_DUPFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1); ASSERT (errno == EBADF); /* For F_DUPFD*, the destination must be valid. */ ASSERT (getdtablesize () < 10000000); errno = 0; ASSERT (fcntl (fd, F_DUPFD, -1) == -1); ASSERT (errno == EINVAL); errno = 0; ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1); ASSERT (errno == EINVAL); ASSERT (getdtablesize () < 10000000); errno = 0; ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1); ASSERT (errno == EINVAL); errno = 0; ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1); ASSERT (errno == EINVAL); /* For F_DUPFD*, check for correct inheritance, as well as preservation of text vs. binary. */ setmode (fd, O_BINARY); ASSERT (is_open (fd)); ASSERT (!is_open (fd + 1)); ASSERT (!is_open (fd + 2)); ASSERT (is_inheritable (fd)); ASSERT (is_mode (fd, O_BINARY)); ASSERT (fcntl (fd, F_DUPFD, fd) == fd + 1); ASSERT (is_open (fd)); ASSERT (is_open (fd + 1)); ASSERT (!is_open (fd + 2)); ASSERT (is_inheritable (fd + 1)); ASSERT (is_mode (fd, O_BINARY)); ASSERT (is_mode (fd + 1, O_BINARY)); ASSERT (close (fd + 1) == 0); ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, fd + 2) == fd + 2); ASSERT (is_open (fd)); ASSERT (!is_open (fd + 1)); ASSERT (is_open (fd + 2)); ASSERT (is_inheritable (fd)); ASSERT (!is_inheritable (fd + 2)); ASSERT (is_mode (fd, O_BINARY)); ASSERT (is_mode (fd + 2, O_BINARY)); ASSERT (close (fd) == 0); setmode (fd + 2, O_TEXT); ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1); ASSERT (!is_open (fd)); ASSERT (is_open (fd + 1)); ASSERT (is_open (fd + 2)); ASSERT (is_inheritable (fd + 1)); ASSERT (!is_inheritable (fd + 2)); ASSERT (is_mode (fd + 1, O_TEXT)); ASSERT (is_mode (fd + 2, O_TEXT)); ASSERT (close (fd + 1) == 0); ASSERT (fcntl (fd + 2, F_DUPFD_CLOEXEC, 0) == fd); ASSERT (is_open (fd)); ASSERT (!is_open (fd + 1)); ASSERT (is_open (fd + 2)); ASSERT (!is_inheritable (fd)); ASSERT (!is_inheritable (fd + 2)); ASSERT (is_mode (fd, O_TEXT)); ASSERT (is_mode (fd + 2, O_TEXT)); ASSERT (close (fd + 2) == 0); /* Test F_GETFD on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_GETFD) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_GETFD) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_GETFD) == -1); ASSERT (errno == EBADF); /* Test F_GETFD, the FD_CLOEXEC bit. */ { int result = fcntl (fd, F_GETFD); ASSERT (0 <= result); ASSERT ((result & FD_CLOEXEC) == FD_CLOEXEC); ASSERT (dup (fd) == fd + 1); result = fcntl (fd + 1, F_GETFD); ASSERT (0 <= result); ASSERT ((result & FD_CLOEXEC) == 0); ASSERT (close (fd + 1) == 0); } #ifdef F_SETFD /* Test F_SETFD on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_SETFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_SETFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_SETFD, 0) == -1); ASSERT (errno == EBADF); #endif #ifdef F_GETFL /* Test F_GETFL on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_GETFL) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_GETFL) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_GETFL) == -1); ASSERT (errno == EBADF); #endif #ifdef F_SETFL /* Test F_SETFL on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_SETFL, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_SETFL, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_SETFL, 0) == -1); ASSERT (errno == EBADF); #endif #ifdef F_GETOWN /* Test F_GETOWN on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_GETOWN) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_GETOWN) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_GETOWN) == -1); ASSERT (errno == EBADF); #endif #ifdef F_SETOWN /* Test F_SETFL on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_SETOWN, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (fd + 1, F_SETOWN, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (10000000, F_SETOWN, 0) == -1); ASSERT (errno == EBADF); #endif /* Cleanup. */ ASSERT (close (fd) == 0); ASSERT (unlink (file) == 0); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/symlink.c�����������������������������������������������������0000664�0000000�0000000�00000002631�12166360012�015654� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Stub for symlink(). Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/stat.h> #if HAVE_SYMLINK # undef symlink /* Create a symlink, but reject trailing slash. */ int rpl_symlink (char const *contents, char const *name) { size_t len = strlen (name); if (len && name[len - 1] == '/') { struct stat st; if (lstat (name, &st) == 0) errno = EEXIST; return -1; } return symlink (contents, name); } #else /* !HAVE_SYMLINK */ /* The system does not support symlinks. */ int symlink (char const *contents _GL_UNUSED, char const *name _GL_UNUSED) { errno = ENOSYS; return -1; } #endif /* !HAVE_SYMLINK */ �������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fwrite.c�������������������������������������������������0000664�0000000�0000000�00000005131�12166360012�016441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fwrite() function. Copyright (C) 2011-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fwrite, size_t, (const void *, size_t, size_t, FILE *)); #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "msvc-inval.h" #include "macros.h" int main (int argc, char **argv) { const char *filename = "test-fwrite.txt"; /* We don't have an fwrite() function that installs an invalid parameter handler so far. So install that handler here, explicitly. */ #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING gl_msvc_inval_ensure_handler (); #endif /* Test that fwrite() on an unbuffered stream sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "w"); char buf[5] = "world"; ASSERT (fp != NULL); setvbuf (fp, NULL, _IONBF, 0); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } /* Test that fwrite() on an unbuffered stream sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w"); if (fp != NULL) { char buf[5] = "world"; setvbuf (fp, NULL, _IONBF, 0); errno = 0; ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } { FILE *fp = fdopen (99, "w"); if (fp != NULL) { char buf[5] = "world"; setvbuf (fp, NULL, _IONBF, 0); errno = 0; ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); ASSERT (errno == EBADF); ASSERT (ferror (fp)); fclose (fp); } } /* Clean up. */ unlink (filename); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-calloc-gnu.c���������������������������������������������0000664�0000000�0000000�00000002066�12166360012�017171� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of calloc function. Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> int main () { /* Check that calloc (0, 0) is not a NULL pointer. */ if (calloc (0, 0) == NULL) return 1; /* Check that calloc fails when requested to allocate a block of memory larger than SIZE_MAX bytes. */ if (calloc ((size_t) -1 / 8 + 1, 8) != NULL) return 1; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32-1.sh�����������������������������������������0000775�0000000�0000000�00000000122�12166360012�017553� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP1252 locale. ./test-wcrtomb-w32${EXEEXT} French_France 1252 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/inttypes.in.h�������������������������������������������������0000664�0000000�0000000�00000063752�12166360012�016472� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2006-2012 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. 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 <http://www.gnu.org/licenses/>. */ /* * ISO C 99 <inttypes.h> for platforms that lack it. * <http://www.opengroup.org/susv3xbd/inttypes.h.html> */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Include the original <inttypes.h> if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h which in turn includes this file. The include_next requires a split double-inclusion guard. */ #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H # if @HAVE_INTTYPES_H@ /* Some pre-C++11 <stdint.h> implementations need this. */ # if defined __cplusplus && ! defined __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 # endif # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ # endif #endif #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H /* Include <stdint.h> or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include <stdint.h> #endif /* Get CHAR_BIT. */ #include <limits.h> #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>." #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* 7.8.1 Macros for format specifiers */ #if defined _TNS_R_TARGET /* Tandem NonStop R series and compatible platforms released before July 2005 support %Ld but not %lld. */ # define _LONG_LONG_FORMAT_PREFIX "L" #else # define _LONG_LONG_FORMAT_PREFIX "ll" #endif #if !defined PRId8 || @PRI_MACROS_BROKEN@ # undef PRId8 # ifdef INT8_MAX # define PRId8 "d" # endif #endif #if !defined PRIi8 || @PRI_MACROS_BROKEN@ # undef PRIi8 # ifdef INT8_MAX # define PRIi8 "i" # endif #endif #if !defined PRIo8 || @PRI_MACROS_BROKEN@ # undef PRIo8 # ifdef UINT8_MAX # define PRIo8 "o" # endif #endif #if !defined PRIu8 || @PRI_MACROS_BROKEN@ # undef PRIu8 # ifdef UINT8_MAX # define PRIu8 "u" # endif #endif #if !defined PRIx8 || @PRI_MACROS_BROKEN@ # undef PRIx8 # ifdef UINT8_MAX # define PRIx8 "x" # endif #endif #if !defined PRIX8 || @PRI_MACROS_BROKEN@ # undef PRIX8 # ifdef UINT8_MAX # define PRIX8 "X" # endif #endif #if !defined PRId16 || @PRI_MACROS_BROKEN@ # undef PRId16 # ifdef INT16_MAX # define PRId16 "d" # endif #endif #if !defined PRIi16 || @PRI_MACROS_BROKEN@ # undef PRIi16 # ifdef INT16_MAX # define PRIi16 "i" # endif #endif #if !defined PRIo16 || @PRI_MACROS_BROKEN@ # undef PRIo16 # ifdef UINT16_MAX # define PRIo16 "o" # endif #endif #if !defined PRIu16 || @PRI_MACROS_BROKEN@ # undef PRIu16 # ifdef UINT16_MAX # define PRIu16 "u" # endif #endif #if !defined PRIx16 || @PRI_MACROS_BROKEN@ # undef PRIx16 # ifdef UINT16_MAX # define PRIx16 "x" # endif #endif #if !defined PRIX16 || @PRI_MACROS_BROKEN@ # undef PRIX16 # ifdef UINT16_MAX # define PRIX16 "X" # endif #endif #if !defined PRId32 || @PRI_MACROS_BROKEN@ # undef PRId32 # ifdef INT32_MAX # define PRId32 "d" # endif #endif #if !defined PRIi32 || @PRI_MACROS_BROKEN@ # undef PRIi32 # ifdef INT32_MAX # define PRIi32 "i" # endif #endif #if !defined PRIo32 || @PRI_MACROS_BROKEN@ # undef PRIo32 # ifdef UINT32_MAX # define PRIo32 "o" # endif #endif #if !defined PRIu32 || @PRI_MACROS_BROKEN@ # undef PRIu32 # ifdef UINT32_MAX # define PRIu32 "u" # endif #endif #if !defined PRIx32 || @PRI_MACROS_BROKEN@ # undef PRIx32 # ifdef UINT32_MAX # define PRIx32 "x" # endif #endif #if !defined PRIX32 || @PRI_MACROS_BROKEN@ # undef PRIX32 # ifdef UINT32_MAX # define PRIX32 "X" # endif #endif #ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _PRI64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRI64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRId64 || @PRI_MACROS_BROKEN@ # undef PRId64 # define PRId64 _PRI64_PREFIX "d" # endif # if !defined PRIi64 || @PRI_MACROS_BROKEN@ # undef PRIi64 # define PRIi64 _PRI64_PREFIX "i" # endif #endif #ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _PRIu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRIu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRIo64 || @PRI_MACROS_BROKEN@ # undef PRIo64 # define PRIo64 _PRIu64_PREFIX "o" # endif # if !defined PRIu64 || @PRI_MACROS_BROKEN@ # undef PRIu64 # define PRIu64 _PRIu64_PREFIX "u" # endif # if !defined PRIx64 || @PRI_MACROS_BROKEN@ # undef PRIx64 # define PRIx64 _PRIu64_PREFIX "x" # endif # if !defined PRIX64 || @PRI_MACROS_BROKEN@ # undef PRIX64 # define PRIX64 _PRIu64_PREFIX "X" # endif #endif #if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST8 # define PRIdLEAST8 "d" #endif #if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST8 # define PRIiLEAST8 "i" #endif #if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST8 # define PRIoLEAST8 "o" #endif #if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST8 # define PRIuLEAST8 "u" #endif #if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST8 # define PRIxLEAST8 "x" #endif #if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST8 # define PRIXLEAST8 "X" #endif #if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST16 # define PRIdLEAST16 "d" #endif #if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST16 # define PRIiLEAST16 "i" #endif #if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST16 # define PRIoLEAST16 "o" #endif #if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST16 # define PRIuLEAST16 "u" #endif #if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST16 # define PRIxLEAST16 "x" #endif #if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST16 # define PRIXLEAST16 "X" #endif #if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST32 # define PRIdLEAST32 "d" #endif #if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST32 # define PRIiLEAST32 "i" #endif #if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST32 # define PRIoLEAST32 "o" #endif #if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST32 # define PRIuLEAST32 "u" #endif #if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST32 # define PRIxLEAST32 "x" #endif #if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST32 # define PRIXLEAST32 "X" #endif #ifdef INT64_MAX # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 # endif # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 # endif #endif #ifdef UINT64_MAX # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 # endif # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 # endif # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 # endif # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 # endif #endif #if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ # undef PRIdFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIdFAST8 PRId64 # else # define PRIdFAST8 "d" # endif #endif #if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ # undef PRIiFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIiFAST8 PRIi64 # else # define PRIiFAST8 "i" # endif #endif #if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ # undef PRIoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIoFAST8 PRIo64 # else # define PRIoFAST8 "o" # endif #endif #if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ # undef PRIuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIuFAST8 PRIu64 # else # define PRIuFAST8 "u" # endif #endif #if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ # undef PRIxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIxFAST8 PRIx64 # else # define PRIxFAST8 "x" # endif #endif #if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ # undef PRIXFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIXFAST8 PRIX64 # else # define PRIXFAST8 "X" # endif #endif #if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ # undef PRIdFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIdFAST16 PRId64 # else # define PRIdFAST16 "d" # endif #endif #if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ # undef PRIiFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIiFAST16 PRIi64 # else # define PRIiFAST16 "i" # endif #endif #if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ # undef PRIoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIoFAST16 PRIo64 # else # define PRIoFAST16 "o" # endif #endif #if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ # undef PRIuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIuFAST16 PRIu64 # else # define PRIuFAST16 "u" # endif #endif #if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ # undef PRIxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIxFAST16 PRIx64 # else # define PRIxFAST16 "x" # endif #endif #if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ # undef PRIXFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIXFAST16 PRIX64 # else # define PRIXFAST16 "X" # endif #endif #if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ # undef PRIdFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIdFAST32 PRId64 # else # define PRIdFAST32 "d" # endif #endif #if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ # undef PRIiFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIiFAST32 PRIi64 # else # define PRIiFAST32 "i" # endif #endif #if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ # undef PRIoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIoFAST32 PRIo64 # else # define PRIoFAST32 "o" # endif #endif #if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ # undef PRIuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIuFAST32 PRIu64 # else # define PRIuFAST32 "u" # endif #endif #if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ # undef PRIxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIxFAST32 PRIx64 # else # define PRIxFAST32 "x" # endif #endif #if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ # undef PRIXFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIXFAST32 PRIX64 # else # define PRIXFAST32 "X" # endif #endif #ifdef INT64_MAX # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ # undef PRIdFAST64 # define PRIdFAST64 PRId64 # endif # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ # undef PRIiFAST64 # define PRIiFAST64 PRIi64 # endif #endif #ifdef UINT64_MAX # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ # undef PRIoFAST64 # define PRIoFAST64 PRIo64 # endif # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ # undef PRIuFAST64 # define PRIuFAST64 PRIu64 # endif # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ # undef PRIxFAST64 # define PRIxFAST64 PRIx64 # endif # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ # undef PRIXFAST64 # define PRIXFAST64 PRIX64 # endif #endif #if !defined PRIdMAX || @PRI_MACROS_BROKEN@ # undef PRIdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIdMAX PRId64 # else # define PRIdMAX "ld" # endif #endif #if !defined PRIiMAX || @PRI_MACROS_BROKEN@ # undef PRIiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIiMAX PRIi64 # else # define PRIiMAX "li" # endif #endif #if !defined PRIoMAX || @PRI_MACROS_BROKEN@ # undef PRIoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIoMAX PRIo64 # else # define PRIoMAX "lo" # endif #endif #if !defined PRIuMAX || @PRI_MACROS_BROKEN@ # undef PRIuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIuMAX PRIu64 # else # define PRIuMAX "lu" # endif #endif #if !defined PRIxMAX || @PRI_MACROS_BROKEN@ # undef PRIxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIxMAX PRIx64 # else # define PRIxMAX "lx" # endif #endif #if !defined PRIXMAX || @PRI_MACROS_BROKEN@ # undef PRIXMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIXMAX PRIX64 # else # define PRIXMAX "lX" # endif #endif #if !defined PRIdPTR || @PRI_MACROS_BROKEN@ # undef PRIdPTR # ifdef INTPTR_MAX # define PRIdPTR @PRIPTR_PREFIX@ "d" # endif #endif #if !defined PRIiPTR || @PRI_MACROS_BROKEN@ # undef PRIiPTR # ifdef INTPTR_MAX # define PRIiPTR @PRIPTR_PREFIX@ "i" # endif #endif #if !defined PRIoPTR || @PRI_MACROS_BROKEN@ # undef PRIoPTR # ifdef UINTPTR_MAX # define PRIoPTR @PRIPTR_PREFIX@ "o" # endif #endif #if !defined PRIuPTR || @PRI_MACROS_BROKEN@ # undef PRIuPTR # ifdef UINTPTR_MAX # define PRIuPTR @PRIPTR_PREFIX@ "u" # endif #endif #if !defined PRIxPTR || @PRI_MACROS_BROKEN@ # undef PRIxPTR # ifdef UINTPTR_MAX # define PRIxPTR @PRIPTR_PREFIX@ "x" # endif #endif #if !defined PRIXPTR || @PRI_MACROS_BROKEN@ # undef PRIXPTR # ifdef UINTPTR_MAX # define PRIXPTR @PRIPTR_PREFIX@ "X" # endif #endif #if !defined SCNd8 || @PRI_MACROS_BROKEN@ # undef SCNd8 # ifdef INT8_MAX # define SCNd8 "hhd" # endif #endif #if !defined SCNi8 || @PRI_MACROS_BROKEN@ # undef SCNi8 # ifdef INT8_MAX # define SCNi8 "hhi" # endif #endif #if !defined SCNo8 || @PRI_MACROS_BROKEN@ # undef SCNo8 # ifdef UINT8_MAX # define SCNo8 "hho" # endif #endif #if !defined SCNu8 || @PRI_MACROS_BROKEN@ # undef SCNu8 # ifdef UINT8_MAX # define SCNu8 "hhu" # endif #endif #if !defined SCNx8 || @PRI_MACROS_BROKEN@ # undef SCNx8 # ifdef UINT8_MAX # define SCNx8 "hhx" # endif #endif #if !defined SCNd16 || @PRI_MACROS_BROKEN@ # undef SCNd16 # ifdef INT16_MAX # define SCNd16 "hd" # endif #endif #if !defined SCNi16 || @PRI_MACROS_BROKEN@ # undef SCNi16 # ifdef INT16_MAX # define SCNi16 "hi" # endif #endif #if !defined SCNo16 || @PRI_MACROS_BROKEN@ # undef SCNo16 # ifdef UINT16_MAX # define SCNo16 "ho" # endif #endif #if !defined SCNu16 || @PRI_MACROS_BROKEN@ # undef SCNu16 # ifdef UINT16_MAX # define SCNu16 "hu" # endif #endif #if !defined SCNx16 || @PRI_MACROS_BROKEN@ # undef SCNx16 # ifdef UINT16_MAX # define SCNx16 "hx" # endif #endif #if !defined SCNd32 || @PRI_MACROS_BROKEN@ # undef SCNd32 # ifdef INT32_MAX # define SCNd32 "d" # endif #endif #if !defined SCNi32 || @PRI_MACROS_BROKEN@ # undef SCNi32 # ifdef INT32_MAX # define SCNi32 "i" # endif #endif #if !defined SCNo32 || @PRI_MACROS_BROKEN@ # undef SCNo32 # ifdef UINT32_MAX # define SCNo32 "o" # endif #endif #if !defined SCNu32 || @PRI_MACROS_BROKEN@ # undef SCNu32 # ifdef UINT32_MAX # define SCNu32 "u" # endif #endif #if !defined SCNx32 || @PRI_MACROS_BROKEN@ # undef SCNx32 # ifdef UINT32_MAX # define SCNx32 "x" # endif #endif #ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _SCN64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCN64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNd64 || @PRI_MACROS_BROKEN@ # undef SCNd64 # define SCNd64 _SCN64_PREFIX "d" # endif # if !defined SCNi64 || @PRI_MACROS_BROKEN@ # undef SCNi64 # define SCNi64 _SCN64_PREFIX "i" # endif #endif #ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _SCNu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCNu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNo64 || @PRI_MACROS_BROKEN@ # undef SCNo64 # define SCNo64 _SCNu64_PREFIX "o" # endif # if !defined SCNu64 || @PRI_MACROS_BROKEN@ # undef SCNu64 # define SCNu64 _SCNu64_PREFIX "u" # endif # if !defined SCNx64 || @PRI_MACROS_BROKEN@ # undef SCNx64 # define SCNx64 _SCNu64_PREFIX "x" # endif #endif #if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST8 # define SCNdLEAST8 "hhd" #endif #if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST8 # define SCNiLEAST8 "hhi" #endif #if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST8 # define SCNoLEAST8 "hho" #endif #if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST8 # define SCNuLEAST8 "hhu" #endif #if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST8 # define SCNxLEAST8 "hhx" #endif #if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST16 # define SCNdLEAST16 "hd" #endif #if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST16 # define SCNiLEAST16 "hi" #endif #if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST16 # define SCNoLEAST16 "ho" #endif #if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST16 # define SCNuLEAST16 "hu" #endif #if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST16 # define SCNxLEAST16 "hx" #endif #if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST32 # define SCNdLEAST32 "d" #endif #if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST32 # define SCNiLEAST32 "i" #endif #if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST32 # define SCNoLEAST32 "o" #endif #if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST32 # define SCNuLEAST32 "u" #endif #if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST32 # define SCNxLEAST32 "x" #endif #ifdef INT64_MAX # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST64 # define SCNdLEAST64 SCNd64 # endif # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST64 # define SCNiLEAST64 SCNi64 # endif #endif #ifdef UINT64_MAX # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST64 # define SCNoLEAST64 SCNo64 # endif # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST64 # define SCNuLEAST64 SCNu64 # endif # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST64 # define SCNxLEAST64 SCNx64 # endif #endif #if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ # undef SCNdFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNdFAST8 SCNd64 # elif INT_FAST8_MAX == 0x7fff # define SCNdFAST8 "hd" # elif INT_FAST8_MAX == 0x7f # define SCNdFAST8 "hhd" # else # define SCNdFAST8 "d" # endif #endif #if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ # undef SCNiFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNiFAST8 SCNi64 # elif INT_FAST8_MAX == 0x7fff # define SCNiFAST8 "hi" # elif INT_FAST8_MAX == 0x7f # define SCNiFAST8 "hhi" # else # define SCNiFAST8 "i" # endif #endif #if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ # undef SCNoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNoFAST8 SCNo64 # elif UINT_FAST8_MAX == 0xffff # define SCNoFAST8 "ho" # elif UINT_FAST8_MAX == 0xff # define SCNoFAST8 "hho" # else # define SCNoFAST8 "o" # endif #endif #if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ # undef SCNuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNuFAST8 SCNu64 # elif UINT_FAST8_MAX == 0xffff # define SCNuFAST8 "hu" # elif UINT_FAST8_MAX == 0xff # define SCNuFAST8 "hhu" # else # define SCNuFAST8 "u" # endif #endif #if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ # undef SCNxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNxFAST8 SCNx64 # elif UINT_FAST8_MAX == 0xffff # define SCNxFAST8 "hx" # elif UINT_FAST8_MAX == 0xff # define SCNxFAST8 "hhx" # else # define SCNxFAST8 "x" # endif #endif #if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ # undef SCNdFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNdFAST16 SCNd64 # elif INT_FAST16_MAX == 0x7fff # define SCNdFAST16 "hd" # else # define SCNdFAST16 "d" # endif #endif #if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ # undef SCNiFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNiFAST16 SCNi64 # elif INT_FAST16_MAX == 0x7fff # define SCNiFAST16 "hi" # else # define SCNiFAST16 "i" # endif #endif #if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ # undef SCNoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNoFAST16 SCNo64 # elif UINT_FAST16_MAX == 0xffff # define SCNoFAST16 "ho" # else # define SCNoFAST16 "o" # endif #endif #if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ # undef SCNuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNuFAST16 SCNu64 # elif UINT_FAST16_MAX == 0xffff # define SCNuFAST16 "hu" # else # define SCNuFAST16 "u" # endif #endif #if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ # undef SCNxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNxFAST16 SCNx64 # elif UINT_FAST16_MAX == 0xffff # define SCNxFAST16 "hx" # else # define SCNxFAST16 "x" # endif #endif #if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ # undef SCNdFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNdFAST32 SCNd64 # else # define SCNdFAST32 "d" # endif #endif #if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ # undef SCNiFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNiFAST32 SCNi64 # else # define SCNiFAST32 "i" # endif #endif #if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ # undef SCNoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNoFAST32 SCNo64 # else # define SCNoFAST32 "o" # endif #endif #if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ # undef SCNuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNuFAST32 SCNu64 # else # define SCNuFAST32 "u" # endif #endif #if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ # undef SCNxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNxFAST32 SCNx64 # else # define SCNxFAST32 "x" # endif #endif #ifdef INT64_MAX # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ # undef SCNdFAST64 # define SCNdFAST64 SCNd64 # endif # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ # undef SCNiFAST64 # define SCNiFAST64 SCNi64 # endif #endif #ifdef UINT64_MAX # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ # undef SCNoFAST64 # define SCNoFAST64 SCNo64 # endif # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ # undef SCNuFAST64 # define SCNuFAST64 SCNu64 # endif # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ # undef SCNxFAST64 # define SCNxFAST64 SCNx64 # endif #endif #if !defined SCNdMAX || @PRI_MACROS_BROKEN@ # undef SCNdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNdMAX SCNd64 # else # define SCNdMAX "ld" # endif #endif #if !defined SCNiMAX || @PRI_MACROS_BROKEN@ # undef SCNiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNiMAX SCNi64 # else # define SCNiMAX "li" # endif #endif #if !defined SCNoMAX || @PRI_MACROS_BROKEN@ # undef SCNoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNoMAX SCNo64 # else # define SCNoMAX "lo" # endif #endif #if !defined SCNuMAX || @PRI_MACROS_BROKEN@ # undef SCNuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNuMAX SCNu64 # else # define SCNuMAX "lu" # endif #endif #if !defined SCNxMAX || @PRI_MACROS_BROKEN@ # undef SCNxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNxMAX SCNx64 # else # define SCNxMAX "lx" # endif #endif #if !defined SCNdPTR || @PRI_MACROS_BROKEN@ # undef SCNdPTR # ifdef INTPTR_MAX # define SCNdPTR @PRIPTR_PREFIX@ "d" # endif #endif #if !defined SCNiPTR || @PRI_MACROS_BROKEN@ # undef SCNiPTR # ifdef INTPTR_MAX # define SCNiPTR @PRIPTR_PREFIX@ "i" # endif #endif #if !defined SCNoPTR || @PRI_MACROS_BROKEN@ # undef SCNoPTR # ifdef UINTPTR_MAX # define SCNoPTR @PRIPTR_PREFIX@ "o" # endif #endif #if !defined SCNuPTR || @PRI_MACROS_BROKEN@ # undef SCNuPTR # ifdef UINTPTR_MAX # define SCNuPTR @PRIPTR_PREFIX@ "u" # endif #endif #if !defined SCNxPTR || @PRI_MACROS_BROKEN@ # undef SCNxPTR # ifdef UINTPTR_MAX # define SCNxPTR @PRIPTR_PREFIX@ "x" # endif #endif /* 7.8.2 Functions for greatest-width integer types */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_IMAXABS@ # if !@HAVE_DECL_IMAXABS@ extern intmax_t imaxabs (intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs # if HAVE_RAW_DECL_IMAXABS _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " "use gnulib module imaxabs for portability"); # endif #endif #if @GNULIB_IMAXDIV@ # if !@HAVE_DECL_IMAXDIV@ # if !GNULIB_defined_imaxdiv_t typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv # if HAVE_RAW_DECL_IMAXDIV _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " "use gnulib module imaxdiv for portability"); # endif #endif #if @GNULIB_STRTOIMAX@ # if @REPLACE_STRTOIMAX@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strtoimax # define strtoimax rpl_strtoimax # endif _GL_FUNCDECL_RPL (strtoimax, intmax_t, (const char *, char **, int) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int)); # else # if !@HAVE_DECL_STRTOIMAX@ # undef strtoimax _GL_FUNCDECL_SYS (strtoimax, intmax_t, (const char *, char **, int) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int)); # endif _GL_CXXALIASWARN (strtoimax); #elif defined GNULIB_POSIXCHECK # undef strtoimax # if HAVE_RAW_DECL_STRTOIMAX _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " "use gnulib module strtoimax for portability"); # endif #endif #if @GNULIB_STRTOUMAX@ # if !@HAVE_DECL_STRTOUMAX@ # undef strtoumax _GL_FUNCDECL_SYS (strtoumax, uintmax_t, (const char *, char **, int) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); _GL_CXXALIASWARN (strtoumax); #elif defined GNULIB_POSIXCHECK # undef strtoumax # if HAVE_RAW_DECL_STRTOUMAX _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " "use gnulib module strtoumax for portability"); # endif #endif /* Don't bother defining or declaring wcstoimax and wcstoumax, since wide-character functions like this are hardly ever useful. */ #ifdef __cplusplus } #endif #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ ����������������������id-utils-4.6+git20120811/gnulib-tests/test-signbit.c������������������������������������������������0000664�0000000�0000000�00000012047�12166360012�016604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of signbit() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <math.h> /* signbit must be a macro. */ #ifndef signbit # error missing declaration #endif #include <float.h> #include <limits.h> #include "minus-zero.h" #include "infinity.h" #include "macros.h" float zerof = 0.0f; double zerod = 0.0; long double zerol = 0.0L; static void test_signbitf () { /* Finite values. */ ASSERT (!signbit (3.141f)); ASSERT (!signbit (3.141e30f)); ASSERT (!signbit (3.141e-30f)); ASSERT (signbit (-2.718f)); ASSERT (signbit (-2.718e30f)); ASSERT (signbit (-2.718e-30f)); /* Zeros. */ ASSERT (!signbit (0.0f)); if (1.0f / minus_zerof < 0) ASSERT (signbit (minus_zerof)); else ASSERT (!signbit (minus_zerof)); /* Infinite values. */ ASSERT (!signbit (Infinityf ())); ASSERT (signbit (- Infinityf ())); /* Quiet NaN. */ (void) signbit (zerof / zerof); #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; memory_float m; m.value = zerof / zerof; # if FLT_EXPBIT0_BIT > 0 m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); # else m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif if (FLT_EXPBIT0_WORD < NWORDS / 2) m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; else m.word[0] |= (unsigned int) 1; (void) signbit (m.value); #undef NWORDS } #endif } static void test_signbitd () { /* Finite values. */ ASSERT (!signbit (3.141)); ASSERT (!signbit (3.141e30)); ASSERT (!signbit (3.141e-30)); ASSERT (signbit (-2.718)); ASSERT (signbit (-2.718e30)); ASSERT (signbit (-2.718e-30)); /* Zeros. */ ASSERT (!signbit (0.0)); if (1.0 / minus_zerod < 0) ASSERT (signbit (minus_zerod)); else ASSERT (!signbit (minus_zerod)); /* Infinite values. */ ASSERT (!signbit (Infinityd ())); ASSERT (signbit (- Infinityd ())); /* Quiet NaN. */ (void) signbit (zerod / zerod); #if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; memory_double m; m.value = zerod / zerod; # if DBL_EXPBIT0_BIT > 0 m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); # else m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << DBL_EXPBIT0_BIT; (void) signbit (m.value); #undef NWORDS } #endif } static void test_signbitl () { /* Finite values. */ ASSERT (!signbit (3.141L)); ASSERT (!signbit (3.141e30L)); ASSERT (!signbit (3.141e-30L)); ASSERT (signbit (-2.718L)); ASSERT (signbit (-2.718e30L)); ASSERT (signbit (-2.718e-30L)); /* Zeros. */ ASSERT (!signbit (0.0L)); if (1.0L / minus_zerol < 0) ASSERT (signbit (minus_zerol)); else ASSERT (!signbit (minus_zerol)); /* Infinite values. */ ASSERT (!signbit (Infinityl ())); ASSERT (signbit (- Infinityl ())); /* Quiet NaN. */ (void) signbit (zerol / zerol); #if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; memory_long_double m; m.value = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0 m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); # else m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; (void) signbit (m.value); #undef NWORDS } #endif } int main () { test_signbitf (); test_signbitd (); test_signbitl (); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/Makefile.am���������������������������������������������������0000664�0000000�0000000�00000000022�11433657032�016055� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������include gnulib.mk ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-hash.c���������������������������������������������������0000664�0000000�0000000�00000015101�12166360012�016062� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2009-2012 Free Software Foundation, Inc. * Written by Jim Meyering * * 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "hash.h" #include "hash-pjw.h" #include "inttostr.h" #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <unistd.h> #include "macros.h" #define STREQ(a, b) (strcmp (a, b) == 0) #define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) static bool hash_compare_strings (void const *x, void const *y) { ASSERT (x != y); return STREQ (x, y) ? true : false; } static void hash_freer (void *x) { free (x); } static void insert_new (Hash_table *ht, const void *ent) { void *e = hash_insert (ht, ent); ASSERT (e == ent); } static bool walk (void *ent, void *data) { char *str = ent; unsigned int *map = data; switch (*str) { case 'a': *map |= 1; return true; case 'b': *map |= 2; return true; case 'c': *map |= 4; return true; } *map |= 8; return false; } static int get_seed (char const *str, unsigned int *seed) { size_t len = strlen (str); if (len == 0 || strspn (str, "0123456789") != len || 10 < len) return 1; *seed = atoi (str); return 0; } int main (int argc, char **argv) { unsigned int i; unsigned int k; unsigned int table_size[] = {1, 2, 3, 4, 5, 23, 53}; Hash_table *ht; Hash_tuning tuning; hash_reset_tuning (&tuning); tuning.shrink_threshold = 0.3; tuning.shrink_factor = 0.707; tuning.growth_threshold = 1.5; tuning.growth_factor = 2.0; tuning.is_n_buckets = true; if (1 < argc) { unsigned int seed; if (get_seed (argv[1], &seed) != 0) { fprintf (stderr, "invalid seed: %s\n", argv[1]); exit (EXIT_FAILURE); } srand (seed); } for (i = 0; i < ARRAY_CARDINALITY (table_size); i++) { size_t sz = table_size[i]; ht = hash_initialize (sz, NULL, hash_pjw, hash_compare_strings, NULL); ASSERT (ht); insert_new (ht, "a"); { char *str1 = strdup ("a"); char *str2; ASSERT (str1); str2 = hash_insert (ht, str1); ASSERT (str1 != str2); ASSERT (STREQ (str1, str2)); free (str1); } insert_new (ht, "b"); insert_new (ht, "c"); i = 0; ASSERT (hash_do_for_each (ht, walk, &i) == 3); ASSERT (i == 7); { void *buf[5] = { NULL }; ASSERT (hash_get_entries (ht, NULL, 0) == 0); ASSERT (hash_get_entries (ht, buf, 5) == 3); ASSERT (STREQ (buf[0], "a") || STREQ (buf[0], "b") || STREQ (buf[0], "c")); } ASSERT (hash_delete (ht, "a")); ASSERT (hash_delete (ht, "a") == NULL); ASSERT (hash_delete (ht, "b")); ASSERT (hash_delete (ht, "c")); ASSERT (hash_rehash (ht, 47)); ASSERT (hash_rehash (ht, 467)); /* Free an empty table. */ hash_clear (ht); hash_free (ht); ht = hash_initialize (sz, NULL, hash_pjw, hash_compare_strings, NULL); ASSERT (ht); insert_new (ht, "z"); insert_new (ht, "y"); insert_new (ht, "x"); insert_new (ht, "w"); insert_new (ht, "v"); insert_new (ht, "u"); hash_clear (ht); ASSERT (hash_get_n_entries (ht) == 0); hash_free (ht); /* Test pointer hashing. */ ht = hash_initialize (sz, NULL, NULL, NULL, NULL); ASSERT (ht); { char *str = strdup ("a"); ASSERT (str); insert_new (ht, "a"); insert_new (ht, str); ASSERT (hash_lookup (ht, str) == str); free (str); } hash_free (ht); } hash_reset_tuning (&tuning); tuning.shrink_threshold = 0.3; tuning.shrink_factor = 0.707; tuning.growth_threshold = 1.5; tuning.growth_factor = 2.0; tuning.is_n_buckets = true; /* Invalid tuning. */ ht = hash_initialize (4651, &tuning, hash_pjw, hash_compare_strings, hash_freer); ASSERT (!ht); /* Alternate tuning. */ tuning.growth_threshold = 0.89; /* Run with default tuning, then with custom tuning settings. */ for (k = 0; k < 2; k++) { Hash_tuning const *tune = (k == 0 ? NULL : &tuning); /* Now, each entry is malloc'd. */ ht = hash_initialize (4651, tune, hash_pjw, hash_compare_strings, hash_freer); ASSERT (ht); for (i = 0; i < 10000; i++) { unsigned int op = rand () % 10; switch (op) { case 0: case 1: case 2: case 3: case 4: case 5: { char buf[50]; char const *p = uinttostr (i, buf); char *p_dup = strdup (p); ASSERT (p_dup); insert_new (ht, p_dup); } break; case 6: { size_t n = hash_get_n_entries (ht); ASSERT (hash_rehash (ht, n + rand () % 20)); } break; case 7: { size_t n = hash_get_n_entries (ht); size_t delta = rand () % 20; if (delta < n) ASSERT (hash_rehash (ht, n - delta)); } break; case 8: case 9: { /* Delete a random entry. */ size_t n = hash_get_n_entries (ht); if (n) { size_t kk = rand () % n; void const *p; void *v; for (p = hash_get_first (ht); kk; --kk, p = hash_get_next (ht, p)) { /* empty */ } ASSERT (p); v = hash_delete (ht, p); ASSERT (v); free (v); } break; } } ASSERT (hash_table_ok (ht)); } hash_free (ht); } return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stddef.c�������������������������������������������������0000664�0000000�0000000�00000003164�12166360012�016416� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <stddef.h> substitute. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <stddef.h> #include "verify.h" /* Check that appropriate types are defined. */ wchar_t a = 'c'; ptrdiff_t b = 1; size_t c = 2; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that offsetof produces integer constants with correct type. */ struct d { char e; char f; }; /* Solaris 10 has a bug where offsetof is under-parenthesized, and cannot be used as an arbitrary expression. However, since it is unlikely to bite real code, we ignore that short-coming. */ /* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */ verify (sizeof (offsetof (struct d, e)) == sizeof (size_t)); verify (offsetof (struct d, e) < -1); /* Must be unsigned. */ verify (offsetof (struct d, f) == 1); int main (void) { return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/infinity.h����������������������������������������������������0000664�0000000�0000000�00000003037�12166360012�016025� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Macros for infinity. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Infinityf () returns a 'float' +Infinity. */ /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ #if defined _MSC_VER static float Infinityf () { static float zero = 0.0f; return 1.0f / zero; } #else # define Infinityf() (1.0f / 0.0f) #endif /* Infinityd () returns a 'double' +Infinity. */ /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ #if defined _MSC_VER static double Infinityd () { static double zero = 0.0; return 1.0 / zero; } #else # define Infinityd() (1.0 / 0.0) #endif /* Infinityl () returns a 'long double' +Infinity. */ /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ #if defined _MSC_VER static double Infinityl () { static long double zero = 0.0L; return 1.0L / zero; } #else # define Infinityl() (1.0L / 0.0L) #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-argmatch.c�����������������������������������������������0000664�0000000�0000000�00000006212�12166360012�016730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of exact or abbreviated match search. Copyright (C) 1990, 1998-1999, 2001-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007, based on test code by David MacKenzie <djm@gnu.ai.mit.edu>. */ #include <config.h> #include "argmatch.h" #include <stdlib.h> #include "progname.h" #include "macros.h" /* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL _Noreturn ARGMATCH_DIE_DECL; ARGMATCH_DIE_DECL { exit (1); } #endif enum backup_type { no_backups, simple_backups, numbered_existing_backups, numbered_backups }; static const char *const backup_args[] = { "no", "none", "off", "simple", "never", "single", "existing", "nil", "numbered-existing", "numbered", "t", "newstyle", NULL }; static const enum backup_type backup_vals[] = { no_backups, no_backups, no_backups, simple_backups, simple_backups, simple_backups, numbered_existing_backups, numbered_existing_backups, numbered_existing_backups, numbered_backups, numbered_backups, numbered_backups }; int main (int argc, char *argv[]) { set_program_name (argv[0]); /* Not found. */ ASSERT (ARGMATCH ("klingon", backup_args, backup_vals) == -1); /* Exact match. */ ASSERT (ARGMATCH ("none", backup_args, backup_vals) == 1); ASSERT (ARGMATCH ("nil", backup_args, backup_vals) == 7); /* Too long. */ ASSERT (ARGMATCH ("nilpotent", backup_args, backup_vals) == -1); /* Abbreviated. */ ASSERT (ARGMATCH ("simpl", backup_args, backup_vals) == 3); ASSERT (ARGMATCH ("simp", backup_args, backup_vals) == 3); ASSERT (ARGMATCH ("sim", backup_args, backup_vals) == 3); /* Exact match and abbreviated. */ ASSERT (ARGMATCH ("numbered", backup_args, backup_vals) == 9); ASSERT (ARGMATCH ("numbere", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("number", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("numbe", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("numb", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("num", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("nu", backup_args, backup_vals) == -2); ASSERT (ARGMATCH ("n", backup_args, backup_vals) == -2); /* Ambiguous abbreviated. */ ASSERT (ARGMATCH ("ne", backup_args, backup_vals) == -2); /* Ambiguous abbreviated, but same value. */ ASSERT (ARGMATCH ("si", backup_args, backup_vals) == 3); ASSERT (ARGMATCH ("s", backup_args, backup_vals) == 3); return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stat.h���������������������������������������������������0000664�0000000�0000000�00000006024�12166360012�016123� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of stat. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ /* This file is designed to test both stat(n,buf) and fstatat(AT_FDCWD,n,buf,0). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_stat_func (int (*func) (char const *, struct stat *), bool print) { struct stat st1; struct stat st2; char *cwd = getcwd (NULL, 0); ASSERT (cwd); ASSERT (func (".", &st1) == 0); ASSERT (func ("./", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (func (cwd, &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (func ("/", &st1) == 0); ASSERT (func ("///", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); errno = 0; ASSERT (func ("", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (close (creat (BASE "file", 0600)) == 0); ASSERT (func (BASE "file", &st1) == 0); errno = 0; ASSERT (func (BASE "file/", &st1) == -1); ASSERT (errno == ENOTDIR); /* Now for some symlink tests, where supported. We set up: link1 -> directory link2 -> file link3 -> dangling link4 -> loop then test behavior with trailing slash. */ if (symlink (".", BASE "link1") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } ASSERT (symlink (BASE "file", BASE "link2") == 0); ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); ASSERT (symlink (BASE "link4", BASE "link4") == 0); ASSERT (func (BASE "link1/", &st1) == 0); ASSERT (S_ISDIR (st1.st_mode)); errno = 0; ASSERT (func (BASE "link2/", &st1) == -1); ASSERT (errno == ENOTDIR); errno = 0; ASSERT (func (BASE "link3/", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func (BASE "link4/", &st1) == -1); ASSERT (errno == ELOOP); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); ASSERT (unlink (BASE "link2") == 0); ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-iswblank.c�����������������������������������������������0000664�0000000�0000000�00000002042�12166360012�016751� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of iswblank() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <wctype.h> #include "macros.h" /* Check that WEOF is defined. */ wint_t e = WEOF; int main (void) { /* Check that the function exist as a function or as a macro. */ (void) iswblank (0); /* Check that the isw* functions map WEOF to 0. */ ASSERT (!iswblank (e)); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32-3.sh�����������������������������������������0000775�0000000�0000000�00000000121�12166360012�017554� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP932 locale. ./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-inttypes.c�����������������������������������������������0000664�0000000�0000000�00000006060�12166360012�017022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <inttypes.h> substitute. Copyright (C) 2006-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <inttypes.h> #include <stddef.h> /* Tests for macros supposed to be defined in inttypes.h. */ const char *k = /* implicit string concatenation */ #ifdef INT8_MAX PRId8 PRIi8 #endif #ifdef UINT8_MAX PRIo8 PRIu8 PRIx8 PRIX8 #endif #ifdef INT16_MAX PRId16 PRIi16 #endif #ifdef UINT16_MAX PRIo16 PRIu16 PRIx16 PRIX16 #endif #ifdef INT32_MAX PRId32 PRIi32 #endif #ifdef UINT32_MAX PRIo32 PRIu32 PRIx32 PRIX32 #endif #ifdef INT64_MAX PRId64 PRIi64 #endif #ifdef UINT64_MAX PRIo64 PRIu64 PRIx64 PRIX64 #endif PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 PRIdLEAST64 PRIiLEAST64 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 PRIdFAST64 PRIiFAST64 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX #ifdef INTPTR_MAX PRIdPTR PRIiPTR #endif #ifdef UINTPTR_MAX PRIoPTR PRIuPTR PRIxPTR PRIXPTR #endif ; const char *l = /* implicit string concatenation */ #ifdef INT8_MAX SCNd8 SCNi8 #endif #ifdef UINT8_MAX SCNo8 SCNu8 SCNx8 #endif #ifdef INT16_MAX SCNd16 SCNi16 #endif #ifdef UINT16_MAX SCNo16 SCNu16 SCNx16 #endif #ifdef INT32_MAX SCNd32 SCNi32 #endif #ifdef UINT32_MAX SCNo32 SCNu32 SCNx32 #endif #ifdef INT64_MAX SCNd64 SCNi64 #endif #ifdef UINT64_MAX SCNo64 SCNu64 SCNx64 #endif SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 SCNdLEAST64 SCNiLEAST64 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 SCNdFAST64 SCNiFAST64 SCNoFAST64 SCNuFAST64 SCNxFAST64 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX #ifdef INTPTR_MAX SCNdPTR SCNiPTR #endif #ifdef UINTPTR_MAX SCNoPTR SCNuPTR SCNxPTR #endif ; int main (void) { return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-pathmax.c������������������������������������������������0000664�0000000�0000000�00000001703�12166360012�016604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of "pathmax.h". Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2011. */ #include <config.h> #include "pathmax.h" /* Check that PATH_MAX is a constant if it is defined. */ #ifdef PATH_MAX int a = PATH_MAX; #endif int main (void) { return 0; } �������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-locale.c�������������������������������������������������0000664�0000000�0000000�00000002411�12166360012�016376� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <locale.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <locale.h> #include "verify.h" int a[] = { LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME }; #if HAVE_NEWLOCALE /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ locale_t b = LC_GLOBAL_LOCALE; #endif /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main () { return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-inttostr.c�����������������������������������������������0000664�0000000�0000000�00000007354�12166360012�017040� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "inttostr.h" #include "intprops.h" #include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "macros.h" #define STREQ(a, b) (strcmp (a, b) == 0) #define FMT(T) (TYPE_SIGNED (T) ? "%jd" : "%ju") #define CAST_VAL(T,V) (TYPE_SIGNED (T) ? (intmax_t) (V) : (uintmax_t) (V)) #define V_min(T) (CAST_VAL (T, TYPE_MINIMUM (T))) #define V_max(T) (CAST_VAL (T, TYPE_MAXIMUM (T))) #define IS_TIGHT(T) (_GL_SIGNED_TYPE_OR_EXPR (T) == TYPE_SIGNED (T)) #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) /* Verify that an inttostr function works as advertised. Convert maximum and minimum (per-type, T) values using both snprintf -- with a cast to intmax_t or uintmax_t -- and FN, and compare the resulting strings. Use malloc for the inttostr buffer, so that if we ever exceed the usually-tight INT_BUFSIZE_BOUND, tools like valgrind will detect the failure. */ #define CK(T, Fn) \ do \ { \ char ref[100]; \ char *buf = malloc (INT_BUFSIZE_BOUND (T)); \ char const *p; \ ASSERT (buf); \ *buf = '\0'; \ ASSERT (snprintf (ref, sizeof ref, FMT (T), V_min (T)) < sizeof ref); \ ASSERT (STREQ ((p = Fn (TYPE_MINIMUM (T), buf)), ref)); \ /* Ensure that INT_BUFSIZE_BOUND is tight for signed types. */ \ ASSERT (! TYPE_SIGNED (T) || (p == buf && *p == '-')); \ ASSERT (snprintf (ref, sizeof ref, FMT (T), V_max (T)) < sizeof ref); \ ASSERT (STREQ ((p = Fn (TYPE_MAXIMUM (T), buf)), ref)); \ /* For unsigned types, the bound is not always tight. */ \ ASSERT (! IS_TIGHT (T) || TYPE_SIGNED (T) \ || (p == buf && ISDIGIT (*p))); \ free (buf); \ } \ while (0) int main (void) { size_t b_size = 2; char *b = malloc (b_size); ASSERT (b); /* Ideally we would rely on the snprintf-posix module, in which case this guard would not be required, but due to limitations in gnulib's implementation (see modules/snprintf-posix), we cannot. */ if (snprintf (b, b_size, "%ju", (uintmax_t) 3) == 1 && b[0] == '3' && b[1] == '\0') { CK (int, inttostr); CK (unsigned int, uinttostr); CK (off_t, offtostr); CK (uintmax_t, umaxtostr); CK (intmax_t, imaxtostr); return 0; } /* snprintf doesn't accept %ju; skip this test. */ return 77; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-isnand.h�������������������������������������������������0000664�0000000�0000000�00000004024�12166360012�016422� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnand() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <limits.h> #include "minus-zero.h" #include "infinity.h" #include "nan.h" #include "macros.h" int main () { /* Finite values. */ ASSERT (!isnand (3.141)); ASSERT (!isnand (3.141e30)); ASSERT (!isnand (3.141e-30)); ASSERT (!isnand (-2.718)); ASSERT (!isnand (-2.718e30)); ASSERT (!isnand (-2.718e-30)); ASSERT (!isnand (0.0)); ASSERT (!isnand (minus_zerod)); /* Infinite values. */ ASSERT (!isnand (Infinityd ())); ASSERT (!isnand (- Infinityd ())); /* Quiet NaN. */ ASSERT (isnand (NaNd ())); #if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; memory_double m; m.value = NaNd (); # if DBL_EXPBIT0_BIT > 0 m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); # else m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << DBL_EXPBIT0_BIT; ASSERT (isnand (m.value)); } #endif return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sprintf-posix.h������������������������������������������0000664�0000000�0000000�00000326572�12166360012�020012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible vsprintf() and sprintf() functions. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include "minus-zero.h" #include "infinity.h" #include "nan.h" /* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */ static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = minus_zerod; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ #ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } #else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } #endif static int strmatch (const char *pattern, const char *string) { if (strlen (pattern) != strlen (string)) return 0; for (; *pattern != '\0'; pattern++, string++) if (*pattern != '*' && *string != *pattern) return 0; return 1; } /* Test whether string[start_index..end_index-1] is a valid textual representation of NaN. */ static int strisnan (const char *string, size_t start_index, size_t end_index, int uppercase) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static void test_function (int (*my_sprintf) (char *, const char *, ...)) { char buf[8]; /* Test return value convention. */ { int retval; memcpy (buf, "DEADBEEF", 8); retval = my_sprintf (buf, "%d", 12345); ASSERT (retval == 5); ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } /* Test support of size specifiers as in C99. */ { char result[1000]; int retval = my_sprintf (result, "%ju %d", (uintmax_t) 12345671, 33, 44, 55); ASSERT (strcmp (result, "12345671 33") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "%zu %d", (size_t) 12345672, 33, 44, 55); ASSERT (strcmp (result, "12345672 33") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55); ASSERT (strcmp (result, "12345673 33") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "%Lg %d", (long double) 1.5, 33, 44, 55); ASSERT (strcmp (result, "1.5 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal output of floating-point numbers. */ { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%a %d", 3.1416015625, 33, 44, 55); ASSERT (strcmp (result, "0x1.922p+1 33") == 0 || strcmp (result, "0x3.244p+0 33") == 0 || strcmp (result, "0x6.488p-1 33") == 0 || strcmp (result, "0xc.91p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%A %d", -3.1416015625, 33, 44, 55); ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 || strcmp (result, "-0X3.244P+0 33") == 0 || strcmp (result, "-0X6.488P-1 33") == 0 || strcmp (result, "-0XC.91P-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%a %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%a %d", minus_zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%a %d", Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%a %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%a %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding near the decimal point. */ char result[1000]; int retval = my_sprintf (result, "%.0a %d", 1.5, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 0. */ char result[1000]; int retval = my_sprintf (result, "%.0a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 1. */ char result[1000]; int retval = my_sprintf (result, "%.1a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.8p+0 33") == 0 || strcmp (result, "0x3.0p-1 33") == 0 || strcmp (result, "0x6.1p-2 33") == 0 || strcmp (result, "0xc.1p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 2. */ char result[1000]; int retval = my_sprintf (result, "%.2a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.83p+0 33") == 0 || strcmp (result, "0x3.05p-1 33") == 0 || strcmp (result, "0x6.0ap-2 33") == 0 || strcmp (result, "0xc.14p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 3. */ char result[1000]; int retval = my_sprintf (result, "%.3a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.829p+0 33") == 0 || strcmp (result, "0x3.052p-1 33") == 0 || strcmp (result, "0x6.0a4p-2 33") == 0 || strcmp (result, "0xc.148p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. */ char result[1000]; int retval = my_sprintf (result, "%.3a %d", 1.49999, 33, 44, 55); ASSERT (strcmp (result, "0x1.800p+0 33") == 0 || strcmp (result, "0x3.000p-1 33") == 0 || strcmp (result, "0x6.000p-2 33") == 0 || strcmp (result, "0xc.000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */ char result[1000]; int retval = my_sprintf (result, "%.1a %d", 1.999, 33, 44, 55); ASSERT (strcmp (result, "0x1.0p+1 33") == 0 || strcmp (result, "0x2.0p+0 33") == 0 || strcmp (result, "0x4.0p-1 33") == 0 || strcmp (result, "0x8.0p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Small precision. */ char result[1000]; int retval = my_sprintf (result, "%.10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 || strcmp (result, "0x3.8000000000p-1 33") == 0 || strcmp (result, "0x7.0000000000p-2 33") == 0 || strcmp (result, "0xe.0000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Large precision. */ char result[1000]; int retval = my_sprintf (result, "%.50a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7p-2 33") == 0 || strcmp (result, "0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 || strcmp (result, "+0x3.8p-1 33") == 0 || strcmp (result, "+0x7p-2 33") == 0 || strcmp (result, "+0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7.p-2 33") == 0 || strcmp (result, "0xe.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#a %d", 1.0, 33, 44, 55); ASSERT (strcmp (result, "0x1.p+0 33") == 0 || strcmp (result, "0x2.p-1 33") == 0 || strcmp (result, "0x4.p-2 33") == 0 || strcmp (result, "0x8.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%010a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x001.cp+0 33") == 0 || strcmp (result, "0x003.8p-1 33") == 0 || strcmp (result, "0x00007p-2 33") == 0 || strcmp (result, "0x0000ep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%010a %d", Infinityd (), 33, 44, 55); /* "0000000inf 33" is not a valid result; see <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050a %d", NaNd (), 33, 44, 55); /* "0000000nan 33" is not a valid result; see <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%La %d", 3.1416015625L, 33, 44, 55); ASSERT (strcmp (result, "0x1.922p+1 33") == 0 || strcmp (result, "0x3.244p+0 33") == 0 || strcmp (result, "0x6.488p-1 33") == 0 || strcmp (result, "0xc.91p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%LA %d", -3.1416015625L, 33, 44, 55); ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 || strcmp (result, "-0X3.244P+0 33") == 0 || strcmp (result, "-0X6.488P-1 33") == 0 || strcmp (result, "-0XC.91P-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%La %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%La %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%La %d", Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%La %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%La %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Rounding near the decimal point. */ char result[1000]; int retval = my_sprintf (result, "%.0La %d", 1.5L, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 0. */ char result[1000]; int retval = my_sprintf (result, "%.0La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 1. */ char result[1000]; int retval = my_sprintf (result, "%.1La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.8p+0 33") == 0 || strcmp (result, "0x3.0p-1 33") == 0 || strcmp (result, "0x6.1p-2 33") == 0 || strcmp (result, "0xc.1p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 2. */ char result[1000]; int retval = my_sprintf (result, "%.2La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.83p+0 33") == 0 || strcmp (result, "0x3.05p-1 33") == 0 || strcmp (result, "0x6.0ap-2 33") == 0 || strcmp (result, "0xc.14p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 3. */ char result[1000]; int retval = my_sprintf (result, "%.3La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.829p+0 33") == 0 || strcmp (result, "0x3.052p-1 33") == 0 || strcmp (result, "0x6.0a4p-2 33") == 0 || strcmp (result, "0xc.148p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. */ char result[1000]; int retval = my_sprintf (result, "%.3La %d", 1.49999L, 33, 44, 55); ASSERT (strcmp (result, "0x1.800p+0 33") == 0 || strcmp (result, "0x3.000p-1 33") == 0 || strcmp (result, "0x6.000p-2 33") == 0 || strcmp (result, "0xc.000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */ char result[1000]; int retval = my_sprintf (result, "%.1La %d", 1.999L, 33, 44, 55); ASSERT (strcmp (result, "0x1.0p+1 33") == 0 || strcmp (result, "0x2.0p+0 33") == 0 || strcmp (result, "0x4.0p-1 33") == 0 || strcmp (result, "0x8.0p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Small precision. */ char result[1000]; int retval = my_sprintf (result, "%.10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 || strcmp (result, "0x3.8000000000p-1 33") == 0 || strcmp (result, "0x7.0000000000p-2 33") == 0 || strcmp (result, "0xe.0000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Large precision. */ char result[1000]; int retval = my_sprintf (result, "%.50La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7p-2 33") == 0 || strcmp (result, "0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 || strcmp (result, "+0x3.8p-1 33") == 0 || strcmp (result, "+0x7p-2 33") == 0 || strcmp (result, "+0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7.p-2 33") == 0 || strcmp (result, "0xe.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#La %d", 1.0L, 33, 44, 55); ASSERT (strcmp (result, "0x1.p+0 33") == 0 || strcmp (result, "0x2.p-1 33") == 0 || strcmp (result, "0x4.p-2 33") == 0 || strcmp (result, "0x8.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%010La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x001.cp+0 33") == 0 || strcmp (result, "0x003.8p-1 33") == 0 || strcmp (result, "0x00007p-2 33") == 0 || strcmp (result, "0x0000ep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%010La %d", Infinityl (), 33, 44, 55); /* "0000000inf 33" is not a valid result; see <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050La %d", NaNl (), 33, 44, 55); /* "0000000nan 33" is not a valid result; see <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %f format directive. */ { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%f %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%f %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "0.000000" }, { 1.234321234321234e-36, "0.000000" }, { 1.234321234321234e-35, "0.000000" }, { 1.234321234321234e-34, "0.000000" }, { 1.234321234321234e-33, "0.000000" }, { 1.234321234321234e-32, "0.000000" }, { 1.234321234321234e-31, "0.000000" }, { 1.234321234321234e-30, "0.000000" }, { 1.234321234321234e-29, "0.000000" }, { 1.234321234321234e-28, "0.000000" }, { 1.234321234321234e-27, "0.000000" }, { 1.234321234321234e-26, "0.000000" }, { 1.234321234321234e-25, "0.000000" }, { 1.234321234321234e-24, "0.000000" }, { 1.234321234321234e-23, "0.000000" }, { 1.234321234321234e-22, "0.000000" }, { 1.234321234321234e-21, "0.000000" }, { 1.234321234321234e-20, "0.000000" }, { 1.234321234321234e-19, "0.000000" }, { 1.234321234321234e-18, "0.000000" }, { 1.234321234321234e-17, "0.000000" }, { 1.234321234321234e-16, "0.000000" }, { 1.234321234321234e-15, "0.000000" }, { 1.234321234321234e-14, "0.000000" }, { 1.234321234321234e-13, "0.000000" }, { 1.234321234321234e-12, "0.000000" }, { 1.234321234321234e-11, "0.000000" }, { 1.234321234321234e-10, "0.000000" }, { 1.234321234321234e-9, "0.000000" }, { 1.234321234321234e-8, "0.000000" }, { 1.234321234321234e-7, "0.000000" }, { 1.234321234321234e-6, "0.000001" }, { 1.234321234321234e-5, "0.000012" }, { 1.234321234321234e-4, "0.000123" }, { 1.234321234321234e-3, "0.001234" }, { 1.234321234321234e-2, "0.012343" }, { 1.234321234321234e-1, "0.123432" }, { 1.234321234321234, "1.234321" }, { 1.234321234321234e1, "12.343212" }, { 1.234321234321234e2, "123.432123" }, { 1.234321234321234e3, "1234.321234" }, { 1.234321234321234e4, "12343.212343" }, { 1.234321234321234e5, "123432.123432" }, { 1.234321234321234e6, "1234321.234321" }, { 1.234321234321234e7, "12343212.343212" }, { 1.234321234321234e8, "123432123.432123" }, { 1.234321234321234e9, "1234321234.321234" }, { 1.234321234321234e10, "12343212343.2123**" }, { 1.234321234321234e11, "123432123432.123***" }, { 1.234321234321234e12, "1234321234321.23****" }, { 1.234321234321234e13, "12343212343212.3*****" }, { 1.234321234321234e14, "123432123432123.******" }, { 1.234321234321234e15, "1234321234321234.000000" }, { 1.234321234321234e16, "123432123432123**.000000" }, { 1.234321234321234e17, "123432123432123***.000000" }, { 1.234321234321234e18, "123432123432123****.000000" }, { 1.234321234321234e19, "123432123432123*****.000000" }, { 1.234321234321234e20, "123432123432123******.000000" }, { 1.234321234321234e21, "123432123432123*******.000000" }, { 1.234321234321234e22, "123432123432123********.000000" }, { 1.234321234321234e23, "123432123432123*********.000000" }, { 1.234321234321234e24, "123432123432123**********.000000" }, { 1.234321234321234e25, "123432123432123***********.000000" }, { 1.234321234321234e26, "123432123432123************.000000" }, { 1.234321234321234e27, "123432123432123*************.000000" }, { 1.234321234321234e28, "123432123432123**************.000000" }, { 1.234321234321234e29, "123432123432123***************.000000" }, { 1.234321234321234e30, "123432123432123****************.000000" }, { 1.234321234321234e31, "123432123432123*****************.000000" }, { 1.234321234321234e32, "123432123432123******************.000000" }, { 1.234321234321234e33, "123432123432123*******************.000000" }, { 1.234321234321234e34, "123432123432123********************.000000" }, { 1.234321234321234e35, "123432123432123*********************.000000" }, { 1.234321234321234e36, "123432123432123**********************.000000" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%f", data[k].value); ASSERT (strmatch (data[k].string, result)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%f %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%f %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%f %d", minus_zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%f %d", Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%f %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%f %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%015f %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015f %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050f %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.f %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.2f %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.2f %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "0.000000" }, { 1.234321234321234e-36L, "0.000000" }, { 1.234321234321234e-35L, "0.000000" }, { 1.234321234321234e-34L, "0.000000" }, { 1.234321234321234e-33L, "0.000000" }, { 1.234321234321234e-32L, "0.000000" }, { 1.234321234321234e-31L, "0.000000" }, { 1.234321234321234e-30L, "0.000000" }, { 1.234321234321234e-29L, "0.000000" }, { 1.234321234321234e-28L, "0.000000" }, { 1.234321234321234e-27L, "0.000000" }, { 1.234321234321234e-26L, "0.000000" }, { 1.234321234321234e-25L, "0.000000" }, { 1.234321234321234e-24L, "0.000000" }, { 1.234321234321234e-23L, "0.000000" }, { 1.234321234321234e-22L, "0.000000" }, { 1.234321234321234e-21L, "0.000000" }, { 1.234321234321234e-20L, "0.000000" }, { 1.234321234321234e-19L, "0.000000" }, { 1.234321234321234e-18L, "0.000000" }, { 1.234321234321234e-17L, "0.000000" }, { 1.234321234321234e-16L, "0.000000" }, { 1.234321234321234e-15L, "0.000000" }, { 1.234321234321234e-14L, "0.000000" }, { 1.234321234321234e-13L, "0.000000" }, { 1.234321234321234e-12L, "0.000000" }, { 1.234321234321234e-11L, "0.000000" }, { 1.234321234321234e-10L, "0.000000" }, { 1.234321234321234e-9L, "0.000000" }, { 1.234321234321234e-8L, "0.000000" }, { 1.234321234321234e-7L, "0.000000" }, { 1.234321234321234e-6L, "0.000001" }, { 1.234321234321234e-5L, "0.000012" }, { 1.234321234321234e-4L, "0.000123" }, { 1.234321234321234e-3L, "0.001234" }, { 1.234321234321234e-2L, "0.012343" }, { 1.234321234321234e-1L, "0.123432" }, { 1.234321234321234L, "1.234321" }, { 1.234321234321234e1L, "12.343212" }, { 1.234321234321234e2L, "123.432123" }, { 1.234321234321234e3L, "1234.321234" }, { 1.234321234321234e4L, "12343.212343" }, { 1.234321234321234e5L, "123432.123432" }, { 1.234321234321234e6L, "1234321.234321" }, { 1.234321234321234e7L, "12343212.343212" }, { 1.234321234321234e8L, "123432123.432123" }, { 1.234321234321234e9L, "1234321234.321234" }, { 1.234321234321234e10L, "12343212343.2123**" }, { 1.234321234321234e11L, "123432123432.123***" }, { 1.234321234321234e12L, "1234321234321.23****" }, { 1.234321234321234e13L, "12343212343212.3*****" }, { 1.234321234321234e14L, "123432123432123.******" }, { 1.234321234321234e15L, "1234321234321234.000000" }, { 1.234321234321234e16L, "123432123432123**.000000" }, { 1.234321234321234e17L, "123432123432123***.000000" }, { 1.234321234321234e18L, "123432123432123****.000000" }, { 1.234321234321234e19L, "123432123432123*****.000000" }, { 1.234321234321234e20L, "123432123432123******.000000" }, { 1.234321234321234e21L, "123432123432123*******.000000" }, { 1.234321234321234e22L, "123432123432123********.000000" }, { 1.234321234321234e23L, "123432123432123*********.000000" }, { 1.234321234321234e24L, "123432123432123**********.000000" }, { 1.234321234321234e25L, "123432123432123***********.000000" }, { 1.234321234321234e26L, "123432123432123************.000000" }, { 1.234321234321234e27L, "123432123432123*************.000000" }, { 1.234321234321234e28L, "123432123432123**************.000000" }, { 1.234321234321234e29L, "123432123432123***************.000000" }, { 1.234321234321234e30L, "123432123432123****************.000000" }, { 1.234321234321234e31L, "123432123432123*****************.000000" }, { 1.234321234321234e32L, "123432123432123******************.000000" }, { 1.234321234321234e33L, "123432123432123*******************.000000" }, { 1.234321234321234e34L, "123432123432123********************.000000" }, { 1.234321234321234e35L, "123432123432123*********************.000000" }, { 1.234321234321234e36L, "123432123432123**********************.000000" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%Lf", data[k].value); ASSERT (strmatch (data[k].string, result)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%Lf %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%015Lf %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015Lf %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050Lf %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.Lf %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.2Lf %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.2Lf %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %F format directive. */ { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%F %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%F %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%F %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%F %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%F %d", minus_zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%F %d", Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "INF 33") == 0 || strcmp (result, "INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%F %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "-INF 33") == 0 || strcmp (result, "-INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%F %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 1) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO. */ char result[1000]; int retval = my_sprintf (result, "%015F %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015F %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, " -INF 33") == 0 || strcmp (result, " -INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.F %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.2F %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.2F %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "INF 33") == 0 || strcmp (result, "INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "-INF 33") == 0 || strcmp (result, "-INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%LF %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 1) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO. */ char result[1000]; int retval = my_sprintf (result, "%015LF %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015LF %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, " -INF 33") == 0 || strcmp (result, " -INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.LF %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.2LF %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.2LF %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %e format directive. */ { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%e %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "1.275000e+01 33") == 0 || strcmp (result, "1.275000e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%e %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1.234567e+06 33") == 0 || strcmp (result, "1.234567e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "1.234321e-37" }, { 1.234321234321234e-36, "1.234321e-36" }, { 1.234321234321234e-35, "1.234321e-35" }, { 1.234321234321234e-34, "1.234321e-34" }, { 1.234321234321234e-33, "1.234321e-33" }, { 1.234321234321234e-32, "1.234321e-32" }, { 1.234321234321234e-31, "1.234321e-31" }, { 1.234321234321234e-30, "1.234321e-30" }, { 1.234321234321234e-29, "1.234321e-29" }, { 1.234321234321234e-28, "1.234321e-28" }, { 1.234321234321234e-27, "1.234321e-27" }, { 1.234321234321234e-26, "1.234321e-26" }, { 1.234321234321234e-25, "1.234321e-25" }, { 1.234321234321234e-24, "1.234321e-24" }, { 1.234321234321234e-23, "1.234321e-23" }, { 1.234321234321234e-22, "1.234321e-22" }, { 1.234321234321234e-21, "1.234321e-21" }, { 1.234321234321234e-20, "1.234321e-20" }, { 1.234321234321234e-19, "1.234321e-19" }, { 1.234321234321234e-18, "1.234321e-18" }, { 1.234321234321234e-17, "1.234321e-17" }, { 1.234321234321234e-16, "1.234321e-16" }, { 1.234321234321234e-15, "1.234321e-15" }, { 1.234321234321234e-14, "1.234321e-14" }, { 1.234321234321234e-13, "1.234321e-13" }, { 1.234321234321234e-12, "1.234321e-12" }, { 1.234321234321234e-11, "1.234321e-11" }, { 1.234321234321234e-10, "1.234321e-10" }, { 1.234321234321234e-9, "1.234321e-09" }, { 1.234321234321234e-8, "1.234321e-08" }, { 1.234321234321234e-7, "1.234321e-07" }, { 1.234321234321234e-6, "1.234321e-06" }, { 1.234321234321234e-5, "1.234321e-05" }, { 1.234321234321234e-4, "1.234321e-04" }, { 1.234321234321234e-3, "1.234321e-03" }, { 1.234321234321234e-2, "1.234321e-02" }, { 1.234321234321234e-1, "1.234321e-01" }, { 1.234321234321234, "1.234321e+00" }, { 1.234321234321234e1, "1.234321e+01" }, { 1.234321234321234e2, "1.234321e+02" }, { 1.234321234321234e3, "1.234321e+03" }, { 1.234321234321234e4, "1.234321e+04" }, { 1.234321234321234e5, "1.234321e+05" }, { 1.234321234321234e6, "1.234321e+06" }, { 1.234321234321234e7, "1.234321e+07" }, { 1.234321234321234e8, "1.234321e+08" }, { 1.234321234321234e9, "1.234321e+09" }, { 1.234321234321234e10, "1.234321e+10" }, { 1.234321234321234e11, "1.234321e+11" }, { 1.234321234321234e12, "1.234321e+12" }, { 1.234321234321234e13, "1.234321e+13" }, { 1.234321234321234e14, "1.234321e+14" }, { 1.234321234321234e15, "1.234321e+15" }, { 1.234321234321234e16, "1.234321e+16" }, { 1.234321234321234e17, "1.234321e+17" }, { 1.234321234321234e18, "1.234321e+18" }, { 1.234321234321234e19, "1.234321e+19" }, { 1.234321234321234e20, "1.234321e+20" }, { 1.234321234321234e21, "1.234321e+21" }, { 1.234321234321234e22, "1.234321e+22" }, { 1.234321234321234e23, "1.234321e+23" }, { 1.234321234321234e24, "1.234321e+24" }, { 1.234321234321234e25, "1.234321e+25" }, { 1.234321234321234e26, "1.234321e+26" }, { 1.234321234321234e27, "1.234321e+27" }, { 1.234321234321234e28, "1.234321e+28" }, { 1.234321234321234e29, "1.234321e+29" }, { 1.234321234321234e30, "1.234321e+30" }, { 1.234321234321234e31, "1.234321e+31" }, { 1.234321234321234e32, "1.234321e+32" }, { 1.234321234321234e33, "1.234321e+33" }, { 1.234321234321234e34, "1.234321e+34" }, { 1.234321234321234e35, "1.234321e+35" }, { 1.234321234321234e36, "1.234321e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%e", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%e %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-3.125000e-02 33") == 0 || strcmp (result, "-3.125000e-002 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%e %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000e+00 33") == 0 || strcmp (result, "0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%e %d", minus_zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000e+00 33") == 0 || strcmp (result, "-0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%e %d", Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%e %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%e %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%15e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-15e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.750000e+00 33") == 0 || strcmp (result, "+1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2.e+00 33") == 0 || strcmp (result, "2.e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.e %d", 9.75, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%015e %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "0001.234000e+03 33") == 0 || strcmp (result, "001.234000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015e %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050e %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.e %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.4e %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "9.9995e+02 33") == 0 || strcmp (result, "9.9995e+002 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.4e %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1.0000e+03 33") == 0 || strcmp (result, "1.0000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "1.275000e+01 33") == 0 || strcmp (result, "1.275000e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1.234567e+06 33") == 0 || strcmp (result, "1.234567e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "1.234321e-37" }, { 1.234321234321234e-36L, "1.234321e-36" }, { 1.234321234321234e-35L, "1.234321e-35" }, { 1.234321234321234e-34L, "1.234321e-34" }, { 1.234321234321234e-33L, "1.234321e-33" }, { 1.234321234321234e-32L, "1.234321e-32" }, { 1.234321234321234e-31L, "1.234321e-31" }, { 1.234321234321234e-30L, "1.234321e-30" }, { 1.234321234321234e-29L, "1.234321e-29" }, { 1.234321234321234e-28L, "1.234321e-28" }, { 1.234321234321234e-27L, "1.234321e-27" }, { 1.234321234321234e-26L, "1.234321e-26" }, { 1.234321234321234e-25L, "1.234321e-25" }, { 1.234321234321234e-24L, "1.234321e-24" }, { 1.234321234321234e-23L, "1.234321e-23" }, { 1.234321234321234e-22L, "1.234321e-22" }, { 1.234321234321234e-21L, "1.234321e-21" }, { 1.234321234321234e-20L, "1.234321e-20" }, { 1.234321234321234e-19L, "1.234321e-19" }, { 1.234321234321234e-18L, "1.234321e-18" }, { 1.234321234321234e-17L, "1.234321e-17" }, { 1.234321234321234e-16L, "1.234321e-16" }, { 1.234321234321234e-15L, "1.234321e-15" }, { 1.234321234321234e-14L, "1.234321e-14" }, { 1.234321234321234e-13L, "1.234321e-13" }, { 1.234321234321234e-12L, "1.234321e-12" }, { 1.234321234321234e-11L, "1.234321e-11" }, { 1.234321234321234e-10L, "1.234321e-10" }, { 1.234321234321234e-9L, "1.234321e-09" }, { 1.234321234321234e-8L, "1.234321e-08" }, { 1.234321234321234e-7L, "1.234321e-07" }, { 1.234321234321234e-6L, "1.234321e-06" }, { 1.234321234321234e-5L, "1.234321e-05" }, { 1.234321234321234e-4L, "1.234321e-04" }, { 1.234321234321234e-3L, "1.234321e-03" }, { 1.234321234321234e-2L, "1.234321e-02" }, { 1.234321234321234e-1L, "1.234321e-01" }, { 1.234321234321234L, "1.234321e+00" }, { 1.234321234321234e1L, "1.234321e+01" }, { 1.234321234321234e2L, "1.234321e+02" }, { 1.234321234321234e3L, "1.234321e+03" }, { 1.234321234321234e4L, "1.234321e+04" }, { 1.234321234321234e5L, "1.234321e+05" }, { 1.234321234321234e6L, "1.234321e+06" }, { 1.234321234321234e7L, "1.234321e+07" }, { 1.234321234321234e8L, "1.234321e+08" }, { 1.234321234321234e9L, "1.234321e+09" }, { 1.234321234321234e10L, "1.234321e+10" }, { 1.234321234321234e11L, "1.234321e+11" }, { 1.234321234321234e12L, "1.234321e+12" }, { 1.234321234321234e13L, "1.234321e+13" }, { 1.234321234321234e14L, "1.234321e+14" }, { 1.234321234321234e15L, "1.234321e+15" }, { 1.234321234321234e16L, "1.234321e+16" }, { 1.234321234321234e17L, "1.234321e+17" }, { 1.234321234321234e18L, "1.234321e+18" }, { 1.234321234321234e19L, "1.234321e+19" }, { 1.234321234321234e20L, "1.234321e+20" }, { 1.234321234321234e21L, "1.234321e+21" }, { 1.234321234321234e22L, "1.234321e+22" }, { 1.234321234321234e23L, "1.234321e+23" }, { 1.234321234321234e24L, "1.234321e+24" }, { 1.234321234321234e25L, "1.234321e+25" }, { 1.234321234321234e26L, "1.234321e+26" }, { 1.234321234321234e27L, "1.234321e+27" }, { 1.234321234321234e28L, "1.234321e+28" }, { 1.234321234321234e29L, "1.234321e+29" }, { 1.234321234321234e30L, "1.234321e+30" }, { 1.234321234321234e31L, "1.234321e+31" }, { 1.234321234321234e32L, "1.234321e+32" }, { 1.234321234321234e33L, "1.234321e+33" }, { 1.234321234321234e34L, "1.234321e+34" }, { 1.234321234321234e35L, "1.234321e+35" }, { 1.234321234321234e36L, "1.234321e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%Le", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-3.125000e-02 33") == 0 || strcmp (result, "-3.125000e-002 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000e+00 33") == 0 || strcmp (result, "0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000e+00 33") == 0 || strcmp (result, "-0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%Le %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%15Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-15Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.750000e+00 33") == 0 || strcmp (result, "+1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2.e+00 33") == 0 || strcmp (result, "2.e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.Le %d", 9.75L, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%015Le %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "0001.234000e+03 33") == 0 || strcmp (result, "001.234000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015Le %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050Le %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.Le %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.4Le %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "9.9995e+02 33") == 0 || strcmp (result, "9.9995e+002 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.4Le %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1.0000e+03 33") == 0 || strcmp (result, "1.0000e+003 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %g format directive. */ { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%g %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.75 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%g %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1.23457e+06 33") == 0 || strcmp (result, "1.23457e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "1.23432e-37" }, { 1.234321234321234e-36, "1.23432e-36" }, { 1.234321234321234e-35, "1.23432e-35" }, { 1.234321234321234e-34, "1.23432e-34" }, { 1.234321234321234e-33, "1.23432e-33" }, { 1.234321234321234e-32, "1.23432e-32" }, { 1.234321234321234e-31, "1.23432e-31" }, { 1.234321234321234e-30, "1.23432e-30" }, { 1.234321234321234e-29, "1.23432e-29" }, { 1.234321234321234e-28, "1.23432e-28" }, { 1.234321234321234e-27, "1.23432e-27" }, { 1.234321234321234e-26, "1.23432e-26" }, { 1.234321234321234e-25, "1.23432e-25" }, { 1.234321234321234e-24, "1.23432e-24" }, { 1.234321234321234e-23, "1.23432e-23" }, { 1.234321234321234e-22, "1.23432e-22" }, { 1.234321234321234e-21, "1.23432e-21" }, { 1.234321234321234e-20, "1.23432e-20" }, { 1.234321234321234e-19, "1.23432e-19" }, { 1.234321234321234e-18, "1.23432e-18" }, { 1.234321234321234e-17, "1.23432e-17" }, { 1.234321234321234e-16, "1.23432e-16" }, { 1.234321234321234e-15, "1.23432e-15" }, { 1.234321234321234e-14, "1.23432e-14" }, { 1.234321234321234e-13, "1.23432e-13" }, { 1.234321234321234e-12, "1.23432e-12" }, { 1.234321234321234e-11, "1.23432e-11" }, { 1.234321234321234e-10, "1.23432e-10" }, { 1.234321234321234e-9, "1.23432e-09" }, { 1.234321234321234e-8, "1.23432e-08" }, { 1.234321234321234e-7, "1.23432e-07" }, { 1.234321234321234e-6, "1.23432e-06" }, { 1.234321234321234e-5, "1.23432e-05" }, { 1.234321234321234e-4, "0.000123432" }, { 1.234321234321234e-3, "0.00123432" }, { 1.234321234321234e-2, "0.0123432" }, { 1.234321234321234e-1, "0.123432" }, { 1.234321234321234, "1.23432" }, { 1.234321234321234e1, "12.3432" }, { 1.234321234321234e2, "123.432" }, { 1.234321234321234e3, "1234.32" }, { 1.234321234321234e4, "12343.2" }, { 1.234321234321234e5, "123432" }, { 1.234321234321234e6, "1.23432e+06" }, { 1.234321234321234e7, "1.23432e+07" }, { 1.234321234321234e8, "1.23432e+08" }, { 1.234321234321234e9, "1.23432e+09" }, { 1.234321234321234e10, "1.23432e+10" }, { 1.234321234321234e11, "1.23432e+11" }, { 1.234321234321234e12, "1.23432e+12" }, { 1.234321234321234e13, "1.23432e+13" }, { 1.234321234321234e14, "1.23432e+14" }, { 1.234321234321234e15, "1.23432e+15" }, { 1.234321234321234e16, "1.23432e+16" }, { 1.234321234321234e17, "1.23432e+17" }, { 1.234321234321234e18, "1.23432e+18" }, { 1.234321234321234e19, "1.23432e+19" }, { 1.234321234321234e20, "1.23432e+20" }, { 1.234321234321234e21, "1.23432e+21" }, { 1.234321234321234e22, "1.23432e+22" }, { 1.234321234321234e23, "1.23432e+23" }, { 1.234321234321234e24, "1.23432e+24" }, { 1.234321234321234e25, "1.23432e+25" }, { 1.234321234321234e26, "1.23432e+26" }, { 1.234321234321234e27, "1.23432e+27" }, { 1.234321234321234e28, "1.23432e+28" }, { 1.234321234321234e29, "1.23432e+29" }, { 1.234321234321234e30, "1.23432e+30" }, { 1.234321234321234e31, "1.23432e+31" }, { 1.234321234321234e32, "1.23432e+32" }, { 1.234321234321234e33, "1.23432e+33" }, { 1.234321234321234e34, "1.23432e+34" }, { 1.234321234321234e35, "1.23432e+35" }, { 1.234321234321234e36, "1.23432e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%g", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (expected[strlen (expected) - 4] == 'e' && strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%g %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.03125 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%g %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%g %d", minus_zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%g %d", Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%g %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%g %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.75000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.g %d", 9.75, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%010g %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "0000001234 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015g %d", - Infinityd (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050g %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.g %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.5g %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.5g %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.75 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1.23457e+06 33") == 0 || strcmp (result, "1.23457e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "1.23432e-37" }, { 1.234321234321234e-36L, "1.23432e-36" }, { 1.234321234321234e-35L, "1.23432e-35" }, { 1.234321234321234e-34L, "1.23432e-34" }, { 1.234321234321234e-33L, "1.23432e-33" }, { 1.234321234321234e-32L, "1.23432e-32" }, { 1.234321234321234e-31L, "1.23432e-31" }, { 1.234321234321234e-30L, "1.23432e-30" }, { 1.234321234321234e-29L, "1.23432e-29" }, { 1.234321234321234e-28L, "1.23432e-28" }, { 1.234321234321234e-27L, "1.23432e-27" }, { 1.234321234321234e-26L, "1.23432e-26" }, { 1.234321234321234e-25L, "1.23432e-25" }, { 1.234321234321234e-24L, "1.23432e-24" }, { 1.234321234321234e-23L, "1.23432e-23" }, { 1.234321234321234e-22L, "1.23432e-22" }, { 1.234321234321234e-21L, "1.23432e-21" }, { 1.234321234321234e-20L, "1.23432e-20" }, { 1.234321234321234e-19L, "1.23432e-19" }, { 1.234321234321234e-18L, "1.23432e-18" }, { 1.234321234321234e-17L, "1.23432e-17" }, { 1.234321234321234e-16L, "1.23432e-16" }, { 1.234321234321234e-15L, "1.23432e-15" }, { 1.234321234321234e-14L, "1.23432e-14" }, { 1.234321234321234e-13L, "1.23432e-13" }, { 1.234321234321234e-12L, "1.23432e-12" }, { 1.234321234321234e-11L, "1.23432e-11" }, { 1.234321234321234e-10L, "1.23432e-10" }, { 1.234321234321234e-9L, "1.23432e-09" }, { 1.234321234321234e-8L, "1.23432e-08" }, { 1.234321234321234e-7L, "1.23432e-07" }, { 1.234321234321234e-6L, "1.23432e-06" }, { 1.234321234321234e-5L, "1.23432e-05" }, { 1.234321234321234e-4L, "0.000123432" }, { 1.234321234321234e-3L, "0.00123432" }, { 1.234321234321234e-2L, "0.0123432" }, { 1.234321234321234e-1L, "0.123432" }, { 1.234321234321234L, "1.23432" }, { 1.234321234321234e1L, "12.3432" }, { 1.234321234321234e2L, "123.432" }, { 1.234321234321234e3L, "1234.32" }, { 1.234321234321234e4L, "12343.2" }, { 1.234321234321234e5L, "123432" }, { 1.234321234321234e6L, "1.23432e+06" }, { 1.234321234321234e7L, "1.23432e+07" }, { 1.234321234321234e8L, "1.23432e+08" }, { 1.234321234321234e9L, "1.23432e+09" }, { 1.234321234321234e10L, "1.23432e+10" }, { 1.234321234321234e11L, "1.23432e+11" }, { 1.234321234321234e12L, "1.23432e+12" }, { 1.234321234321234e13L, "1.23432e+13" }, { 1.234321234321234e14L, "1.23432e+14" }, { 1.234321234321234e15L, "1.23432e+15" }, { 1.234321234321234e16L, "1.23432e+16" }, { 1.234321234321234e17L, "1.23432e+17" }, { 1.234321234321234e18L, "1.23432e+18" }, { 1.234321234321234e19L, "1.23432e+19" }, { 1.234321234321234e20L, "1.23432e+20" }, { 1.234321234321234e21L, "1.23432e+21" }, { 1.234321234321234e22L, "1.23432e+22" }, { 1.234321234321234e23L, "1.23432e+23" }, { 1.234321234321234e24L, "1.23432e+24" }, { 1.234321234321234e25L, "1.23432e+25" }, { 1.234321234321234e26L, "1.23432e+26" }, { 1.234321234321234e27L, "1.23432e+27" }, { 1.234321234321234e28L, "1.23432e+28" }, { 1.234321234321234e29L, "1.23432e+29" }, { 1.234321234321234e30L, "1.23432e+30" }, { 1.234321234321234e31L, "1.23432e+31" }, { 1.234321234321234e32L, "1.23432e+32" }, { 1.234321234321234e33L, "1.23432e+33" }, { 1.234321234321234e34L, "1.23432e+34" }, { 1.234321234321234e35L, "1.23432e+35" }, { 1.234321234321234e36L, "1.23432e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[1000]; int retval = my_sprintf (result, "%Lg", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (expected[strlen (expected) - 4] == 'e' && strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.03125 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[1000]; int retval = my_sprintf (result, "%Lg %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[1000]; int retval = my_sprintf (result, "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[1000]; int retval = my_sprintf (result, "%10Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[1000]; int retval = my_sprintf (result, "%-10Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[1000]; int retval = my_sprintf (result, "%+Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[1000]; int retval = my_sprintf (result, "% Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.75000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[1000]; int retval = my_sprintf (result, "%#.Lg %d", 9.75L, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[1000]; int retval = my_sprintf (result, "%010Lg %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "0000001234 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[1000]; int retval = my_sprintf (result, "%015Lg %d", - Infinityl (), 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[1000]; int retval = my_sprintf (result, "%050Lg %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[1000]; int retval = my_sprintf (result, "%.Lg %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_sprintf (result, "%.5Lg %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_sprintf (result, "%.5Lg %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %n format directive. */ { int count = -1; char result[1000]; int retval = my_sprintf (result, "%d %n", 123, &count, 33, 44, 55); ASSERT (strcmp (result, "123 ") == 0); ASSERT (retval == strlen (result)); ASSERT (count == 4); } /* Test the support of the POSIX/XSI format strings with positions. */ { char result[1000]; int retval = my_sprintf (result, "%2$d %1$d", 33, 55); ASSERT (strcmp (result, "55 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the grouping flag. */ { char result[1000]; int retval = my_sprintf (result, "%'d %d", 1234567, 99); ASSERT (result[strlen (result) - 1] == '9'); ASSERT (retval == strlen (result)); } /* Test the support of the left-adjust flag. */ { char result[1000]; int retval = my_sprintf (result, "a%*sc", -3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "a%-*sc", 3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "a%-*sc", -3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } /* Test the support of large precision. */ { char result[5000]; int retval = my_sprintf (result, "%.4000d %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.*d %d", 4000, 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.4000d %d", -1234567, 99); size_t i; ASSERT (result[0] == '-'); for (i = 0; i < 4000 - 7; i++) ASSERT (result[1 + i] == '0'); ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.4000u %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.4000o %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.4000x %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 6; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%#.4000x %d", 1234567, 99); size_t i; ASSERT (result[0] == '0'); ASSERT (result[1] == 'x'); for (i = 0; i < 4000 - 6; i++) ASSERT (result[2 + i] == '0'); ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_sprintf (result, "%.4000f %d", 1.0, 99); size_t i; ASSERT (result[0] == '1'); ASSERT (result[1] == '.'); for (i = 0; i < 4000; i++) ASSERT (result[2 + i] == '0'); ASSERT (strcmp (result + 2 + 4000, " 99") == 0); ASSERT (retval == strlen (result)); } { char result[1000]; int retval = my_sprintf (result, "%.511f %d", 1.0, 99); size_t i; ASSERT (result[0] == '1'); ASSERT (result[1] == '.'); for (i = 0; i < 511; i++) ASSERT (result[2 + i] == '0'); ASSERT (strcmp (result + 2 + 511, " 99") == 0); ASSERT (retval == strlen (result)); } { char input[5000]; char result[5000]; int retval; size_t i; for (i = 0; i < sizeof (input) - 1; i++) input[i] = 'a' + ((1000000 / (i + 1)) % 26); input[i] = '\0'; retval = my_sprintf (result, "%.4000s %d", input, 99); ASSERT (memcmp (result, input, 4000) == 0); ASSERT (strcmp (result + 4000, " 99") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %s format directive. */ /* To verify that these tests succeed, it is necessary to run them under a tool that checks against invalid memory accesses, such as ElectricFence or "valgrind --tool=memcheck". */ { size_t i; for (i = 1; i <= 8; i++) { char *block; char result[5000]; int retval; block = (char *) malloc (i); memcpy (block, "abcdefgh", i); retval = my_sprintf (result, "%.*s", (int) i, block); ASSERT (memcmp (result, block, i) == 0); ASSERT (result[i] == '\0'); ASSERT (retval == strlen (result)); free (block); } } #if HAVE_WCHAR_T { size_t i; for (i = 1; i <= 8; i++) { wchar_t *block; size_t j; char result[5000]; int retval; block = (wchar_t *) malloc (i * sizeof (wchar_t)); for (j = 0; j < i; j++) block[j] = "abcdefgh"[j]; retval = my_sprintf (result, "%.*ls", (int) i, block); ASSERT (memcmp (result, "abcdefgh", i) == 0); ASSERT (result[i] == '\0'); ASSERT (retval == strlen (result)); free (block); } } #endif } ��������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello2.sh�����������������������������������������������0000775�0000000�0000000�00000000107�11433657032�016710� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh exec ./test-ftello${EXEEXT} 1 2 < "$srcdir/test-ftello2.sh" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-lock.c���������������������������������������������������0000664�0000000�0000000�00000036276�12166360012�016107� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of locking in multithreaded situations. Copyright (C) 2005, 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. */ #include <config.h> #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 #endif #if USE_SOLARIS_THREADS # define TEST_SOLARIS_THREADS 1 #endif #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif #if USE_WINDOWS_THREADS # define TEST_WINDOWS_THREADS 1 #endif /* Whether to enable locking. Uncomment this to get a test program without locking, to verify that it crashes. */ #define ENABLE_LOCKING 1 /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking is enabled. */ #define DO_TEST_LOCK 1 #define DO_TEST_RWLOCK 1 #define DO_TEST_RECURSIVE_LOCK 1 #define DO_TEST_ONCE 1 /* Whether to help the scheduler through explicit yield(). Uncomment this to see if the operating system has a fair scheduler. */ #define EXPLICIT_YIELD 1 /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 /* Number of simultaneous threads. */ #define THREAD_COUNT 10 /* Number of operations performed in each thread. This is quite high, because with a smaller count, say 5000, we often get an "OK" result even without ENABLE_LOCKING (on Linux/x86). */ #define REPEAT_COUNT 50000 #include <stdio.h> #include <stdlib.h> #include <string.h> #if !ENABLE_LOCKING # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS # undef USE_WINDOWS_THREADS #endif #include "glthread/lock.h" #if !ENABLE_LOCKING # if TEST_POSIX_THREADS # define USE_POSIX_THREADS 1 # endif # if TEST_SOLARIS_THREADS # define USE_SOLARIS_THREADS 1 # endif # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif # if TEST_WINDOWS_THREADS # define USE_WINDOWS_THREADS 1 # endif #endif #include "glthread/thread.h" #include "glthread/yield.h" #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif #define ACCOUNT_COUNT 4 static int account[ACCOUNT_COUNT]; static int random_account (void) { return ((unsigned int) rand () >> 3) % ACCOUNT_COUNT; } static void check_accounts (void) { int i, sum; sum = 0; for (i = 0; i < ACCOUNT_COUNT; i++) sum += account[i]; if (sum != ACCOUNT_COUNT * 1000) abort (); } /* ------------------- Test normal (non-recursive) locks ------------------- */ /* Test normal locks by having several bank accounts and several threads which shuffle around money between the accounts and another thread checking that all the money is still there. */ gl_lock_define_initialized(static, my_lock) static void * lock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); dbgprintf ("Mutator %p after lock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand () >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } static volatile int lock_checker_done; static void * lock_checker_thread (void *arg) { while (!lock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } static void test_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; lock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (lock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (lock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); lock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ----------------- Test read-write (non-recursive) locks ----------------- */ /* Test read-write locks by having several bank accounts and several threads which shuffle around money between the accounts and several other threads that check that all the money is still there. */ gl_rwlock_define_initialized(static, my_rwlock) static void * rwlock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before wrlock\n", gl_thread_self_pointer ()); gl_rwlock_wrlock (my_rwlock); dbgprintf ("Mutator %p after wrlock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand () >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_rwlock_unlock (my_rwlock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } static volatile int rwlock_checker_done; static void * rwlock_checker_thread (void *arg) { while (!rwlock_checker_done) { dbgprintf ("Checker %p before check rdlock\n", gl_thread_self_pointer ()); gl_rwlock_rdlock (my_rwlock); check_accounts (); gl_rwlock_unlock (my_rwlock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } static void test_rwlock (void) { int i; gl_thread_t checkerthreads[THREAD_COUNT]; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; rwlock_checker_done = 0; /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) checkerthreads[i] = gl_thread_create (rwlock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (rwlock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); rwlock_checker_done = 1; for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (checkerthreads[i], NULL); check_accounts (); } /* -------------------------- Test recursive locks -------------------------- */ /* Test recursive locks by having several bank accounts and several threads which shuffle around money between the accounts (recursively) and another thread checking that all the money is still there. */ gl_recursive_lock_define_initialized(static, my_reclock) static void recshuffle (void) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); dbgprintf ("Mutator %p after lock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand () >> 3) % 10; account[i1] += value; account[i2] -= value; /* Recursive with probability 0.5. */ if (((unsigned int) rand () >> 3) % 2) recshuffle (); dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); } static void * reclock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { recshuffle (); dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } static volatile int reclock_checker_done; static void * reclock_checker_thread (void *arg) { while (!reclock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } static void test_recursive_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; reclock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (reclock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (reclock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); reclock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ------------------------ Test once-only execution ------------------------ */ /* Test once-only execution by having several threads attempt to grab a once-only task simultaneously (triggered by releasing a read-write lock). */ gl_once_define(static, fresh_once) static int ready[THREAD_COUNT]; static gl_lock_t ready_lock[THREAD_COUNT]; #if ENABLE_LOCKING static gl_rwlock_t fire_signal[REPEAT_COUNT]; #else static volatile int fire_signal_state; #endif static gl_once_t once_control; static int performed; gl_lock_define_initialized(static, performed_lock) static void once_execute (void) { gl_lock_lock (performed_lock); performed++; gl_lock_unlock (performed_lock); } static void * once_contender_thread (void *arg) { int id = (int) (long) arg; int repeat; for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Tell the main thread that we're ready. */ gl_lock_lock (ready_lock[id]); ready[id] = 1; gl_lock_unlock (ready_lock[id]); if (repeat == REPEAT_COUNT) break; dbgprintf ("Contender %p waiting for signal for round %d\n", gl_thread_self_pointer (), repeat); #if ENABLE_LOCKING /* Wait for the signal to go. */ gl_rwlock_rdlock (fire_signal[repeat]); /* And don't hinder the others (if the scheduler is unfair). */ gl_rwlock_unlock (fire_signal[repeat]); #else /* Wait for the signal to go. */ while (fire_signal_state <= repeat) yield (); #endif dbgprintf ("Contender %p got the signal for round %d\n", gl_thread_self_pointer (), repeat); /* Contend for execution. */ gl_once (once_control, once_execute); } return NULL; } static void test_once (void) { int i, repeat; gl_thread_t threads[THREAD_COUNT]; /* Initialize all variables. */ for (i = 0; i < THREAD_COUNT; i++) { ready[i] = 0; gl_lock_init (ready_lock[i]); } #if ENABLE_LOCKING for (i = 0; i < REPEAT_COUNT; i++) gl_rwlock_init (fire_signal[i]); #else fire_signal_state = 0; #endif /* Block all fire_signals. */ for (i = REPEAT_COUNT-1; i >= 0; i--) gl_rwlock_wrlock (fire_signal[i]); /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i); for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Wait until every thread is ready. */ dbgprintf ("Main thread before synchonizing for round %d\n", repeat); for (;;) { int ready_count = 0; for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready_count += ready[i]; gl_lock_unlock (ready_lock[i]); } if (ready_count == THREAD_COUNT) break; yield (); } dbgprintf ("Main thread after synchonizing for round %d\n", repeat); if (repeat > 0) { /* Check that exactly one thread executed the once_execute() function. */ if (performed != 1) abort (); } if (repeat == REPEAT_COUNT) break; /* Preparation for the next round: Initialize once_control. */ memcpy (&once_control, &fresh_once, sizeof (gl_once_t)); /* Preparation for the next round: Reset the performed counter. */ performed = 0; /* Preparation for the next round: Reset the ready flags. */ for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready[i] = 0; gl_lock_unlock (ready_lock[i]); } /* Signal all threads simultaneously. */ dbgprintf ("Main thread giving signal for round %d\n", repeat); #if ENABLE_LOCKING gl_rwlock_unlock (fire_signal[repeat]); #else fire_signal_state = repeat + 1; #endif } /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); } /* -------------------------------------------------------------------------- */ int main () { #if TEST_PTH_THREADS if (!pth_init ()) abort (); #endif #if DO_TEST_LOCK printf ("Starting test_lock ..."); fflush (stdout); test_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RWLOCK printf ("Starting test_rwlock ..."); fflush (stdout); test_rwlock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RECURSIVE_LOCK printf ("Starting test_recursive_lock ..."); fflush (stdout); test_recursive_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_ONCE printf ("Starting test_once ..."); fflush (stdout); test_once (); printf (" OK\n"); fflush (stdout); #endif return 0; } #else /* No multithreading available. */ #include <stdio.h> int main () { fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-isnanf.h�������������������������������������������������0000664�0000000�0000000�00000004100�12166360012�016417� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnanf() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <limits.h> #include "minus-zero.h" #include "infinity.h" #include "nan.h" #include "macros.h" int main () { /* Finite values. */ ASSERT (!isnanf (3.141f)); ASSERT (!isnanf (3.141e30f)); ASSERT (!isnanf (3.141e-30f)); ASSERT (!isnanf (-2.718f)); ASSERT (!isnanf (-2.718e30f)); ASSERT (!isnanf (-2.718e-30f)); ASSERT (!isnanf (0.0f)); ASSERT (!isnanf (minus_zerof)); /* Infinite values. */ ASSERT (!isnanf (Infinityf ())); ASSERT (!isnanf (- Infinityf ())); /* Quiet NaN. */ ASSERT (isnanf (NaNf ())); #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; memory_float m; m.value = NaNf (); # if FLT_EXPBIT0_BIT > 0 m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); # else m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif if (FLT_EXPBIT0_WORD < NWORDS / 2) m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; else m.word[0] |= (unsigned int) 1; ASSERT (isnanf (m.value)); } #endif return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fopen.h��������������������������������������������������0000664�0000000�0000000�00000004113�12166360012�016254� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of opening a file stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* Include <config.h> and a form of <stdio.h> first. */ #include <errno.h> #include <unistd.h> #include "macros.h" /* Test fopen. Assumes BASE is defined. */ static int test_fopen (void) { FILE *f; /* Remove anything from prior partial run. */ unlink (BASE "file"); /* Read requires existing file. */ errno = 0; ASSERT (fopen (BASE "file", "r") == NULL); ASSERT (errno == ENOENT); /* Write can create a file. */ f = fopen (BASE "file", "w"); ASSERT (f); ASSERT (fclose (f) == 0); /* Trailing slash is invalid on non-directory. */ errno = 0; ASSERT (fopen (BASE "file/", "r") == NULL); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); /* Cannot create a directory. */ errno = 0; ASSERT (fopen ("nonexist.ent/", "w") == NULL); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT || errno == EINVAL); /* Directories cannot be opened for writing. */ errno = 0; ASSERT (fopen (".", "w") == NULL); ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES); /* /dev/null must exist, and be writable. */ f = fopen ("/dev/null", "r"); ASSERT (f); ASSERT (fclose (f) == 0); f = fopen ("/dev/null", "w"); ASSERT (f); ASSERT (fclose (f) == 0); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude3.sh����������������������������������������������0000775�0000000�0000000�00000002427�12166360012�017055� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test include cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT foo: 1 foo*: 0 bar: 0 foobar: 1 baz: 1 bar/qux: 1 EOT test-exclude -include in -- foo 'foo*' bar foobar baz bar/qux > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-symlink.c������������������������������������������������0000664�0000000�0000000�00000002422�12166360012�016627� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of symlink. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (symlink, int, (char const *, char const *)); #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include "ignore-value.h" #include "macros.h" #define BASE "test-symlink.t" #include "test-symlink.h" int main (void) { /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); return test_symlink (symlink, true); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/argmatch.h����������������������������������������������������0000664�0000000�0000000�00000007600�12166360012�015762� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* argmatch.h -- definitions and prototypes for argmatch.c Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by David MacKenzie <djm@ai.mit.edu> Modified by Akim Demaille <demaille@inf.enst.fr> */ #ifndef ARGMATCH_H_ # define ARGMATCH_H_ 1 # include <stddef.h> # include "verify.h" # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) /* Assert there are as many real arguments as there are values (argument list ends with a NULL guard). */ # define ARGMATCH_VERIFY(Arglist, Vallist) \ verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1) /* Return the index of the element of ARGLIST (NULL terminated) that matches with ARG. If VALLIST is not NULL, then use it to resolve false ambiguities (i.e., different matches of ARG but corresponding to the same values in VALLIST). */ ptrdiff_t argmatch (char const *arg, char const *const *arglist, char const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE; # define ARGMATCH(Arg, Arglist, Vallist) \ argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist)) /* xargmatch calls this function when it fails. This function should not return. By default, this is a function that calls ARGMATCH_DIE which in turn defaults to 'exit (exit_failure)'. */ typedef void (*argmatch_exit_fn) (void); extern argmatch_exit_fn argmatch_die; /* Report on stderr why argmatch failed. Report correct values. */ void argmatch_invalid (char const *context, char const *value, ptrdiff_t problem); /* Left for compatibility with the old name invalid_arg */ # define invalid_arg(Context, Value, Problem) \ argmatch_invalid (Context, Value, Problem) /* Report on stderr the list of possible arguments. */ void argmatch_valid (char const *const *arglist, char const *vallist, size_t valsize); # define ARGMATCH_VALID(Arglist, Vallist) \ argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist)) /* Same as argmatch, but upon failure, report an explanation of the failure, and exit using the function EXIT_FN. */ ptrdiff_t __xargmatch_internal (char const *context, char const *arg, char const *const *arglist, char const *vallist, size_t valsize, argmatch_exit_fn exit_fn); /* Programmer friendly interface to __xargmatch_internal. */ # define XARGMATCH(Context, Arg, Arglist, Vallist) \ ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ (char const *) (Vallist), \ sizeof *(Vallist), \ argmatch_die)]) /* Convert a value into a corresponding argument. */ char const *argmatch_to_argument (char const *value, char const *const *arglist, char const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE; # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \ argmatch_to_argument (Value, Arglist, \ (char const *) (Vallist), sizeof *(Vallist)) #endif /* ARGMATCH_H_ */ ��������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude1.sh����������������������������������������������0000775�0000000�0000000�00000002426�12166360012�017052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test literal matches cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT foo: 0 foo*: 1 bar: 1 foobar: 0 baz: 0 bar/qux: 0 EOT test-exclude in -- foo 'foo*' bar foobar baz bar/qux > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-c-ctype.c������������������������������������������������0000664�0000000�0000000�00000026053�12166360012�016513� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of character handling in C locale. Copyright (C) 2005, 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. */ #include <config.h> #include "c-ctype.h" #include <locale.h> #include "macros.h" static void test_all (void) { int c; for (c = -0x80; c < 0x100; c++) { ASSERT (c_isascii (c) == (c >= 0 && c < 0x80)); switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': ASSERT (c_isalnum (c) == 1); break; default: ASSERT (c_isalnum (c) == 0); break; } switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': ASSERT (c_isalpha (c) == 1); break; default: ASSERT (c_isalpha (c) == 0); break; } switch (c) { case '\t': case ' ': ASSERT (c_isblank (c) == 1); break; default: ASSERT (c_isblank (c) == 0); break; } ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f)); switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': ASSERT (c_isdigit (c) == 1); break; default: ASSERT (c_isdigit (c) == 0); break; } switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': ASSERT (c_islower (c) == 1); break; default: ASSERT (c_islower (c) == 0); break; } ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' ')); ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f)); ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c))); switch (c) { case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': ASSERT (c_isspace (c) == 1); break; default: ASSERT (c_isspace (c) == 0); break; } switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': ASSERT (c_isupper (c) == 1); break; default: ASSERT (c_isupper (c) == 0); break; } switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': ASSERT (c_isxdigit (c) == 1); break; default: ASSERT (c_isxdigit (c) == 0); break; } switch (c) { case 'A': ASSERT (c_tolower (c) == 'a'); ASSERT (c_toupper (c) == c); break; case 'B': ASSERT (c_tolower (c) == 'b'); ASSERT (c_toupper (c) == c); break; case 'C': ASSERT (c_tolower (c) == 'c'); ASSERT (c_toupper (c) == c); break; case 'D': ASSERT (c_tolower (c) == 'd'); ASSERT (c_toupper (c) == c); break; case 'E': ASSERT (c_tolower (c) == 'e'); ASSERT (c_toupper (c) == c); break; case 'F': ASSERT (c_tolower (c) == 'f'); ASSERT (c_toupper (c) == c); break; case 'G': ASSERT (c_tolower (c) == 'g'); ASSERT (c_toupper (c) == c); break; case 'H': ASSERT (c_tolower (c) == 'h'); ASSERT (c_toupper (c) == c); break; case 'I': ASSERT (c_tolower (c) == 'i'); ASSERT (c_toupper (c) == c); break; case 'J': ASSERT (c_tolower (c) == 'j'); ASSERT (c_toupper (c) == c); break; case 'K': ASSERT (c_tolower (c) == 'k'); ASSERT (c_toupper (c) == c); break; case 'L': ASSERT (c_tolower (c) == 'l'); ASSERT (c_toupper (c) == c); break; case 'M': ASSERT (c_tolower (c) == 'm'); ASSERT (c_toupper (c) == c); break; case 'N': ASSERT (c_tolower (c) == 'n'); ASSERT (c_toupper (c) == c); break; case 'O': ASSERT (c_tolower (c) == 'o'); ASSERT (c_toupper (c) == c); break; case 'P': ASSERT (c_tolower (c) == 'p'); ASSERT (c_toupper (c) == c); break; case 'Q': ASSERT (c_tolower (c) == 'q'); ASSERT (c_toupper (c) == c); break; case 'R': ASSERT (c_tolower (c) == 'r'); ASSERT (c_toupper (c) == c); break; case 'S': ASSERT (c_tolower (c) == 's'); ASSERT (c_toupper (c) == c); break; case 'T': ASSERT (c_tolower (c) == 't'); ASSERT (c_toupper (c) == c); break; case 'U': ASSERT (c_tolower (c) == 'u'); ASSERT (c_toupper (c) == c); break; case 'V': ASSERT (c_tolower (c) == 'v'); ASSERT (c_toupper (c) == c); break; case 'W': ASSERT (c_tolower (c) == 'w'); ASSERT (c_toupper (c) == c); break; case 'X': ASSERT (c_tolower (c) == 'x'); ASSERT (c_toupper (c) == c); break; case 'Y': ASSERT (c_tolower (c) == 'y'); ASSERT (c_toupper (c) == c); break; case 'Z': ASSERT (c_tolower (c) == 'z'); ASSERT (c_toupper (c) == c); break; case 'a': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'A'); break; case 'b': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'B'); break; case 'c': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'C'); break; case 'd': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'D'); break; case 'e': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'E'); break; case 'f': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'F'); break; case 'g': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'G'); break; case 'h': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'H'); break; case 'i': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'I'); break; case 'j': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'J'); break; case 'k': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'K'); break; case 'l': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'L'); break; case 'm': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'M'); break; case 'n': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'N'); break; case 'o': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'O'); break; case 'p': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'P'); break; case 'q': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Q'); break; case 'r': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'R'); break; case 's': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'S'); break; case 't': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'T'); break; case 'u': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'U'); break; case 'v': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'V'); break; case 'w': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'W'); break; case 'x': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'X'); break; case 'y': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Y'); break; case 'z': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Z'); break; default: ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == c); break; } } } int main () { test_all (); setlocale (LC_ALL, "de_DE"); test_all (); setlocale (LC_ALL, "ja_JP.EUC-JP"); test_all (); return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/get-rusage-as.c�����������������������������������������������0000664�0000000�0000000�00000027416�12166360012�016642� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Getter for RLIMIT_AS. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "resource-ext.h" /* The "address space size" is defined as the total size of the virtual memory areas of the current process. This includes - areas belonging to the executable and shared libraries, - areas allocated by malloc() or mmap(), - the stack and environment areas, - gaps and guard pages (mappings with PROT_NONE), - other system dependent areas, such as vsyscall or vdso on Linux. There are two ways of retrieving the current address space size: a) by trying setrlimit with various values and observing whether the kernel allows additional mmap calls, b) by using system dependent APIs that allow to iterate over the list of virtual memory areas. We don't use the mincore() based approach here, because it would be very slow when applied to an entire address space, especially on 64-bit platforms. We define two functions get_rusage_as_via_setrlimit(), get_rusage_as_via_iterator(). Discussion per platform: Linux: a) setrlimit with RLIMIT_AS works. b) The /proc/self/maps file contains a list of the virtual memory areas. Both methods agree, except that on x86_64 systems, the value of get_rusage_as_via_iterator() is 4 KB higher than get_rusage_as_via_setrlimit(). MacOS X: a) setrlimit with RLIMIT_AS succeeds but does not really work: The OS ignores RLIMIT_AS. mmap() of a page always succeeds, therefore get_rusage_as_via_setrlimit() is always 0. b) The Mach based API works. FreeBSD: a) setrlimit with RLIMIT_AS works. b) The /proc/self/maps file contains a list of the virtual memory areas. NetBSD: a) setrlimit with RLIMIT_AS works. b) The /proc/self/maps file contains a list of the virtual memory areas. Both methods agree, OpenBSD: a) setrlimit exists, but RLIMIT_AS is not defined. b) mquery() can be used to find out about the virtual memory areas. AIX: a) setrlimit with RLIMIT_AS succeeds but does not really work: The OS apparently ignores RLIMIT_AS. mmap() of a page always succeeds, therefore get_rusage_as_via_setrlimit() is always 0. b) No VMA iteration API exists. HP-UX: a) setrlimit with RLIMIT_AS works. b) No VMA iteration API exists. IRIX: a) setrlimit with RLIMIT_AS works. b) The /proc/$pid file supports ioctls PIOCNMAP and PIOCMAP. Both methods agree, OSF/1: a) setrlimit with RLIMIT_AS works. b) The /proc/$pid file supports ioctls PIOCNMAP and PIOCMAP. The value returned by get_rusage_as_via_setrlimit() is 64 KB higher than get_rusage_as_via_iterator(). It's not clear why. Solaris: a) setrlimit with RLIMIT_AS works. b) No VMA iteration API exists. Cygwin: a) setrlimit with RLIMIT_AS always fails when the limit is < 0x80000000. get_rusage_as_via_setrlimit() therefore produces a wrong value. b) The /proc/$pid/maps file lists only the memory areas belonging to the executable and shared libraries, not the anonymous memory. But the native Windows API works. mingw: a) There is no setrlimit function. b) The native Windows API works. BeOS, Haiku: a) On BeOS, there is no setrlimit function. On Haiku, setrlimit exists. RLIMIT_AS is defined but unsupported. b) There is a specific BeOS API: get_next_area_info(). */ #include <errno.h> /* errno */ #include <stdlib.h> /* size_t, abort */ #include <fcntl.h> /* open, O_RDONLY */ #include <unistd.h> /* getpagesize, read, close */ /* System support for get_rusage_as_via_setrlimit(). */ #if HAVE_SETRLIMIT # include <sys/time.h> # include <sys/resource.h> /* getrlimit, setrlimit */ #endif /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an mprotect() function in libgcc.a. */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # include <fcntl.h> # include <sys/types.h> # include <sys/mman.h> /* mmap, munmap */ /* Define MAP_FILE when it isn't otherwise. */ # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif /* System support for get_rusage_as_via_iterator(). */ #include "vma-iter.h" #if HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT static inline uintptr_t get_rusage_as_via_setrlimit (void) { uintptr_t result; struct rlimit orig_limit; # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd < 0) return 0; # endif /* Record the original limit. */ if (getrlimit (RLIMIT_AS, &orig_limit) < 0) { result = 0; goto done2; } if (orig_limit.rlim_max != RLIM_INFINITY && (orig_limit.rlim_cur == RLIM_INFINITY || orig_limit.rlim_cur > orig_limit.rlim_max)) /* We may not be able to restore the current rlim_cur value. So bail out. */ { result = 0; goto done2; } { /* The granularity is a single page. */ const size_t pagesize = getpagesize (); uintptr_t low_bound = 0; uintptr_t high_bound; for (;;) { /* Here we know that the address space size is >= low_bound. */ struct rlimit try_limit; uintptr_t try_next = 2 * low_bound + pagesize; if (try_next < low_bound) /* Overflow. */ try_next = ((uintptr_t) (~ 0) / pagesize) * pagesize; /* There's no point in trying a value > orig_limit.rlim_max, as setrlimit would fail anyway. */ if (orig_limit.rlim_max != RLIM_INFINITY && orig_limit.rlim_max < try_next) try_next = orig_limit.rlim_max; /* Avoid endless loop. */ if (try_next == low_bound) { /* try_next could not be increased. */ result = low_bound; goto done1; } try_limit.rlim_max = orig_limit.rlim_max; try_limit.rlim_cur = try_next; if (setrlimit (RLIMIT_AS, &try_limit) == 0) { /* Allocate a page of memory, to compare the current address space size with try_limit.rlim_cur. */ void *new_page = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (new_page != (void *)(-1)) { /* The page could be added successfully. Free it. */ if (munmap (new_page, pagesize) < 0) abort (); /* We know that the address space size is < try_limit.rlim_cur. */ high_bound = try_next; break; } else { /* We know that the address space size is >= try_limit.rlim_cur. */ low_bound = try_next; } } else { /* Here we expect only EINVAL, not EPERM. */ if (errno != EINVAL) abort (); /* We know that the address space size is >= try_limit.rlim_cur. */ low_bound = try_next; } } /* Here we know that the address space size is >= low_bound and < high_bound. */ while (high_bound - low_bound > pagesize) { struct rlimit try_limit; uintptr_t try_next = low_bound + (((high_bound - low_bound) / 2) / pagesize) * pagesize; /* Here low_bound <= try_next < high_bound. */ try_limit.rlim_max = orig_limit.rlim_max; try_limit.rlim_cur = try_next; if (setrlimit (RLIMIT_AS, &try_limit) == 0) { /* Allocate a page of memory, to compare the current address space size with try_limit.rlim_cur. */ void *new_page = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (new_page != (void *)(-1)) { /* The page could be added successfully. Free it. */ if (munmap (new_page, pagesize) < 0) abort (); /* We know that the address space size is < try_limit.rlim_cur. */ high_bound = try_next; } else { /* We know that the address space size is >= try_limit.rlim_cur. */ low_bound = try_next; } } else { /* Here we expect only EINVAL, not EPERM. */ if (errno != EINVAL) abort (); /* We know that the address space size is >= try_limit.rlim_cur. */ low_bound = try_next; } } result = low_bound; } done1: /* Restore the original rlim_cur value. */ if (setrlimit (RLIMIT_AS, &orig_limit) < 0) abort (); done2: # if !HAVE_MAP_ANONYMOUS close (fd); # endif return result; } #else static inline uintptr_t get_rusage_as_via_setrlimit (void) { return 0; } #endif #if VMA_ITERATE_SUPPORTED static int vma_iterate_callback (void *data, uintptr_t start, uintptr_t end, unsigned int flags) { uintptr_t *totalp = (uintptr_t *) data; *totalp += end - start; return 0; } static inline uintptr_t get_rusage_as_via_iterator (void) { uintptr_t total = 0; vma_iterate (vma_iterate_callback, &total); return total; } #else static inline uintptr_t get_rusage_as_via_iterator (void) { return 0; } #endif uintptr_t get_rusage_as (void) { #if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ /* MacOS X, AIX, Cygwin */ /* get_rusage_as_via_setrlimit() does not work. Prefer get_rusage_as_via_iterator(). */ return get_rusage_as_via_iterator (); #elif HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT /* Prefer get_rusage_as_via_setrlimit() if it succeeds, because the caller may want to use the result with setrlimit(). */ uintptr_t result; result = get_rusage_as_via_setrlimit (); if (result == 0) result = get_rusage_as_via_iterator (); return result; #else return get_rusage_as_via_iterator (); #endif } #ifdef TEST #include <stdio.h> int main () { printf ("Initially: 0x%08lX 0x%08lX 0x%08lX\n", get_rusage_as_via_setrlimit (), get_rusage_as_via_iterator (), get_rusage_as ()); malloc (0x88); printf ("After small malloc: 0x%08lX 0x%08lX 0x%08lX\n", get_rusage_as_via_setrlimit (), get_rusage_as_via_iterator (), get_rusage_as ()); malloc (0x8812); printf ("After medium malloc: 0x%08lX 0x%08lX 0x%08lX\n", get_rusage_as_via_setrlimit (), get_rusage_as_via_iterator (), get_rusage_as ()); malloc (0x281237); printf ("After large malloc: 0x%08lX 0x%08lX 0x%08lX\n", get_rusage_as_via_setrlimit (), get_rusage_as_via_iterator (), get_rusage_as ()); return 0; } #endif /* TEST */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbscasecmp.c���������������������������������������������0000664�0000000�0000000�00000003461�12166360012�017262� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of case-insensitive string comparison function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <string.h> #include <locale.h> #include "macros.h" int main () { /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; ASSERT (mbscasecmp ("paragraph", "Paragraph") == 0); ASSERT (mbscasecmp ("paragrapH", "parAgRaph") == 0); ASSERT (mbscasecmp ("paragraph", "paraLyzed") < 0); ASSERT (mbscasecmp ("paraLyzed", "paragraph") > 0); ASSERT (mbscasecmp ("para", "paragraph") < 0); ASSERT (mbscasecmp ("paragraph", "para") > 0); /* The following tests shows how mbscasecmp() is different from strcasecmp(). */ ASSERT (mbscasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") == 0); /* özgür */ ASSERT (mbscasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") == 0); /* özgür */ /* This test shows how strings of different size can compare equal. */ ASSERT (mbscasecmp ("turkish", "TURK\304\260SH") == 0); ASSERT (mbscasecmp ("TURK\304\260SH", "turkish") == 0); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseek.sh�������������������������������������������������0000775�0000000�0000000�00000000170�12166360012�016427� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-fseek${EXEEXT} 1 < "$srcdir/test-fseek.sh" || exit 1 echo hi | ./test-fseek${EXEEXT} || exit 1 exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-freading.c�����������������������������������������������0000664�0000000�0000000�00000011123�12166360012�016716� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of freading() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include "freading.h" #include <stdio.h> #include "macros.h" #define TESTFILE "t-freading.tmp" int main (void) { FILE *fp; /* Create a file with some contents. Write-only file is never reading. */ fp = fopen (TESTFILE, "w"); ASSERT (fp); ASSERT (!freading (fp)); ASSERT (fwrite ("foobarsh", 1, 8, fp) == 8); ASSERT (!freading (fp)); ASSERT (fclose (fp) == 0); /* Open it in read-only mode. Read-only file is always reading. */ fp = fopen (TESTFILE, "r"); ASSERT (fp); ASSERT (freading (fp)); ASSERT (fgetc (fp) == 'f'); ASSERT (freading (fp)); ASSERT (fseek (fp, 2, SEEK_CUR) == 0); ASSERT (freading (fp)); ASSERT (fgetc (fp) == 'b'); ASSERT (freading (fp)); fflush (fp); ASSERT (freading (fp)); ASSERT (fgetc (fp) == 'a'); ASSERT (freading (fp)); ASSERT (fseek (fp, 0, SEEK_END) == 0); ASSERT (freading (fp)); ASSERT (fclose (fp) == 0); /* Open it in read-write mode. POSIX requires a reposition (fseek, fsetpos, rewind) or EOF when transitioning from read to write; freading is only deterministic after input or output, but this test case should be portable even on open, after reposition, and at EOF. */ /* First a scenario with only fgetc, fseek, fputc. */ fp = fopen (TESTFILE, "r+"); ASSERT (fp); ASSERT (!freading (fp)); ASSERT (fgetc (fp) == 'f'); ASSERT (freading (fp)); ASSERT (fseek (fp, 2, SEEK_CUR) == 0); /* freading (fp) is undefined here, but fwriting (fp) is false. */ ASSERT (fgetc (fp) == 'b'); ASSERT (freading (fp)); /* This fseek call is necessary when switching from reading to writing. See the description of fopen(), ISO C 99 7.19.5.3.(6). */ ASSERT (fseek (fp, 0, SEEK_CUR) == 0); /* freading (fp) is undefined here, but fwriting (fp) is false. */ ASSERT (fputc ('x', fp) == 'x'); ASSERT (!freading (fp)); ASSERT (fseek (fp, 0, SEEK_END) == 0); /* freading (fp) is undefined here, because on some implementations (e.g. glibc) fseek causes a buffer to be read. fwriting (fp) is undefined as well. */ ASSERT (fclose (fp) == 0); /* Open it in read-write mode. POSIX requires a reposition (fseek, fsetpos, rewind) or EOF when transitioning from read to write; freading is only deterministic after input or output, but this test case should be portable even on open, after reposition, and at EOF. */ /* Here a scenario that includes fflush. */ fp = fopen (TESTFILE, "r+"); ASSERT (fp); ASSERT (!freading (fp)); ASSERT (fgetc (fp) == 'f'); ASSERT (freading (fp)); ASSERT (fseek (fp, 2, SEEK_CUR) == 0); /* freading (fp) is undefined here, but fwriting (fp) is false. */ ASSERT (fgetc (fp) == 'b'); ASSERT (freading (fp)); fflush (fp); /* freading (fp) is undefined here, but fwriting (fp) is false. */ ASSERT (fgetc (fp) == 'x'); ASSERT (freading (fp)); /* This fseek call is necessary when switching from reading to writing. See the description of fopen(), ISO C 99 7.19.5.3.(6). */ ASSERT (fseek (fp, 0, SEEK_CUR) == 0); /* freading (fp) is undefined here, but fwriting (fp) is false. */ ASSERT (fputc ('z', fp) == 'z'); ASSERT (!freading (fp)); ASSERT (fseek (fp, 0, SEEK_END) == 0); /* freading (fp) is undefined here, because on some implementations (e.g. glibc) fseek causes a buffer to be read. fwriting (fp) is undefined as well. */ ASSERT (fclose (fp) == 0); /* Open it in append mode. Write-only file is never reading. */ fp = fopen (TESTFILE, "a"); ASSERT (fp); ASSERT (!freading (fp)); ASSERT (fwrite ("bla", 1, 3, fp) == 3); ASSERT (!freading (fp)); ASSERT (fclose (fp) == 0); ASSERT (remove (TESTFILE) == 0); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-dirname.c������������������������������������������������0000664�0000000�0000000�00000020635�12166360012�016566� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test the gnulib dirname module. Copyright (C) 2005-2007, 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> struct test { const char *name; /* Name under test. */ const char *dir; /* dir_name (name). */ const char *last; /* last_component (name). */ const char *base; /* base_name (name). */ const char *stripped; /* name after strip_trailing_slashes (name). */ bool modified; /* result of strip_trailing_slashes (name). */ bool absolute; /* IS_ABSOLUTE_FILE_NAME (name). */ }; static struct test tests[] = { {"d/f", "d", "f", "f", "d/f", false, false}, {"/d/f", "/d", "f", "f", "/d/f", false, true}, {"d/f/", "d", "f/", "f/", "d/f", true, false}, {"d/f//", "d", "f//", "f/", "d/f", true, false}, {"f", ".", "f", "f", "f", false, false}, {"/", "/", "", "/", "/", false, true}, #if DOUBLE_SLASH_IS_DISTINCT_ROOT {"//", "//", "", "//", "//", false, true}, {"//d", "//", "d", "d", "//d", false, true}, #else {"//", "/", "", "/", "/", true, true}, {"//d", "/", "d", "d", "//d", false, true}, #endif {"///", "/", "", "/", "/", true, true}, {"///a///", "/", "a///", "a/", "///a", true, true}, /* POSIX requires dirname("") and basename("") to both return ".", but dir_name and base_name are defined differently. */ {"", ".", "", "", "", false, false}, {".", ".", ".", ".", ".", false, false}, {"..", ".", "..", "..", "..", false, false}, #if ISSLASH ('\\') {"a\\", ".", "a\\", "a\\", "a", true, false}, {"a\\b", "a", "b", "b", "a\\b", false, false}, {"\\", "\\", "", "\\", "\\", false, true}, {"\\/\\", "\\", "", "\\", "\\", true, true}, {"\\\\/", "\\", "", "\\", "\\", true, true}, {"\\//", "\\", "", "\\", "\\", true, true}, {"//\\", "/", "", "/", "/", true, true}, #else {"a\\", ".", "a\\", "a\\", "a\\", false, false}, {"a\\b", ".", "a\\b", "a\\b", "a\\b", false, false}, {"\\", ".", "\\", "\\", "\\", false, false}, {"\\/\\", "\\", "\\", "\\", "\\/\\",false, false}, {"\\\\/", ".", "\\\\/","\\\\/","\\\\", true, false}, {"\\//", ".", "\\//", "\\/", "\\", true, false}, # if DOUBLE_SLASH_IS_DISTINCT_ROOT {"//\\", "//", "\\", "\\", "//\\", false, true}, # else {"//\\", "/", "\\", "\\", "//\\", false, true}, # endif #endif #if ISSLASH ('\\') # if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE {"c:", "c:", "", "c:", "c:", false, false}, {"c:/", "c:/", "", "c:/", "c:/", false, true}, {"c://", "c:/", "", "c:/", "c:/", true, true}, {"c:/d", "c:/", "d", "d", "c:/d", false, true}, {"c://d", "c:/", "d", "d", "c://d",false, true}, {"c:/d/", "c:/", "d/", "d/", "c:/d", true, true}, {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true}, {"c:d", "c:.", "d", "d", "c:d", false, false}, {"c:d/", "c:.", "d/", "d/", "c:d", true, false}, {"c:d/f", "c:d", "f", "f", "c:d/f",false, false}, {"a:b:c", "a:.", "b:c", "./b:c","a:b:c",false, false}, {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false}, {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false}, # else /* ! FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE */ {"c:", "c:", "", "c:", "c:", false, true}, {"c:/", "c:", "", "c:", "c:", true, true}, {"c://", "c:", "", "c:", "c:", true, true}, {"c:/d", "c:", "d", "d", "c:/d", false, true}, {"c://d", "c:", "d", "d", "c://d",false, true}, {"c:/d/", "c:", "d/", "d/", "c:/d", true, true}, {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true}, {"c:d", "c:", "d", "d", "c:d", false, true}, {"c:d/", "c:", "d/", "d/", "c:d", true, true}, {"c:d/f", "c:d", "f", "f", "c:d/f",false, true}, {"a:b:c", "a:", "b:c", "./b:c","a:b:c",false, true}, {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false}, {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false}, # endif #else /* ! ISSLASH ('\\') */ {"c:", ".", "c:", "c:", "c:", false, false}, {"c:/", ".", "c:/", "c:/", "c:", true, false}, {"c://", ".", "c://", "c:/", "c:", true, false}, {"c:/d", "c:", "d", "d", "c:/d", false, false}, {"c://d", "c:", "d", "d", "c://d",false, false}, {"c:/d/", "c:", "d/", "d/", "c:/d", true, false}, {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, false}, {"c:d", ".", "c:d", "c:d", "c:d", false, false}, {"c:d/", ".", "c:d/", "c:d/", "c:d", true, false}, {"c:d/f", "c:d", "f", "f", "c:d/f",false, false}, {"a:b:c", ".", "a:b:c","a:b:c","a:b:c",false, false}, {"a/b:c", "a", "b:c", "b:c", "a/b:c",false, false}, {"a/b:c/", "a", "b:c/", "b:c/", "a/b:c",true, false}, #endif {"1:", ".", "1:", "1:", "1:", false, false}, {"1:/", ".", "1:/", "1:/", "1:", true, false}, {"/:", "/", ":", ":", "/:", false, true}, {"/:/", "/", ":/", ":/", "/:", true, true}, /* End sentinel. */ {NULL, NULL, NULL, NULL, NULL, false, false} }; int main (void) { struct test *t; bool ok = true; for (t = tests; t->name; t++) { char *dir = dir_name (t->name); int dirlen = dir_len (t->name); char *last = last_component (t->name); char *base = base_name (t->name); int baselen = base_len (base); char *stripped = strdup (t->name); bool modified = strip_trailing_slashes (stripped); bool absolute = IS_ABSOLUTE_FILE_NAME (t->name); if (! (strcmp (dir, t->dir) == 0 && (dirlen == strlen (dir) || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.')))) { ok = false; printf ("dir_name '%s': got '%s' len %d," " expected '%s' len %ld\n", t->name, dir, dirlen, t->dir, (unsigned long) strlen (t->dir)); } if (strcmp (last, t->last)) { ok = false; printf ("last_component '%s': got '%s', expected '%s'\n", t->name, last, t->last); } if (! (strcmp (base, t->base) == 0 && (baselen == strlen (base) || (baselen + 1 == strlen (base) && ISSLASH (base[baselen]))))) { ok = false; printf ("base_name '%s': got '%s' len %d," " expected '%s' len %ld\n", t->name, base, baselen, t->base, (unsigned long) strlen (t->base)); } if (strcmp (stripped, t->stripped) || modified != t->modified) { ok = false; printf ("strip_trailing_slashes '%s': got %s %s, expected %s %s\n", t->name, stripped, modified ? "changed" : "unchanged", t->stripped, t->modified ? "changed" : "unchanged"); } if (t->absolute != absolute) { ok = false; printf ("'%s': got %s, expected %s\n", t->name, absolute ? "absolute" : "relative", t->absolute ? "absolute" : "relative"); } free (dir); free (base); free (stripped); } return ok ? 0 : 1; } ���������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-quotearg.h�����������������������������������������������0000664�0000000�0000000�00000007644�12166360012�017010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of quotearg family of functions. Copyright (C) 2008-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake <ebb9@byu.net>, 2008. */ struct result_strings { char const *str1; /* Translation of "". */ char const *str2; /* Translation of "\0""1\0". */ size_t len2; /* Length of str2. */ char const *str3; /* Translation of "simple". */ char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */ char const *str5; /* Translation of "a:b". */ char const *str6; /* Translation of "a\\b". */ char const *str7a; /* Translation of LQ RQ, in ASCII charset. */ char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */ }; struct result_groups { struct result_strings group1; /* Via quotearg_buffer. */ struct result_strings group2; /* Via quotearg{,_mem}. */ struct result_strings group3; /* Via quotearg_colon{,_mem}. */ }; /* These quotes are borrowed from a pt_PT.utf8 translation. */ # define LQ "\302\253" # define RQ "\302\273" # define LQ_ENC "\\302\\253" # define RQ_ENC "\\302\\273" # define RQ_ESC "\\\302\273" static struct result_strings inputs = { "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ, NULL }; static void compare (char const *a, size_t la, char const *b, size_t lb) { ASSERT (la == lb); ASSERT (memcmp (a, b, la) == 0); ASSERT (b[lb] == '\0'); } static void compare_strings (char *(func) (char const *, size_t *), struct result_strings *results, bool ascii_only) { size_t len; char *p; len = 0; p = func (inputs.str1, &len); compare (results->str1, strlen (results->str1), p, len); len = inputs.len2; p = func (inputs.str2, &len); compare (results->str2, results->len2, p, len); len = SIZE_MAX; p = func (inputs.str3, &len); compare (results->str3, strlen (results->str3), p, len); len = strlen (inputs.str4); p = func (inputs.str4, &len); compare (results->str4, strlen (results->str4), p, len); len = SIZE_MAX; p = func (inputs.str5, &len); compare (results->str5, strlen (results->str5), p, len); len = strlen (inputs.str6); p = func (inputs.str6, &len); compare (results->str6, strlen (results->str6), p, len); len = strlen (inputs.str7a); p = func (inputs.str7a, &len); if (ascii_only) compare (results->str7a, strlen (results->str7a), p, len); else compare (results->str7b, strlen (results->str7b), p, len); } static char * use_quotearg_buffer (const char *str, size_t *len) { static char buf[100]; size_t size; memset (buf, 0xa5, 100); size = quotearg_buffer (buf, 100, str, *len, NULL); *len = size; ASSERT ((unsigned char) buf[size + 1] == 0xa5); return buf; } static char * use_quotearg (const char *str, size_t *len) { char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len); *len = strlen (p); return p; } static char * use_quote_double_quotes (const char *str, size_t *len) { char *p = *len == SIZE_MAX ? quotearg_char (str, '"') : quotearg_char_mem (str, *len, '"'); *len = strlen (p); return p; } static char * use_quotearg_colon (const char *str, size_t *len) { char *p = (*len == SIZE_MAX ? quotearg_colon (str) : quotearg_colon_mem (str, *len)); *len = strlen (p); return p; } ��������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ignore-value.c�������������������������������������������0000664�0000000�0000000�00000003651�12166360012�017543� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test the "ignore-value" module. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake. */ #include <config.h> #include "ignore-value.h" #include <stdio.h> #ifndef _GL_ATTRIBUTE_RETURN_CHECK # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) # define _GL_ATTRIBUTE_RETURN_CHECK # else # define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) # endif #endif struct s { int i; }; static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK; static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK; static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK; static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK; static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK; static char doChar (void) { return 0; } static int doInt (void) { return 0; } static off_t doOff (void) { return 0; } static void * doPtr (void) { return NULL; } static struct s doStruct (void) { static struct s s1; return s1; } int main (void) { /* If this test can compile with -Werror and the same warnings as the rest of the project, then we are properly silencing warnings about ignored return values. */ ignore_value (doChar ()); ignore_value (doInt ()); ignore_value (doOff ()); ignore_value (doPtr ()); ignore_value (doStruct ()); return 0; } ���������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-memrchr.c������������������������������������������������0000664�0000000�0000000�00000004625�12166360012�016605� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <string.h> #include "signature.h" SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t)); #include <stdlib.h> #include "zerosize-ptr.h" #include "macros.h" /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */ #define MEMRCHR (char *) memrchr int main (void) { size_t n = 0x100000; char *input = malloc (n); ASSERT (input); input[n - 1] = 'a'; input[n - 2] = 'b'; memset (input + n - 1026, 'c', 1024); memset (input + 2, 'd', n - 1028); input[1] = 'e'; input[0] = 'a'; /* Basic behavior tests. */ ASSERT (MEMRCHR (input, 'a', n) == input + n - 1); ASSERT (MEMRCHR (input, 'a', 0) == NULL); ASSERT (MEMRCHR (zerosize_ptr (), 'a', 0) == NULL); ASSERT (MEMRCHR (input, 'b', n) == input + n - 2); ASSERT (MEMRCHR (input, 'c', n) == input + n - 3); ASSERT (MEMRCHR (input, 'd', n) == input + n - 1027); ASSERT (MEMRCHR (input, 'a', n - 1) == input); ASSERT (MEMRCHR (input, 'e', n - 1) == input + 1); ASSERT (MEMRCHR (input, 'f', n) == NULL); ASSERT (MEMRCHR (input, '\0', n) == NULL); /* Check that a very long haystack is handled quickly if the byte is found near the end. */ { size_t repeat = 10000; for (; repeat > 0; repeat--) { ASSERT (MEMRCHR (input, 'c', n) == input + n - 3); } } /* Alignment tests. */ { int i, j; for (i = 0; i < 32; i++) { for (j = 0; j < 256; j++) input[i + j] = j; for (j = 0; j < 256; j++) { ASSERT (MEMRCHR (input + i, j, 256) == input + i + j); } } } free (input); return 0; } �����������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/init.sh�������������������������������������������������������0000664�0000000�0000000�00000044114�12166360012�015323� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# source this file; set up for tests # Copyright (C) 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 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 <http://www.gnu.org/licenses/>. # Using this file in a test # ========================= # # The typical skeleton of a test looks like this: # # #!/bin/sh # . "${srcdir=.}/init.sh"; path_prepend_ . # Execute some commands. # Note that these commands are executed in a subdirectory, therefore you # need to prepend "../" to relative filenames in the build directory. # Note that the "path_prepend_ ." is useful only if the body of your # test invokes programs residing in the initial directory. # For example, if the programs you want to test are in src/, and this test # script is named tests/test-1, then you would use "path_prepend_ ../src", # or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" # to all tests via automake's TESTS_ENVIRONMENT. # Set the exit code 0 for success, 77 for skipped, or 1 or other for failure. # Use the skip_ and fail_ functions to print a diagnostic and then exit # with the corresponding exit code. # Exit $? # Executing a test that uses this file # ==================================== # # Running a single test: # $ make check TESTS=test-foo.sh # # Running a single test, with verbose output: # $ make check TESTS=test-foo.sh VERBOSE=yes # # Running a single test, with single-stepping: # 1. Go into a sub-shell: # $ bash # 2. Set relevant environment variables from TESTS_ENVIRONMENT in the # Makefile: # $ export srcdir=../../tests # this is an example # 3. Execute the commands from the test, copy&pasting them one by one: # $ . "$srcdir/init.sh"; path_prepend_ . # ... # 4. Finally # $ exit ME_=`expr "./$0" : '.*/\(.*\)$'` # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. # So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. # Turn off errexit here so that we don't trip the bug with OSF1/Tru64 # sh inside this function. Exit () { set +e; (exit $1); exit $1; } # Print warnings (e.g., about skipped and failed tests) to this file number. # Override by defining to say, 9, in init.cfg, and putting say, # export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2 # in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file. # This is useful when using automake's parallel tests mode, to print # the reason for skip/failure to console, rather than to the .log files. : ${stderr_fileno_=2} # Note that correct expansion of "$*" depends on IFS starting with ' '. # Always write the full diagnostic to stderr. # When stderr_fileno_ is not 2, also emit the first line of the # diagnostic to that file descriptor. warn_ () { # If IFS does not start with ' ', set it and emit the warning in a subshell. case $IFS in ' '*) printf '%s\n' "$*" >&2 test $stderr_fileno_ = 2 \ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;; *) (IFS=' '; warn_ "$@");; esac } fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; } skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; } fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; } framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; } # Sanitize this shell to POSIX mode, if possible. DUALCASE=1; export DUALCASE if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # We require $(...) support unconditionally. # We require a few additional shell features only when $EXEEXT is nonempty, # in order to support automatic $EXEEXT emulation: # - hyphen-containing alias names # - we prefer to use ${var#...} substitution, rather than having # to work around lack of support for that feature. # The following code attempts to find a shell with support for these features. # If the current shell passes the test, we're done. Otherwise, test other # shells until we find one that passes. If one is found, re-exec it. # If no acceptable shell is found, skip the current test. # # The "...set -x; P=1 true 2>err..." test is to disqualify any shell that # emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do. # # Use "9" to indicate success (rather than 0), in case some shell acts # like Solaris 10's /bin/sh but exits successfully instead of with status 2. # Eval this code in a subshell to determine a shell's suitability. # 10 - passes all tests; ok to use # 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score # ? - not ok gl_shell_test_script_=' test $(echo y) = y || exit 1 score_=10 if test "$VERBOSE" = yes; then test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 fi test -z "$EXEEXT" && exit $score_ shopt -s expand_aliases alias a-b="echo zoo" v=abx test ${v%x} = ab \ && test ${v#a} = bx \ && test $(a-b) = zoo \ && exit $score_ ' if test "x$1" = "x--no-reexec"; then shift else # Assume a working shell. Export to subshells (setup_ needs this). gl_set_x_corrupts_stderr_=false export gl_set_x_corrupts_stderr_ # Record the first marginally acceptable shell. marginal_= # Search for a shell that meets our requirements. for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \ /bin/sh bash dash zsh pdksh fail do test "$re_shell_" = no_shell && continue # If we've made it all the way to the sentinel, "fail" without # finding even a marginal shell, skip this test. if test "$re_shell_" = fail; then test -z "$marginal_" && skip_ failed to find an adequate shell re_shell_=$marginal_ break fi # When testing the current shell, simply "eval" the test code. # Otherwise, run it via $re_shell_ -c ... if test "$re_shell_" = __current__; then # 'eval'ing this code makes Solaris 10's /bin/sh exit with # $? set to 2. It does not evaluate any of the code after the # "unexpected" first '('. Thus, we must run it in a subshell. ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 else "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null fi st_=$? # $re_shell_ works just fine. Use it. if test $st_ = 10; then gl_set_x_corrupts_stderr_=false break fi # If this is our first marginally acceptable shell, remember it. if test "$st_:$marginal_" = 9: ; then marginal_="$re_shell_" gl_set_x_corrupts_stderr_=true fi done if test "$re_shell_" != __current__; then # Found a usable shell. Preserve -v and -x. case $- in *v*x* | *x*v*) opts_=-vx ;; *v*) opts_=-v ;; *x*) opts_=-x ;; *) opts_= ;; esac exec "$re_shell_" $opts_ "$0" --no-reexec "$@" echo "$ME_: exec failed" 1>&2 exit 127 fi fi test -n "$EXEEXT" && shopt -s expand_aliases # Enable glibc's malloc-perturbing option. # This is useful for exposing code that depends on the fact that # malloc-related functions often return memory that is mostly zeroed. # If you have the time and cycles, use valgrind to do an even better job. : ${MALLOC_PERTURB_=87} export MALLOC_PERTURB_ # This is a stub function that is run upon trap (upon regular exit and # interrupt). Override it with a per-test function, e.g., to unmount # a partition, or to undo any other global state changes. cleanup_ () { :; } # Emit a header similar to that from diff -u; Print the simulated "diff" # command so that the order of arguments is clear. Don't bother with @@ lines. emit_diff_u_header_ () { printf '%s\n' "diff -u $*" \ "--- $1 1970-01-01" \ "+++ $2 1970-01-01" } # Arrange not to let diff or cmp operate on /dev/null, # since on some systems (at least OSF/1 5.1), that doesn't work. # When there are not two arguments, or no argument is /dev/null, return 2. # When one argument is /dev/null and the other is not empty, # cat the nonempty file to stderr and return 1. # Otherwise, return 0. compare_dev_null_ () { test $# = 2 || return 2 if test "x$1" = x/dev/null; then test -s "$2" || return 0 emit_diff_u_header_ "$@"; sed 's/^/+/' "$2" return 1 fi if test "x$2" = x/dev/null; then test -s "$1" || return 0 emit_diff_u_header_ "$@"; sed 's/^/-/' "$1" return 1 fi return 2 } if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then if test -z "$diff_out_"; then compare_ () { diff -u "$@"; } else compare_ () { if diff -u "$@" > diff.out; then # No differences were found, but Solaris 'diff' produces output # "No differences encountered". Hide this output. rm -f diff.out true else cat diff.out rm -f diff.out false fi } fi elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then if test -z "$diff_out_"; then compare_ () { diff -c "$@"; } else compare_ () { if diff -c "$@" > diff.out; then # No differences were found, but AIX and HP-UX 'diff' produce output # "No differences encountered" or "There are no differences between the # files.". Hide this output. rm -f diff.out true else cat diff.out rm -f diff.out false fi } fi elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; } fi # Usage: compare EXPECTED ACTUAL # # Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more. # Otherwise, propagate $? to caller: any diffs have already been printed. compare () { # This looks like it can be factored to use a simple "case $?" # after unchecked compare_dev_null_ invocation, but that would # fail in a "set -e" environment. if compare_dev_null_ "$@"; then return 0 else case $? in 1) return 1;; *) compare_ "$@";; esac fi } # An arbitrary prefix to help distinguish test directories. testdir_prefix_ () { printf gt; } # Run the user-overridable cleanup_ function, remove the temporary # directory and exit with the incoming value of $?. remove_tmp_ () { __st=$? cleanup_ # cd out of the directory we're about to remove cd "$initial_cwd_" || cd / || cd /tmp chmod -R u+rwx "$test_dir_" # If removal fails and exit status was to be 0, then change it to 1. rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } exit $__st } # Given a directory name, DIR, if every entry in it that matches *.exe # contains only the specified bytes (see the case stmt below), then print # a space-separated list of those names and return 0. Otherwise, don't # print anything and return 1. Naming constraints apply also to DIR. find_exe_basenames_ () { feb_dir_=$1 feb_fail_=0 feb_result_= feb_sp_= for feb_file_ in $feb_dir_/*.exe; do # If there was no *.exe file, or there existed a file named "*.exe" that # was deleted between the above glob expansion and the existence test # below, just skip it. test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \ && continue # Exempt [.exe, since we can't create a function by that name, yet # we can't invoke [ by PATH search anyways due to shell builtins. test "x$feb_file_" = "x$feb_dir_/[.exe" && continue case $feb_file_ in *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;; *) # Remove leading file name components as well as the .exe suffix. feb_file_=${feb_file_##*/} feb_file_=${feb_file_%.exe} feb_result_="$feb_result_$feb_sp_$feb_file_";; esac feb_sp_=' ' done test $feb_fail_ = 0 && printf %s "$feb_result_" return $feb_fail_ } # Consider the files in directory, $1. # For each file name of the form PROG.exe, create an alias named # PROG that simply invokes PROG.exe, then return 0. If any selected # file name or the directory name, $1, contains an unexpected character, # define no alias and return 1. create_exe_shims_ () { case $EXEEXT in '') return 0 ;; .exe) ;; *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;; esac base_names_=`find_exe_basenames_ $1` \ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; } if test -n "$base_names_"; then for base_ in $base_names_; do alias "$base_"="$base_$EXEEXT" done fi return 0 } # Use this function to prepend to PATH an absolute name for each # specified, possibly-$initial_cwd_-relative, directory. path_prepend_ () { while test $# != 0; do path_dir_=$1 case $path_dir_ in '') fail_ "invalid path dir: '$1'";; /*) abs_path_dir_=$path_dir_;; *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \ || fail_ "invalid path dir: $path_dir_";; esac case $abs_path_dir_ in *:*) fail_ "invalid path dir: '$abs_path_dir_'";; esac PATH="$abs_path_dir_:$PATH" # Create an alias, FOO, for each FOO.exe in this directory. create_exe_shims_ "$abs_path_dir_" \ || fail_ "something failed (above): $abs_path_dir_" shift done export PATH } setup_ () { if test "$VERBOSE" = yes; then # Test whether set -x may cause the selected shell to corrupt an # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5. # If enabling verbose output this way would cause trouble, simply # issue a warning and refrain. if $gl_set_x_corrupts_stderr_; then warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr" else set -x fi fi initial_cwd_=$PWD fail=0 pfx_=`testdir_prefix_` test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ || fail_ "failed to create temporary directory in $initial_cwd_" cd "$test_dir_" # As autoconf-generated configure scripts do, ensure that IFS # is defined initially, so that saving and restoring $IFS works. gl_init_sh_nl_=' ' IFS=" "" $gl_init_sh_nl_" # This trap statement, along with a trap on 0 below, ensure that the # temporary directory, $test_dir_, is removed upon exit as well as # upon receipt of any of the listed signals. for sig_ in 1 2 3 13 15; do eval "trap 'Exit $(expr $sig_ + 128)' $sig_" done } # Create a temporary directory, much like mktemp -d does. # Written by Jim Meyering. # # Usage: mktempd_ /tmp phoey.XXXXXXXXXX # # First, try to use the mktemp program. # Failing that, we'll roll our own mktemp-like function: # - try to get random bytes from /dev/urandom # - failing that, generate output from a combination of quickly-varying # sources and gzip. Ignore non-varying gzip header, and extract # "random" bits from there. # - given those bits, map to file-name bytes using tr, and try to create # the desired directory. # - make only $MAX_TRIES_ attempts # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9. rand_bytes_ () { n_=$1 # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first? # But if they have openssl, they probably have mktemp, too. chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 dev_rand_=/dev/urandom if test -r "$dev_rand_"; then # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194. dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ return fi n_plus_50_=`expr $n_ + 50` cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' data_=` (eval "$cmds_") 2>&1 | gzip ` # Ensure that $data_ has length at least 50+$n_ while :; do len_=`echo "$data_"|wc -c` test $n_plus_50_ -le $len_ && break; data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip ` done echo "$data_" \ | dd bs=1 skip=50 count=$n_ 2>/dev/null \ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ } mktempd_ () { case $# in 2);; *) fail_ "Usage: mktempd_ DIR TEMPLATE";; esac destdir_=$1 template_=$2 MAX_TRIES_=4 # Disallow any trailing slash on specified destdir: # it would subvert the post-mktemp "case"-based destdir test. case $destdir_ in /) ;; */) fail_ "invalid destination dir: remove trailing slash(es)";; esac case $template_ in *XXXX) ;; *) fail_ \ "invalid template: $template_ (must have a suffix of at least 4 X's)";; esac # First, try to use mktemp. d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ || fail=1 # The resulting name must be in the specified directory. case $d in "$destdir_"*);; *) fail=1;; esac # It must have created the directory. test -d "$d" || fail=1 # It must have 0700 permissions. Handle sticky "S" bits. perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1 case $perms in drwx------*) ;; *) fail=1;; esac test $fail = 0 && { echo "$d" return } # If we reach this point, we'll have to create a directory manually. # Get a copy of the template without its suffix of X's. base_template_=`echo "$template_"|sed 's/XX*$//'` # Calculate how many X's we've just removed. template_length_=`echo "$template_" | wc -c` nx_=`echo "$base_template_" | wc -c` nx_=`expr $template_length_ - $nx_` err_= i_=1 while :; do X_=`rand_bytes_ $nx_` candidate_dir_="$destdir_/$base_template_$X_" err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ && { echo "$candidate_dir_"; return; } test $MAX_TRIES_ -le $i_ && break; i_=`expr $i_ + 1` done fail_ "$err_" } # If you want to override the testdir_prefix_ function, # or to add more utility functions, use this file. test -f "$srcdir/init.cfg" \ && . "$srcdir/init.cfg" setup_ "$@" # This trap is here, rather than in the setup_ function, because some # shells run the exit trap at shell function exit, rather than script exit. trap remove_tmp_ 0 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getcwd-lgpl.c��������������������������������������������0000664�0000000�0000000�00000005105�12166360012�017353� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of getcwd() function. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (getcwd, char *, (char *, size_t)); #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "macros.h" int main (int argc, char **argv) { char *pwd1; char *pwd2; /* If the user provides an argument, attempt to chdir there first. */ if (1 < argc) { if (chdir (argv[1]) == 0) printf ("changed to directory %s\n", argv[1]); } pwd1 = getcwd (NULL, 0); ASSERT (pwd1 && *pwd1); if (1 < argc) printf ("cwd=%s\n", pwd1); /* Make sure the result is usable. */ ASSERT (chdir (pwd1) == 0); ASSERT (chdir (".//./.") == 0); /* Make sure that result is normalized. */ pwd2 = getcwd (NULL, 0); ASSERT (pwd2); ASSERT (strcmp (pwd1, pwd2) == 0); free (pwd2); { size_t len = strlen (pwd1); ssize_t i = len - 10; if (i < 1) i = 1; pwd2 = getcwd (NULL, len + 1); ASSERT (pwd2); free (pwd2); pwd2 = malloc (len + 2); for ( ; i <= len; i++) { char *tmp; errno = 0; ASSERT (getcwd (pwd2, i) == NULL); ASSERT (errno == ERANGE); /* Allow either glibc or BSD behavior, since POSIX allows both. */ errno = 0; tmp = getcwd (NULL, i); if (tmp) { ASSERT (strcmp (pwd1, tmp) == 0); free (tmp); } else { ASSERT (errno == ERANGE); } } ASSERT (getcwd (pwd2, len + 1) == pwd2); pwd2[len] = '/'; pwd2[len + 1] = '\0'; } ASSERT (strstr (pwd2, "/./") == NULL); ASSERT (strstr (pwd2, "/../") == NULL); ASSERT (strstr (pwd2 + 1 + (pwd2[1] == '/'), "//") == NULL); /* Validate a POSIX requirement on size. */ errno = 0; ASSERT (getcwd(pwd2, 0) == NULL); ASSERT (errno == EINVAL); free (pwd1); free (pwd2); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello.sh������������������������������������������������0000775�0000000�0000000�00000000173�11433657032�016631� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-ftello${EXEEXT} 1 < "$srcdir/test-ftello.sh" || exit 1 echo hi | ./test-ftello${EXEEXT} || exit 1 exit 0 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude5.sh����������������������������������������������0000775�0000000�0000000�00000002415�12166360012�017054� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test FNM_LEADING_DIR cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT bar: 1 bar/qux: 1 barz: 0 foo/bar: 1 EOT test-exclude -leading_dir in -- bar bar/qux barz foo/bar > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/putenv.c������������������������������������������������������0000664�0000000�0000000�00000006274�12166360012�015516� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdlib.h> #include <stddef.h> /* Include errno.h *after* sys/types.h to work around header problems on AIX 3.2.5. */ #include <errno.h> #ifndef __set_errno # define __set_errno(ev) ((errno) = (ev)) #endif #include <string.h> #include <unistd.h> #if _LIBC # if HAVE_GNU_LD # define environ __environ # else extern char **environ; # endif #endif #if _LIBC /* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif static int _unsetenv (const char *name) { size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } len = strlen (name); LOCK; ep = environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; do dp[0] = dp[1]; while (*dp++); /* Continue the loop in case NAME appears again. */ } else ++ep; UNLOCK; return 0; } /* Put STRING, which is of the form "NAME=VALUE", in the environment. If STRING contains no '=', then remove STRING from the environment. */ int putenv (char *string) { const char *const name_end = strchr (string, '='); register size_t size; register char **ep; if (name_end == NULL) { /* Remove the variable from the environment. */ return _unsetenv (string); } size = 0; for (ep = environ; *ep != NULL; ++ep) if (!strncmp (*ep, string, name_end - string) && (*ep)[name_end - string] == '=') break; else ++size; if (*ep == NULL) { static char **last_environ = NULL; char **new_environ = (char **) malloc ((size + 2) * sizeof (char *)); if (new_environ == NULL) return -1; (void) memcpy ((void *) new_environ, (void *) environ, size * sizeof (char *)); new_environ[size] = (char *) string; new_environ[size + 1] = NULL; free (last_environ); last_environ = new_environ; environ = new_environ; } else *ep = string; return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsrtowcs4.sh��������������������������������������������0000775�0000000�0000000�00000000604�11433657032�017452� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific GB18030 locale is installed. : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_ZH_CN = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no transitional chinese locale is installed" else echo "Skipping test: no transitional chinese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_ZH_CN \ ./test-mbsrtowcs${EXEEXT} 4 ����������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-unistd.c�������������������������������������������������0000664�0000000�0000000�00000003047�12166360012�016453� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <unistd.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <unistd.h> #include "verify.h" /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that the various *_FILENO macros are defined. */ #if ! (defined STDIN_FILENO \ && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3)) missing or broken *_FILENO macros #endif /* Check that the types are all defined. */ size_t t1; ssize_t t2; #ifdef TODO /* Not implemented in gnulib yet */ uid_t t3; gid_t t4; #endif off_t t5; pid_t t6; #ifdef TODO useconds_t t7; intptr_t t8; #endif int main (void) { return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-open.h���������������������������������������������������0000664�0000000�0000000�00000005661�12166360012�016117� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of opening a file descriptor. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* This file is designed to test both open(n,buf[,mode]) and openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_open (int (*func) (char const *, int, ...), bool print) { int fd; /* Remove anything from prior partial run. */ unlink (BASE "file"); /* Cannot create directory. */ errno = 0; ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT || errno == EINVAL); /* Create a regular file. */ fd = func (BASE "file", O_CREAT | O_RDONLY, 0600); ASSERT (0 <= fd); ASSERT (close (fd) == 0); /* Trailing slash handling. */ errno = 0; ASSERT (func (BASE "file/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); /* Directories cannot be opened for writing. */ errno = 0; ASSERT (func (".", O_WRONLY) == -1); ASSERT (errno == EISDIR || errno == EACCES); /* /dev/null must exist, and be writable. */ fd = func ("/dev/null", O_RDONLY); ASSERT (0 <= fd); { char c; ASSERT (read (fd, &c, 1) == 0); } ASSERT (close (fd) == 0); fd = func ("/dev/null", O_WRONLY); ASSERT (0 <= fd); ASSERT (write (fd, "c", 1) == 1); ASSERT (close (fd) == 0); /* Although O_NONBLOCK on regular files can be ignored, it must not cause a failure. */ fd = func (BASE "file", O_NONBLOCK | O_RDONLY); ASSERT (0 <= fd); ASSERT (close (fd) == 0); /* Symlink handling, where supported. */ if (symlink (BASE "file", BASE "link") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } errno = 0; ASSERT (func (BASE "link/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR); fd = func (BASE "link", O_RDONLY); ASSERT (0 <= fd); ASSERT (close (fd) == 0); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link") == 0); return 0; } �������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fdopendir.c����������������������������������������������0000664�0000000�0000000�00000004154�12166360012�017117� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test opening a directory stream from a file descriptor. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <dirent.h> #include "signature.h" SIGNATURE_CHECK (fdopendir, DIR *, (int)); #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "progname.h" #include "macros.h" int main (int argc _GL_UNUSED, char *argv[]) { DIR *d; int fd; set_program_name (argv[0]); /* A non-directory cannot be turned into a directory stream. */ fd = open ("test-fdopendir.tmp", O_RDONLY | O_CREAT, 0600); ASSERT (0 <= fd); errno = 0; ASSERT (fdopendir (fd) == NULL); ASSERT (errno == ENOTDIR); ASSERT (close (fd) == 0); ASSERT (unlink ("test-fdopendir.tmp") == 0); /* A bad fd cannot be turned into a stream. */ { errno = 0; ASSERT (fdopendir (-1) == NULL); ASSERT (errno == EBADF); } { errno = 0; ASSERT (fdopendir (99) == NULL); ASSERT (errno == EBADF); } /* This should work. */ fd = open (".", O_RDONLY); ASSERT (0 <= fd); d = fdopendir (fd); /* We know that fd is now out of our reach, but it is not specified whether it is closed now or at the closedir. We also can't guarantee whether dirfd returns fd, some other descriptor, or -1. */ ASSERT (d); ASSERT (closedir (d) == 0); /* Now we can guarantee that fd must be closed. */ errno = 0; ASSERT (dup2 (fd, fd) == -1); ASSERT (errno == EBADF); return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-lstat.c��������������������������������������������������0000664�0000000�0000000�00000003405�12166360012�016272� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of lstat() function. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ #include <config.h> #include <sys/stat.h> /* Caution: lstat may be a function-like macro. Although this signature check must pass, it may be the signature of the real (and broken) lstat rather than rpl_lstat. Most code should not use the address of lstat. */ #include "signature.h" SIGNATURE_CHECK (lstat, int, (char const *, struct stat *)); #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "same-inode.h" #include "ignore-value.h" #include "macros.h" #define BASE "test-lstat.t" #include "test-lstat.h" /* Wrapper around lstat, which works even if lstat is a function-like macro, where test_lstat_func(lstat) would do the wrong thing. */ static int do_lstat (char const *name, struct stat *st) { return lstat (name, st); } int main (void) { /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); return test_lstat_func (do_lstat, true); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc1.sh����������������������������������������������0000775�0000000�0000000�00000000545�11433657032�017105� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR \ ./test-mbrtowc${EXEEXT} 1 �����������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko2.sh�����������������������������������������������0000775�0000000�0000000�00000000107�11433657032�016677� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix.sh�����������������������������������������0000775�0000000�0000000�00000000571�11433657032�020156� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-fprintf-posix.tmp t-fprintf-posix.out" ./test-fprintf-posix${EXEEXT} > t-fprintf-posix.tmp || exit 1 LC_ALL=C tr -d '\r' < t-fprintf-posix.tmp > t-fprintf-posix.out || exit 1 : ${DIFF=diff} ${DIFF} "${srcdir}/test-printf-posix.output" t-fprintf-posix.out result=$? rm -fr $tmpfiles exit $result ���������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-isnanl.h�������������������������������������������������0000664�0000000�0000000�00000010504�12166360012�016432� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnanl() substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <float.h> #include <limits.h> #include "minus-zero.h" #include "infinity.h" #include "nan.h" #include "macros.h" int main () { #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* Finite values. */ ASSERT (!isnanl (3.141L)); ASSERT (!isnanl (3.141e30L)); ASSERT (!isnanl (3.141e-30L)); ASSERT (!isnanl (-2.718L)); ASSERT (!isnanl (-2.718e30L)); ASSERT (!isnanl (-2.718e-30L)); ASSERT (!isnanl (0.0L)); ASSERT (!isnanl (minus_zerol)); /* Infinite values. */ ASSERT (!isnanl (Infinityl ())); ASSERT (!isnanl (- Infinityl ())); /* Quiet NaN. */ ASSERT (isnanl (NaNl ())); #if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { memory_long_double m; m.value = NaNl (); # if LDBL_EXPBIT0_BIT > 0 m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); # else m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; ASSERT (isnanl (m.value)); } #endif #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } #endif return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32.c��������������������������������������������0000664�0000000�0000000�00000054115�12166360012�017235� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of multibyte character to wide character. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <wchar.h> #include <errno.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "macros.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ static int test_one_locale (const char *name, int codepage) { mbstate_t state; wchar_t wc; size_t ret; # if 1 /* Portable code to set the locale. */ { char name_with_codepage[1024]; sprintf (name_with_codepage, "%s.%d", name, codepage); /* Set the locale. */ if (setlocale (LC_ALL, name_with_codepage) == NULL) return 77; } # else /* Hacky way to set a locale.codepage combination that setlocale() refuses to set. */ { /* Codepage of the current locale, set with setlocale(). Not necessarily the same as GetACP(). */ extern __declspec(dllimport) unsigned int __lc_codepage; /* Set the locale. */ if (setlocale (LC_ALL, name) == NULL) return 77; /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */ __lc_codepage = codepage; switch (codepage) { case 1252: case 1256: MB_CUR_MAX = 1; break; case 932: case 950: case 936: MB_CUR_MAX = 2; break; case 54936: case 65001: MB_CUR_MAX = 4; break; } /* Test whether the codepage is really available. */ memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1)) return 77; } # endif /* Test zero-length input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "x", 0, &state); /* gnulib's implementation returns (size_t)(-2). The AIX 5.1 implementation returns (size_t)(-1). glibc's implementation returns 0. */ ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0); ASSERT (mbsinit (&state)); } /* Test NUL byte input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "", 1, &state); ASSERT (ret == 0); ASSERT (wc == 0); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, "", 1, &state); ASSERT (ret == 0); ASSERT (mbsinit (&state)); } /* Test single-byte input. */ { int c; char buf[1]; memset (&state, '\0', sizeof (mbstate_t)); for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ buf[0] = c; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, buf, 1, &state); ASSERT (ret == 1); ASSERT (wc == c); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, buf, 1, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); break; } } /* Test special calling convention, passing a NULL pointer. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, NULL, 5, &state); ASSERT (ret == 0); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } switch (codepage) { case 1252: /* Locale encoding is CP1252, an extension of ISO-8859-1. */ { char input[] = "B\374\337er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\374'); ASSERT (wc == 0x00FC); ASSERT (mbsinit (&state)); input[1] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\337'); ASSERT (wc == 0x00DF); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; case 1256: /* Locale encoding is CP1256, not the same as ISO-8859-6. */ { char input[] = "x\302\341\346y"; /* "xآلوy" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'x'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\302'); ASSERT (wc == 0x0622); ASSERT (mbsinit (&state)); input[1] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\341'); ASSERT (wc == 0x0644); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 2, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\346'); ASSERT (wc == 0x0648); ASSERT (mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'y'); ASSERT (mbsinit (&state)); } return 0; case 932: /* Locale encoding is CP932, similar to Shift_JIS. */ { char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x65E5); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 4, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x672C); ASSERT (mbsinit (&state)); input[4] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x8A9E); ASSERT (mbsinit (&state)); input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 1, &state); ASSERT (ret == 1); ASSERT (wc == '>'); ASSERT (mbsinit (&state)); /* Test some invalid input. */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); } return 0; case 950: /* Locale encoding is CP950, similar to Big5. */ { char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x65E5); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 4, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x672C); ASSERT (mbsinit (&state)); input[4] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x8A9E); ASSERT (mbsinit (&state)); input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 1, &state); ASSERT (ret == 1); ASSERT (wc == '>'); ASSERT (mbsinit (&state)); /* Test some invalid input. */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); } return 0; case 936: /* Locale encoding is CP936 = GBK, an extension of GB2312. */ { char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x65E5); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 4, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x672C); ASSERT (mbsinit (&state)); input[4] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x8A9E); ASSERT (mbsinit (&state)); input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 1, &state); ASSERT (ret == 1); ASSERT (wc == '>'); ASSERT (mbsinit (&state)); /* Test some invalid input. */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); } return 0; case 54936: /* Locale encoding is CP54936 = GB18030. */ { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 7, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x00FC); ASSERT (mbsinit (&state)); input[2] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 3, 6, &state); ASSERT (ret == 4); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 6, &state); ASSERT (ret == 4); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x00DF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 8, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); /* Test some invalid input. */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\201\045", 2, &state); /* 0x81 0x25 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\201\060\377", 3, &state); /* 0x81 0x30 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\201\060\377\064", 4, &state); /* 0x81 0x30 0xFF 0x34 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\201\060\211\072", 4, &state); /* 0x81 0x30 0x89 0x3A */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); } return 0; case 65001: /* Locale encoding is CP65001 = UTF-8. */ { char input[] = "B\303\274\303\237er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 5, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x00FC); ASSERT (mbsinit (&state)); input[2] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 3, 4, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 4, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (wc == 0x00DF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 6, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); /* Test some invalid input. */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\303\300", 2, &state); /* 0xC3 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\343\300", 2, &state); /* 0xE3 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\343\300\200", 3, &state); /* 0xE3 0xC0 0x80 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\343\200\300", 3, &state); /* 0xE3 0x80 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\363\300", 2, &state); /* 0xF3 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\363\300\200\200", 4, &state); /* 0xF3 0xC0 0x80 0x80 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\363\200\300", 3, &state); /* 0xF3 0x80 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\363\200\300\200", 4, &state); /* 0xF3 0x80 0xC0 0x80 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "\363\200\200\300", 4, &state); /* 0xF3 0x80 0x80 0xC0 */ ASSERT (ret == (size_t)-1); ASSERT (errno == EILSEQ); } return 0; default: return 1; } } int main (int argc, char *argv[]) { int codepage = atoi (argv[argc - 1]); int result; int i; result = 77; for (i = 1; i < argc - 1; i++) { int ret = test_one_locale (argv[i], codepage); if (ret != 77) result = ret; } if (result == 77) { fprintf (stderr, "Skipping test: found no locale with codepage %d\n", codepage); } return result; } #else int main (int argc, char *argv[]) { fputs ("Skipping test: not a native Windows system\n", stderr); return 77; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-intprops.c�����������������������������������������������0000664�0000000�0000000�00000027040�12166360012�017022� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test intprops.h. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ /* Tell gcc not to warn about the many (X < 0) expressions that the overflow macros expand to. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" #endif #include <config.h> #include "intprops.h" #include "verify.h" #include <stdbool.h> #include <inttypes.h> #include "macros.h" /* VERIFY (X) uses a static assertion for compilers that are known to work, and falls back on a dynamic assertion for other compilers. These tests should be checkable via 'verify' rather than 'ASSERT', but using 'verify' would run into a bug with HP-UX 11.23 cc; see <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */ #if __GNUC__ || __SUNPRO_C # define VERIFY(x) do { verify (x); } while (0) #else # define VERIFY(x) ASSERT (x) #endif int main (void) { /* Use VERIFY for tests that must be integer constant expressions, ASSERT otherwise. */ /* TYPE_IS_INTEGER. */ ASSERT (TYPE_IS_INTEGER (bool)); ASSERT (TYPE_IS_INTEGER (char)); ASSERT (TYPE_IS_INTEGER (signed char)); ASSERT (TYPE_IS_INTEGER (unsigned char)); ASSERT (TYPE_IS_INTEGER (short int)); ASSERT (TYPE_IS_INTEGER (unsigned short int)); ASSERT (TYPE_IS_INTEGER (int)); ASSERT (TYPE_IS_INTEGER (unsigned int)); ASSERT (TYPE_IS_INTEGER (long int)); ASSERT (TYPE_IS_INTEGER (unsigned long int)); ASSERT (TYPE_IS_INTEGER (intmax_t)); ASSERT (TYPE_IS_INTEGER (uintmax_t)); ASSERT (! TYPE_IS_INTEGER (float)); ASSERT (! TYPE_IS_INTEGER (double)); ASSERT (! TYPE_IS_INTEGER (long double)); /* TYPE_SIGNED. */ /* VERIFY (! TYPE_SIGNED (bool)); // not guaranteed by gnulib substitute */ VERIFY (TYPE_SIGNED (signed char)); VERIFY (! TYPE_SIGNED (unsigned char)); VERIFY (TYPE_SIGNED (short int)); VERIFY (! TYPE_SIGNED (unsigned short int)); VERIFY (TYPE_SIGNED (int)); VERIFY (! TYPE_SIGNED (unsigned int)); VERIFY (TYPE_SIGNED (long int)); VERIFY (! TYPE_SIGNED (unsigned long int)); VERIFY (TYPE_SIGNED (intmax_t)); VERIFY (! TYPE_SIGNED (uintmax_t)); ASSERT (TYPE_SIGNED (float)); ASSERT (TYPE_SIGNED (double)); ASSERT (TYPE_SIGNED (long double)); /* Integer representation. */ VERIFY (INT_MIN + INT_MAX < 0 ? (TYPE_TWOS_COMPLEMENT (int) && ! TYPE_ONES_COMPLEMENT (int) && ! TYPE_SIGNED_MAGNITUDE (int)) : (! TYPE_TWOS_COMPLEMENT (int) && (TYPE_ONES_COMPLEMENT (int) || TYPE_SIGNED_MAGNITUDE (int)))); /* TYPE_MINIMUM, TYPE_MAXIMUM. */ VERIFY (TYPE_MINIMUM (char) == CHAR_MIN); VERIFY (TYPE_MAXIMUM (char) == CHAR_MAX); VERIFY (TYPE_MINIMUM (unsigned char) == 0); VERIFY (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX); VERIFY (TYPE_MINIMUM (signed char) == SCHAR_MIN); VERIFY (TYPE_MAXIMUM (signed char) == SCHAR_MAX); VERIFY (TYPE_MINIMUM (short int) == SHRT_MIN); VERIFY (TYPE_MAXIMUM (short int) == SHRT_MAX); VERIFY (TYPE_MINIMUM (unsigned short int) == 0); VERIFY (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX); VERIFY (TYPE_MINIMUM (int) == INT_MIN); VERIFY (TYPE_MAXIMUM (int) == INT_MAX); VERIFY (TYPE_MINIMUM (unsigned int) == 0); VERIFY (TYPE_MAXIMUM (unsigned int) == UINT_MAX); VERIFY (TYPE_MINIMUM (long int) == LONG_MIN); VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX); VERIFY (TYPE_MINIMUM (unsigned long int) == 0); VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX); VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); VERIFY (TYPE_MINIMUM (uintmax_t) == 0); VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); /* INT_BITS_STRLEN_BOUND. */ VERIFY (INT_BITS_STRLEN_BOUND (1) == 1); VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789); /* INT_STRLEN_BOUND, INT_BUFSIZE_BOUND. */ #ifdef INT32_MAX /* POSIX guarantees int32_t; this ports to non-POSIX. */ VERIFY (INT_STRLEN_BOUND (int32_t) == sizeof ("-2147483648") - 1); VERIFY (INT_BUFSIZE_BOUND (int32_t) == sizeof ("-2147483648")); #endif #ifdef INT64_MAX VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1); VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808")); #endif /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as INT_<op>_OVERFLOW tests, so define a single macro to do both. */ #define CHECK_BINOP(op, a, b, min, max, overflow) \ (INT_##op##_RANGE_OVERFLOW (a, b, min, max) == (overflow) \ && INT_##op##_OVERFLOW (a, b) == (overflow)) #define CHECK_UNOP(op, a, min, max, overflow) \ (INT_##op##_RANGE_OVERFLOW (a, min, max) == (overflow) \ && INT_##op##_OVERFLOW (a) == (overflow)) /* INT_<op>_RANGE_OVERFLOW, INT_<op>_OVERFLOW. */ VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX)); VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1)); VERIFY (CHECK_BINOP (ADD, INT_MAX, 1, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (ADD, INT_MAX, -1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (ADD, INT_MIN, 1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (ADD, INT_MIN, -1, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (ADD, UINT_MAX, 1u, 0u, UINT_MAX, true)); VERIFY (CHECK_BINOP (ADD, 0u, 1u, 0u, UINT_MAX, false)); VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, 1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, -1, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, 1, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, -1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (SUBTRACT, UINT_MAX, 1u, 0u, UINT_MAX, false)); VERIFY (CHECK_BINOP (SUBTRACT, 0u, 1u, 0u, UINT_MAX, true)); VERIFY (CHECK_UNOP (NEGATE, INT_MIN, INT_MIN, INT_MAX, TYPE_TWOS_COMPLEMENT (int))); VERIFY (CHECK_UNOP (NEGATE, 0, INT_MIN, INT_MAX, false)); VERIFY (CHECK_UNOP (NEGATE, INT_MAX, INT_MIN, INT_MAX, false)); VERIFY (CHECK_UNOP (NEGATE, 0u, 0u, UINT_MAX, false)); VERIFY (CHECK_UNOP (NEGATE, 1u, 0u, UINT_MAX, true)); VERIFY (CHECK_UNOP (NEGATE, UINT_MAX, 0u, UINT_MAX, true)); VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MAX, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MIN, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MAX, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MIN, INT_MIN, INT_MAX, true)); VERIFY (CHECK_BINOP (MULTIPLY, -1, INT_MIN, INT_MIN, INT_MAX, INT_NEGATE_OVERFLOW (INT_MIN))); VERIFY (CHECK_BINOP (MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX, LONG_MIN, LONG_MIN, false)); VERIFY (CHECK_BINOP (DIVIDE, INT_MIN, -1, INT_MIN, INT_MAX, INT_NEGATE_OVERFLOW (INT_MIN))); VERIFY (CHECK_BINOP (DIVIDE, INT_MAX, 1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (DIVIDE, (unsigned int) INT_MIN, -1u, 0u, UINT_MAX, false)); VERIFY (CHECK_BINOP (REMAINDER, INT_MIN, -1, INT_MIN, INT_MAX, INT_NEGATE_OVERFLOW (INT_MIN))); VERIFY (CHECK_BINOP (REMAINDER, INT_MAX, 1, INT_MIN, INT_MAX, false)); VERIFY (CHECK_BINOP (REMAINDER, (unsigned int) INT_MIN, -1u, 0u, UINT_MAX, false)); VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX, 1, 0u, UINT_MAX, true)); VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2 + 1, 1, 0u, UINT_MAX, true)); VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2, 1, 0u, UINT_MAX, false)); /* INT_<op>_OVERFLOW with mixed types. */ #define CHECK_SUM(a, b, overflow) \ VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow)); \ VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow)) CHECK_SUM (-1, LONG_MIN, true); CHECK_SUM (-1, UINT_MAX, false); CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN); CHECK_SUM (0u, -1, true); CHECK_SUM (0u, 0, false); CHECK_SUM (0u, 1, false); CHECK_SUM (1, LONG_MAX, true); CHECK_SUM (1, UINT_MAX, true); CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX); CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX); CHECK_SUM (1u, INT_MIN, true); VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u)); VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1)); VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1)); VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1)); VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u)); VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u)); #define CHECK_PRODUCT(a, b, overflow) \ VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow)); \ VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow)) CHECK_PRODUCT (-1, 1u, true); CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN)); CHECK_PRODUCT (-1, UINT_MAX, true); CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true); CHECK_PRODUCT (-12345, LONG_MAX / -12345, false); CHECK_PRODUCT (0, -1, false); CHECK_PRODUCT (0, 0, false); CHECK_PRODUCT (0, 0u, false); CHECK_PRODUCT (0, 1, false); CHECK_PRODUCT (0, INT_MAX, false); CHECK_PRODUCT (0, INT_MIN, false); CHECK_PRODUCT (0, UINT_MAX, false); CHECK_PRODUCT (0u, -1, false); CHECK_PRODUCT (0u, 0, false); CHECK_PRODUCT (0u, 0u, false); CHECK_PRODUCT (0u, 1, false); CHECK_PRODUCT (0u, INT_MAX, false); CHECK_PRODUCT (0u, INT_MIN, false); CHECK_PRODUCT (0u, UINT_MAX, false); CHECK_PRODUCT (1, INT_MAX, false); CHECK_PRODUCT (1, INT_MIN, false); CHECK_PRODUCT (1, UINT_MAX, false); CHECK_PRODUCT (1u, INT_MIN, true); CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX); CHECK_PRODUCT (INT_MAX, UINT_MAX, true); CHECK_PRODUCT (INT_MAX, ULONG_MAX, true); CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true); CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false); CHECK_PRODUCT (INT_MIN, UINT_MAX, true); CHECK_PRODUCT (INT_MIN, ULONG_MAX, true); VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L) == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX)); VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX)); VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX)); VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u)); VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u)); VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u)); VERIFY (INT_DIVIDE_OVERFLOW (11u, -10)); VERIFY (INT_DIVIDE_OVERFLOW (10u, -10)); VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10)); VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L) == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX)); VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX)); VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX) == (INTMAX_MAX < UINT_MAX && - (unsigned int) INTMAX_MIN % UINT_MAX != 0)); VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX) == (INT_MIN % ULONG_MAX != 1)); VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1)); VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39)); VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39)); VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39)); VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX)); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/vma-iter.c����������������������������������������������������0000664�0000000�0000000�00000043526�12166360012�015722� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Iteration over virtual memory areas. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include "vma-iter.h" #include <errno.h> /* errno */ #include <stdlib.h> /* size_t */ #include <fcntl.h> /* open, O_RDONLY */ #include <unistd.h> /* getpagesize, read, close */ #if defined __sgi || defined __osf__ /* IRIX, OSF/1 */ # include <string.h> /* memcpy */ # include <sys/types.h> # include <sys/mman.h> /* mmap, munmap */ # include <sys/procfs.h> /* PIOC*, prmap_t */ #endif #if defined __APPLE__ && defined __MACH__ /* MacOS X */ # include <mach/mach.h> #endif #if (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ /* Windows */ # include <windows.h> #endif #if defined __BEOS__ || defined __HAIKU__ /* BeOS, Haiku */ # include <OS.h> #endif #if HAVE_MQUERY /* OpenBSD */ # include <sys/types.h> # include <sys/mman.h> /* mquery */ #endif /* Support for reading text files in the /proc file system. */ #if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ /* || defined __CYGWIN__ */ /* Buffered read-only streams. We cannot use <stdio.h> here, because fopen() calls malloc(), and a malloc() call may call mmap() and thus pre-allocate available memory. */ struct rofile { int fd; size_t position; size_t filled; int eof_seen; char buffer[1024]; }; /* Open a read-only file stream. */ static int rof_open (struct rofile *rof, const char *filename) { int fd = open (filename, O_RDONLY); if (fd < 0) return -1; rof->fd = fd; rof->position = 0; rof->filled = 0; rof->eof_seen = 0; return 0; } /* Return the next byte from a read-only file stream without consuming it, or -1 at EOF. */ static int rof_peekchar (struct rofile *rof) { if (rof->position == rof->filled) { if (rof->eof_seen) return -1; else for (;;) { int n = read (rof->fd, rof->buffer, sizeof (rof->buffer)); # ifdef EINTR if (n < 0 && errno == EINTR) continue; # endif if (n <= 0) { rof->eof_seen = 1; return -1; } rof->filled = n; rof->position = 0; break; } } return (unsigned char) rof->buffer[rof->position]; } /* Return the next byte from a read-only file stream, or -1 at EOF. */ static int rof_getchar (struct rofile *rof) { int c = rof_peekchar (rof); if (c >= 0) rof->position++; return c; } /* Parse an unsigned hexadecimal number from a read-only file stream. */ static int rof_scanf_lx (struct rofile *rof, unsigned long *valuep) { unsigned long value = 0; unsigned int numdigits = 0; for (;;) { int c = rof_peekchar (rof); if (c >= '0' && c <= '9') value = (value << 4) + (c - '0'); else if (c >= 'A' && c <= 'F') value = (value << 4) + (c - 'A' + 10); else if (c >= 'a' && c <= 'f') value = (value << 4) + (c - 'a' + 10); else break; rof_getchar (rof); numdigits++; } if (numdigits == 0) return -1; *valuep = value; return 0; } /* Close a read-only file stream. */ static void rof_close (struct rofile *rof) { close (rof->fd); } #endif void vma_iterate (vma_iterate_callback_fn callback, void *data) { #if defined __linux__ /* || defined __CYGWIN__ */ struct rofile rof; int c; /* Open the current process' maps file. It describes one VMA per line. */ if (rof_open (&rof, "/proc/self/maps") < 0) return; for (;;) { unsigned long start, end; unsigned int flags; /* Parse one line. First start and end. */ if (!(rof_scanf_lx (&rof, &start) >= 0 && rof_getchar (&rof) == '-' && rof_scanf_lx (&rof, &end) >= 0)) break; /* Then the flags. */ do c = rof_getchar (&rof); while (c == ' '); flags = 0; if (c == 'r') flags |= VMA_PROT_READ; c = rof_getchar (&rof); if (c == 'w') flags |= VMA_PROT_WRITE; c = rof_getchar (&rof); if (c == 'x') flags |= VMA_PROT_EXECUTE; while (c = rof_getchar (&rof), c != -1 && c != '\n') ; if (callback (data, start, end, flags)) break; } rof_close (&rof); #elif defined __FreeBSD__ || defined __NetBSD__ struct rofile rof; int c; /* Open the current process' maps file. It describes one VMA per line. */ if (rof_open (&rof, "/proc/curproc/map") < 0) return; for (;;) { unsigned long start, end; unsigned int flags; /* Parse one line. First start. */ if (!(rof_getchar (&rof) == '0' && rof_getchar (&rof) == 'x' && rof_scanf_lx (&rof, &start) >= 0)) break; while (c = rof_peekchar (&rof), c == ' ' || c == '\t') rof_getchar (&rof); /* Then end. */ if (!(rof_getchar (&rof) == '0' && rof_getchar (&rof) == 'x' && rof_scanf_lx (&rof, &end) >= 0)) break; /* Then the flags. */ do c = rof_getchar (&rof); while (c == ' '); flags = 0; if (c == 'r') flags |= VMA_PROT_READ; c = rof_getchar (&rof); if (c == 'w') flags |= VMA_PROT_WRITE; c = rof_getchar (&rof); if (c == 'x') flags |= VMA_PROT_EXECUTE; while (c = rof_getchar (&rof), c != -1 && c != '\n') ; if (callback (data, start, end, flags)) break; } rof_close (&rof); #elif defined __sgi || defined __osf__ /* IRIX, OSF/1 */ size_t pagesize; char fnamebuf[6+10+1]; char *fname; int fd; int nmaps; size_t memneed; # if HAVE_MAP_ANONYMOUS # define zero_fd -1 # define map_flags MAP_ANONYMOUS # else int zero_fd; # define map_flags 0 # endif void *auxmap; unsigned long auxmap_start; unsigned long auxmap_end; prmap_t* maps; prmap_t* mp; pagesize = getpagesize (); /* Construct fname = sprintf (fnamebuf+i, "/proc/%u", getpid ()). */ fname = fnamebuf + sizeof (fnamebuf) - 1; *fname = '\0'; { unsigned int value = getpid (); do *--fname = (value % 10) + '0'; while ((value = value / 10) > 0); } fname -= 6; memcpy (fname, "/proc/", 6); fd = open (fname, O_RDONLY); if (fd < 0) return; if (ioctl (fd, PIOCNMAP, &nmaps) < 0) goto fail2; memneed = (nmaps + 10) * sizeof (prmap_t); /* Allocate memneed bytes of memory. We cannot use alloca here, because not much stack space is guaranteed. We also cannot use malloc here, because a malloc() call may call mmap() and thus pre-allocate available memory. So use mmap(), and ignore the resulting VMA. */ memneed = ((memneed - 1) / pagesize + 1) * pagesize; # if !HAVE_MAP_ANONYMOUS zero_fd = open ("/dev/zero", O_RDONLY, 0644); if (zero_fd < 0) goto fail2; # endif auxmap = (void *) mmap ((void *) 0, memneed, PROT_READ | PROT_WRITE, map_flags | MAP_PRIVATE, zero_fd, 0); # if !HAVE_MAP_ANONYMOUS close (zero_fd); # endif if (auxmap == (void *) -1) goto fail2; auxmap_start = (unsigned long) auxmap; auxmap_end = auxmap_start + memneed; maps = (prmap_t *) auxmap; if (ioctl (fd, PIOCMAP, maps) < 0) goto fail1; for (mp = maps;;) { unsigned long start, end; unsigned int flags; start = (unsigned long) mp->pr_vaddr; end = start + mp->pr_size; if (start == 0 && end == 0) break; flags = 0; if (mp->pr_mflags & MA_READ) flags |= VMA_PROT_READ; if (mp->pr_mflags & MA_WRITE) flags |= VMA_PROT_WRITE; if (mp->pr_mflags & MA_EXEC) flags |= VMA_PROT_EXECUTE; mp++; if (start <= auxmap_start && auxmap_end - 1 <= end - 1) { /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1] = [start,auxmap_start-1] u [auxmap_end,end-1]. */ if (start < auxmap_start) if (callback (data, start, auxmap_start, flags)) break; if (auxmap_end - 1 < end - 1) if (callback (data, auxmap_end, end, flags)) break; } else { if (callback (data, start, end, flags)) break; } } munmap (auxmap, memneed); close (fd); return; fail1: munmap (auxmap, memneed); fail2: close (fd); return; #elif defined __APPLE__ && defined __MACH__ /* MacOS X */ task_t task = mach_task_self (); vm_address_t address; vm_size_t size; for (address = VM_MIN_ADDRESS;; address += size) { int more; mach_port_t object_name; unsigned int flags; /* In MacOS X 10.5, the types vm_address_t, vm_offset_t, vm_size_t have 32 bits in 32-bit processes and 64 bits in 64-bit processes. Whereas mach_vm_address_t and mach_vm_size_t are always 64 bits large. MacOS X 10.5 has three vm_region like methods: - vm_region. It has arguments that depend on whether the current process is 32-bit or 64-bit. When linking dynamically, this function exists only in 32-bit processes. Therefore we use it only in 32-bit processes. - vm_region_64. It has arguments that depend on whether the current process is 32-bit or 64-bit. It interprets a flavor VM_REGION_BASIC_INFO as VM_REGION_BASIC_INFO_64, which is dangerous since 'struct vm_region_basic_info_64' is larger than 'struct vm_region_basic_info'; therefore let's write VM_REGION_BASIC_INFO_64 explicitly. - mach_vm_region. It has arguments that are 64-bit always. This function is useful when you want to access the VM of a process other than the current process. In 64-bit processes, we could use vm_region_64 or mach_vm_region. I choose vm_region_64 because it uses the same types as vm_region, resulting in less conditional code. */ # if defined __ppc64__ || defined __x86_64__ struct vm_region_basic_info_64 info; mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64; more = (vm_region_64 (task, &address, &size, VM_REGION_BASIC_INFO_64, (vm_region_info_t)&info, &info_count, &object_name) == KERN_SUCCESS); # else struct vm_region_basic_info info; mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT; more = (vm_region (task, &address, &size, VM_REGION_BASIC_INFO, (vm_region_info_t)&info, &info_count, &object_name) == KERN_SUCCESS); # endif if (object_name != MACH_PORT_NULL) mach_port_deallocate (mach_task_self (), object_name); if (!more) break; flags = 0; if (info.protection & VM_PROT_READ) flags |= VMA_PROT_READ; if (info.protection & VM_PROT_WRITE) flags |= VMA_PROT_WRITE; if (info.protection & VM_PROT_EXECUTE) flags |= VMA_PROT_EXECUTE; if (callback (data, address, address + size, flags)) break; } #elif (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ /* Windows platform. Use the native Windows API. */ MEMORY_BASIC_INFORMATION info; unsigned long address = 0; while (VirtualQuery ((void*)address, &info, sizeof(info)) == sizeof(info)) { if (info.State != MEM_FREE) /* Ignore areas where info.State has the value MEM_RESERVE or, equivalently, info.Protect has the undocumented value 0. This is needed, so that on Cygwin, areas used by malloc() are distinguished from areas reserved for future malloc(). */ if (info.State != MEM_RESERVE) { unsigned long start, end; unsigned int flags; start = (unsigned long)info.BaseAddress; end = start + info.RegionSize; switch (info.Protect & ~(PAGE_GUARD|PAGE_NOCACHE)) { case PAGE_READONLY: flags = VMA_PROT_READ; break; case PAGE_READWRITE: case PAGE_WRITECOPY: flags = VMA_PROT_READ | VMA_PROT_WRITE; break; case PAGE_EXECUTE: flags = VMA_PROT_EXECUTE; break; case PAGE_EXECUTE_READ: flags = VMA_PROT_READ | VMA_PROT_EXECUTE; break; case PAGE_EXECUTE_READWRITE: case PAGE_EXECUTE_WRITECOPY: flags = VMA_PROT_READ | VMA_PROT_WRITE | VMA_PROT_EXECUTE; break; case PAGE_NOACCESS: default: flags = 0; break; } if (callback (data, start, end, flags)) break; } address = (unsigned long)info.BaseAddress + info.RegionSize; } #elif defined __BEOS__ || defined __HAIKU__ /* Use the BeOS specific API. */ area_info info; int32 cookie; cookie = 0; while (get_next_area_info (0, &cookie, &info) == B_OK) { unsigned long start, end; unsigned int flags; start = (unsigned long) info.address; end = start + info.size; flags = 0; if (info.protection & B_READ_AREA) flags |= VMA_PROT_READ | VMA_PROT_EXECUTE; if (info.protection & B_WRITE_AREA) flags |= VMA_PROT_WRITE; if (callback (data, start, end, flags)) break; } #elif HAVE_MQUERY /* OpenBSD */ uintptr_t pagesize; uintptr_t address; int /*bool*/ address_known_mapped; pagesize = getpagesize (); /* Avoid calling mquery with a NULL first argument, because this argument value has a specific meaning. We know the NULL page is unmapped. */ address = pagesize; address_known_mapped = 0; for (;;) { /* Test whether the page at address is mapped. */ if (address_known_mapped || mquery ((void *) address, pagesize, 0, MAP_FIXED, -1, 0) == (void *) -1) { /* The page at address is mapped. This is the start of an interval. */ uintptr_t start = address; uintptr_t end; /* Find the end of the interval. */ end = (uintptr_t) mquery ((void *) address, pagesize, 0, 0, -1, 0); if (end == (uintptr_t) (void *) -1) end = 0; /* wrap around */ address = end; /* It's too complicated to find out about the flags. Just pass 0. */ if (callback (data, start, end, 0)) break; if (address < pagesize) /* wrap around? */ break; } /* Here we know that the page at address is unmapped. */ { uintptr_t query_size = pagesize; address += pagesize; /* Query larger and larger blocks, to get through the unmapped address range with few mquery() calls. */ for (;;) { if (2 * query_size > query_size) query_size = 2 * query_size; if (address + query_size - 1 < query_size) /* wrap around? */ { address_known_mapped = 0; break; } if (mquery ((void *) address, query_size, 0, MAP_FIXED, -1, 0) == (void *) -1) { /* Not all the interval [address .. address + query_size - 1] is unmapped. */ address_known_mapped = (query_size == pagesize); break; } /* The interval [address .. address + query_size - 1] is unmapped. */ address += query_size; } /* Reduce the query size again, to determine the precise size of the unmapped interval that starts at address. */ while (query_size > pagesize) { query_size = query_size / 2; if (address + query_size - 1 >= query_size) { if (mquery ((void *) address, query_size, 0, MAP_FIXED, -1, 0) != (void *) -1) { /* The interval [address .. address + query_size - 1] is unmapped. */ address += query_size; address_known_mapped = 0; } else address_known_mapped = (query_size == pagesize); } } /* Here again query_size = pagesize, and either address + pagesize - 1 < pagesize, or mquery ((void *) address, pagesize, 0, MAP_FIXED, -1, 0) fails. So, the unmapped area ends at address. */ } if (address + pagesize - 1 < pagesize) /* wrap around? */ break; } #endif } #ifdef TEST #include <stdio.h> /* Output the VMAs of the current process in a format similar to the Linux /proc/$pid/maps file. */ static int vma_iterate_callback (void *data, uintptr_t start, uintptr_t end, unsigned int flags) { printf ("%08lx-%08lx %c%c%c\n", (unsigned long) start, (unsigned long) end, flags & VMA_PROT_READ ? 'r' : '-', flags & VMA_PROT_WRITE ? 'w' : '-', flags & VMA_PROT_EXECUTE ? 'x' : '-'); return 0; } int main () { vma_iterate (vma_iterate_callback, NULL); /* Let the user interactively look at the /proc file system. */ sleep (10); return 0; } #endif /* TEST */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-nl_langinfo.c��������������������������������������������0000664�0000000�0000000�00000011100�12166360012�017420� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of nl_langinfo replacement. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <config.h> #include <langinfo.h> #include "signature.h" SIGNATURE_CHECK (nl_langinfo, char *, (nl_item)); #include <locale.h> #include <stdlib.h> #include <string.h> #include "c-strcase.h" #include "macros.h" /* For GCC >= 4.3, silence the warnings "comparison of unsigned expression >= 0 is always true" in this file. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) # pragma GCC diagnostic ignored "-Wtype-limits" #endif int main (int argc, char *argv[]) { int pass = atoi (argv[1]); /* pass locale 0 C 1 traditional French locale 2 French UTF-8 locale */ setlocale (LC_ALL, ""); /* nl_langinfo items of the LC_CTYPE category */ ASSERT (strlen (nl_langinfo (CODESET)) > 0); if (pass == 2) { const char *codeset = nl_langinfo (CODESET); ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0); } /* nl_langinfo items of the LC_NUMERIC category */ ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0); ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0); /* nl_langinfo items of the LC_TIME category */ ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0); ASSERT (strlen (nl_langinfo (D_FMT)) > 0); ASSERT (strlen (nl_langinfo (T_FMT)) > 0); ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (DAY_1)) > 0); ASSERT (strlen (nl_langinfo (DAY_2)) > 0); ASSERT (strlen (nl_langinfo (DAY_3)) > 0); ASSERT (strlen (nl_langinfo (DAY_4)) > 0); ASSERT (strlen (nl_langinfo (DAY_5)) > 0); ASSERT (strlen (nl_langinfo (DAY_6)) > 0); ASSERT (strlen (nl_langinfo (DAY_7)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0); ASSERT (strlen (nl_langinfo (MON_1)) > 0); ASSERT (strlen (nl_langinfo (MON_2)) > 0); ASSERT (strlen (nl_langinfo (MON_3)) > 0); ASSERT (strlen (nl_langinfo (MON_4)) > 0); ASSERT (strlen (nl_langinfo (MON_5)) > 0); ASSERT (strlen (nl_langinfo (MON_6)) > 0); ASSERT (strlen (nl_langinfo (MON_7)) > 0); ASSERT (strlen (nl_langinfo (MON_8)) > 0); ASSERT (strlen (nl_langinfo (MON_9)) > 0); ASSERT (strlen (nl_langinfo (MON_10)) > 0); ASSERT (strlen (nl_langinfo (MON_11)) > 0); ASSERT (strlen (nl_langinfo (MON_12)) > 0); ASSERT (strlen (nl_langinfo (ABMON_1)) > 0); ASSERT (strlen (nl_langinfo (ABMON_2)) > 0); ASSERT (strlen (nl_langinfo (ABMON_3)) > 0); ASSERT (strlen (nl_langinfo (ABMON_4)) > 0); ASSERT (strlen (nl_langinfo (ABMON_5)) > 0); ASSERT (strlen (nl_langinfo (ABMON_6)) > 0); ASSERT (strlen (nl_langinfo (ABMON_7)) > 0); ASSERT (strlen (nl_langinfo (ABMON_8)) > 0); ASSERT (strlen (nl_langinfo (ABMON_9)) > 0); ASSERT (strlen (nl_langinfo (ABMON_10)) > 0); ASSERT (strlen (nl_langinfo (ABMON_11)) > 0); ASSERT (strlen (nl_langinfo (ABMON_12)) > 0); ASSERT (strlen (nl_langinfo (ERA)) >= 0); ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0); ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0); ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0); ASSERT (nl_langinfo (ALT_DIGITS) != NULL); /* nl_langinfo items of the LC_MONETARY category */ { const char *currency = nl_langinfo (CRNCYSTR); ASSERT (strlen (currency) >= 0); #if !defined __NetBSD__ if (pass > 0) ASSERT (strlen (currency) >= 1); #endif } /* nl_langinfo items of the LC_MESSAGES category */ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0); ASSERT (strlen (nl_langinfo (NOEXPR)) > 0); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-btowc.c��������������������������������������������������0000664�0000000�0000000�00000003310�12166360012�016254� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of unibyte character to wide character. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (btowc, wint_t, (int)); #include <locale.h> #include <stdio.h> #include "macros.h" int main (int argc, char *argv[]) { int c; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; ASSERT (btowc (EOF) == WEOF); if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ for (c = 0; c < 0x80; c++) ASSERT (btowc (c) == c); for (c = 0xA0; c < 0x100; c++) ASSERT (btowc (c) != WEOF); return 0; case '2': /* Locale encoding is UTF-8. */ for (c = 0; c < 0x80; c++) ASSERT (btowc (c) == c); for (c = 0x80; c < 0x100; c++) ASSERT (btowc (c) == WEOF); return 0; } return 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-math.c���������������������������������������������������0000664�0000000�0000000�00000002522�12166360012�016073� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <math.h> substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <math.h> #ifndef NAN # error NAN should be defined choke me #endif #if 0 /* Check that NAN expands into a constant expression. */ static float n = NAN; #endif /* Compare two numbers with ==. This is a separate function because IRIX 6.5 "cc -O" miscompiles an 'x == x' test. */ static int numeric_equal (double x, double y) { return x == y; } int main (void) { double d = NAN; double zero = 0.0; if (numeric_equal (d, d)) return 1; d = HUGE_VAL; if (!numeric_equal (d, 1.0 / zero)) return 1; return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32-2.sh�����������������������������������������0000775�0000000�0000000�00000000132�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP1256 locale. ./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsrtowcs2.sh��������������������������������������������0000775�0000000�0000000�00000000572�11433657032�017454� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-mbsrtowcs${EXEEXT} 2 ��������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-malloc-gnu.c���������������������������������������������0000664�0000000�0000000�00000001603�12166360012�017177� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of malloc function. Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> int main () { /* Check that malloc (0) is not a NULL pointer. */ if (malloc (0) == NULL) return 1; return 0; } �����������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fchdir.c�������������������������������������������������0000664�0000000�0000000�00000005571�12166360012�016410� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test changing to a directory named by a file descriptor. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (fchdir, int, (int)); #include <errno.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include "cloexec.h" #include "macros.h" int main (void) { char *cwd; int fd; int i; cwd = getcwd (NULL, 0); ASSERT (cwd); fd = open (".", O_RDONLY); ASSERT (0 <= fd); /* Test behaviour for invalid file descriptors. */ { errno = 0; ASSERT (fchdir (-1) == -1); ASSERT (errno == EBADF); } { errno = 0; ASSERT (fchdir (99) == -1); ASSERT (errno == EBADF); } /* Check for other failure cases. */ { int bad_fd = open ("/dev/null", O_RDONLY); ASSERT (0 <= bad_fd); errno = 0; ASSERT (fchdir (bad_fd) == -1); ASSERT (errno == ENOTDIR); ASSERT (close (bad_fd) == 0); } /* Repeat test twice, once in '.' and once in '..'. */ for (i = 0; i < 2; i++) { ASSERT (chdir (".." + 1 - i) == 0); ASSERT (fchdir (fd) == 0); { size_t len = strlen (cwd) + 1; char *new_dir = malloc (len); ASSERT (new_dir); ASSERT (getcwd (new_dir, len) == new_dir); ASSERT (strcmp (cwd, new_dir) == 0); free (new_dir); } /* For second iteration, use a cloned fd, to ensure that dup remembers whether an fd was associated with a directory. */ if (!i) { int new_fd = dup (fd); ASSERT (0 <= new_fd); ASSERT (close (fd) == 0); ASSERT (dup2 (new_fd, fd) == fd); ASSERT (close (new_fd) == 0); ASSERT (dup_cloexec (fd) == new_fd); ASSERT (dup2 (new_fd, fd) == fd); ASSERT (close (new_fd) == 0); ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, new_fd) == new_fd); ASSERT (close (fd) == 0); ASSERT (fcntl (new_fd, F_DUPFD, fd) == fd); ASSERT (close (new_fd) == 0); #if GNULIB_TEST_DUP3 ASSERT (dup3 (fd, new_fd, 0) == new_fd); ASSERT (dup3 (new_fd, fd, 0) == fd); ASSERT (close (new_fd) == 0); #endif } } free (cwd); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fpending.c�����������������������������������������������0000664�0000000�0000000�00000002056�12166360012�016736� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Ensure that __fpending works. Copyright (C) 2004, 2007-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 <http://www.gnu.org/licenses/>. Written by Jim Meyering. */ #include <config.h> #include "fpending.h" #include <stdio.h> #include <stdlib.h> #include "macros.h" int main (void) { ASSERT (__fpending (stdout) == 0); fputs ("foo", stdout); ASSERT (__fpending (stdout) == 3); fflush (stdout); ASSERT (__fpending (stdout) == 0); exit (0); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/malloca.h�����������������������������������������������������0000664�0000000�0000000�00000011160�12166360012�015600� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Safe automatic memory allocation. Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. 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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MALLOCA_H #define _MALLOCA_H #include <alloca.h> #include <stddef.h> #include <stdlib.h> #ifdef __cplusplus extern "C" { #endif /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call alloca(N); otherwise it returns NULL. It either returns N bytes of memory allocated on the stack, that lasts until the function returns, or NULL. Use of safe_alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns. */ #if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. This must be a macro, not an inline function. */ # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) #else # define safe_alloca(N) ((void) (N), NULL) #endif /* malloca(N) is a safe variant of alloca(N). It allocates N bytes of memory allocated on the stack, that must be freed using freea() before the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ ((N) < 4032 - sa_increment \ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : mmalloca (N)) #else # define malloca(N) \ mmalloca (N) #endif extern void * mmalloca (size_t n); /* Free a block of memory allocated through malloca(). */ #if HAVE_ALLOCA extern void freea (void *p); #else # define freea free #endif /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. */ #if 1 /* Cf. the definition of xalloc_oversized. */ # define nmalloca(n, s) \ ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ ? NULL \ : malloca ((n) * (s))) #else extern void * nmalloca (size_t n, size_t s); #endif #ifdef __cplusplus } #endif /* ------------------- Auxiliary, non-public definitions ------------------- */ /* Determine the alignment of a type at compile time. */ #if defined __GNUC__ # define sa_alignof __alignof__ #elif defined __cplusplus template <class type> struct sa_alignof_helper { char __slot1; type __slot2; }; # define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2) #elif defined __hpux /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #elif defined _AIX /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #else # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif enum { /* The desired alignment of memory allocations is the maximum alignment among all elementary types. */ sa_alignment_long = sa_alignof (long), sa_alignment_double = sa_alignof (double), #if HAVE_LONG_LONG_INT sa_alignment_longlong = sa_alignof (long long), #endif sa_alignment_longdouble = sa_alignof (long double), sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) #if HAVE_LONG_LONG_INT | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) ) + 1, /* The increment that guarantees room for a magic word must be >= sizeof (int) and a multiple of sa_alignment_max. */ sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max }; #endif /* _MALLOCA_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wchar.c��������������������������������������������������0000664�0000000�0000000�00000002135�12166360012�016246� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <wchar.h> substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <wchar.h> #include "verify.h" /* Check that the types wchar_t and wint_t are defined. */ wchar_t a = 'c'; wint_t b = 'x'; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-frexpl.c������������������������������������������0000664�0000000�0000000�00000010105�12166360012�017736� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of splitting a 'long double' into fraction and mantissa. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "printf-frexpl.h" #include <float.h> #include "fpucw.h" #include "macros.h" /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -964. Similarly, on PowerPC machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -968. For exponents below that, the precision may be truncated to the precision used for 'double'. */ #ifdef __sgi # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57) # define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP #elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__ # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53) # define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP #else # define MIN_NORMAL_EXP LDBL_MIN_EXP # define MIN_SUBNORMAL_EXP (LDBL_MIN_EXP - 100) #endif static long double my_ldexp (long double x, int d) { for (; d > 0; d--) x *= 2.0L; for (; d < 0; d++) x *= 0.5L; return x; } int main () { int i; long double x; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0L); } for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa == my_ldexp (1.0L, i - LDBL_MIN_EXP)); } for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01L); } for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205L); } for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-dup-safer.c����������������������������������������������0000664�0000000�0000000�00000011523�12166360012�017031� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test that dup_safer leaves standard fds alone. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include "unistd--.h" #include <fcntl.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include "binary-io.h" #include "cloexec.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" #endif #if !O_BINARY # define setmode(f,m) zero () static int zero (void) { return 0; } #endif /* This test intentionally closes stderr. So, we arrange to have fd 10 (outside the range of interesting fd's during the test) set up to duplicate the original stderr. */ #define BACKUP_STDERR_FILENO 10 #define ASSERT_STREAM myerr #include "macros.h" static FILE *myerr; /* Return true if FD is open. */ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; #else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); #endif } /* Return true if FD is open and inheritable across exec/spawn. */ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) return 0; return (flags & HANDLE_FLAG_INHERIT) != 0; #else # ifndef F_GETFD # error Please port fcntl to your platform # endif int i = fcntl (fd, F_GETFD); return 0 <= i && (i & FD_CLOEXEC) == 0; #endif } /* Return true if FD is open in the given MODE, which is either O_TEXT or O_BINARY. */ static bool is_mode (int fd, int mode) { int value = setmode (fd, O_BINARY); setmode (fd, value); return mode == value; } #define witness "test-dup-safer.txt" int main (void) { int i; int fd; /* We close fd 2 later, so save it in fd 10. */ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) return 2; /* Create file for later checks. */ fd = creat (witness, 0600); ASSERT (STDERR_FILENO < fd); /* Four iterations, with progressively more standard descriptors closed. */ for (i = -1; i <= STDERR_FILENO; i++) { if (0 <= i) ASSERT (close (i) == 0); /* Detect errors. */ errno = 0; ASSERT (dup (-1) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup (10000000) == -1); ASSERT (errno == EBADF); close (fd + 1); errno = 0; ASSERT (dup (fd + 1) == -1); ASSERT (errno == EBADF); /* Preserve text vs. binary. */ setmode (fd, O_BINARY); ASSERT (dup (fd) == fd + 1); ASSERT (is_open (fd + 1)); ASSERT (is_inheritable (fd + 1)); ASSERT (is_mode (fd + 1, O_BINARY)); ASSERT (close (fd + 1) == 0); setmode (fd, O_TEXT); ASSERT (dup (fd) == fd + 1); ASSERT (is_open (fd + 1)); ASSERT (is_inheritable (fd + 1)); ASSERT (is_mode (fd + 1, O_TEXT)); /* Create cloexec copy. */ ASSERT (close (fd + 1) == 0); ASSERT (fd_safer_flag (dup_cloexec (fd), O_CLOEXEC) == fd + 1); ASSERT (set_cloexec_flag (fd + 1, true) == 0); ASSERT (is_open (fd + 1)); ASSERT (!is_inheritable (fd + 1)); ASSERT (close (fd) == 0); /* dup always creates inheritable copies. Also, check that earliest slot past std fds is used. */ ASSERT (dup (fd + 1) == fd); ASSERT (is_open (fd)); ASSERT (is_inheritable (fd)); ASSERT (close (fd + 1) == 0); } /* Cleanup. */ ASSERT (close (fd) == 0); ASSERT (unlink (witness) == 0); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-realloc-gnu.c��������������������������������������������0000664�0000000�0000000�00000001622�12166360012�017352� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of realloc function. Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> int main () { /* Check that realloc (NULL, 0) is not a NULL pointer. */ if (realloc (NULL, 0) == NULL) return 1; return 0; } ��������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftell2.sh������������������������������������������������0000775�0000000�0000000�00000000105�11433657032�016527� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh exec ./test-ftell${EXEEXT} 1 2 < "$srcdir/test-ftell2.sh" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fpurge.c�������������������������������������������������0000664�0000000�0000000�00000007533�12166360012�016441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fpurge() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include <string.h> #include "macros.h" #define TESTFILE "t-fpurge.tmp" int main (void) { int check_filepos; for (check_filepos = 0; check_filepos <= 1; check_filepos++) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) goto skip; if (fwrite ("foobarsh", 1, 8, fp) < 8) goto skip; if (fclose (fp)) goto skip; /* The file's contents is now "foobarsh". */ /* Open it in read-write mode. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) goto skip; if (fseek (fp, 3, SEEK_CUR)) goto skip; if (fwrite ("g", 1, 1, fp) < 1) goto skip; if (fflush (fp)) goto skip; if (fwrite ("bz", 1, 2, fp) < 2) goto skip; /* Discard pending write. */ ASSERT (fpurge (fp) == 0); /* Verify that when discarding pending output, the file position is set back to where it was before the write calls. */ if (check_filepos) ASSERT (ftell (fp) == 4); ASSERT (fclose (fp) == 0); /* Open it in read-only mode. */ fp = fopen (TESTFILE, "r"); if (fp == NULL) goto skip; /* Verify that the pending writes before the fpurge were really discarded. */ { char buf[8]; if (fread (buf, 1, 7, fp) < 7) goto skip; ASSERT (memcmp (buf, "foogars", 7) == 0); } /* Discard the buffered 'h'. */ if (check_filepos) ASSERT (ftell (fp) == 7); ASSERT (fpurge (fp) == 0); /* Verify that when discarding pending input, the file position is advanced to match the end of the previously read input. */ if (check_filepos) ASSERT (ftell (fp) == 8); ASSERT (getc (fp) == EOF); ASSERT (fclose (fp) == 0); /* The file's contents is now "foogarsh". */ /* Ensure that purging a read does not corrupt subsequent writes. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) goto skip; if (fseek (fp, -1, SEEK_END)) goto skip; ASSERT (getc (fp) == 'h'); ASSERT (getc (fp) == EOF); if (check_filepos) ASSERT (ftell (fp) == 8); ASSERT (fpurge (fp) == 0); if (check_filepos) ASSERT (ftell (fp) == 8); ASSERT (putc ('!', fp) == '!'); if (check_filepos) ASSERT (ftell (fp) == 9); ASSERT (fclose (fp) == 0); fp = fopen (TESTFILE, "r"); if (fp == NULL) goto skip; { char buf[10]; ASSERT (fread (buf, 1, 10, fp) == 9); ASSERT (memcmp (buf, "foogarsh!", 9) == 0); } ASSERT (fclose (fp) == 0); /* The file's contents is now "foogarsh!". */ } remove (TESTFILE); return 0; skip: fprintf (stderr, "Skipping test: prerequisite file operations failed.\n"); remove (TESTFILE); return 77; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sys_stat.c�����������������������������������������������0000664�0000000�0000000�00000015616�12166360012�017023� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <sys/stat.h> substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <sys/stat.h> #include "verify.h" /* Check the existence of some macros. */ int a[] = { S_IFMT, #ifdef S_IFBLK /* missing on MSVC */ S_IFBLK, #endif S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, #ifdef S_IFLNK /* missing on native Windows and DJGPP */ S_IFLNK, #endif #ifdef S_IFSOCK /* missing on native Windows and DJGPP */ S_IFSOCK, #endif S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, S_ISVTX, S_ISBLK (S_IFREG), S_ISCHR (S_IFREG), S_ISDIR (S_IFREG), S_ISFIFO (S_IFREG), S_ISREG (S_IFREG), S_ISLNK (S_IFREG), S_ISSOCK (S_IFREG), S_ISDOOR (S_IFREG), S_ISMPB (S_IFREG), S_ISNAM (S_IFREG), S_ISNWK (S_IFREG), S_ISPORT (S_IFREG), S_ISCTG (S_IFREG), S_ISOFD (S_IFREG), S_ISOFL (S_IFREG), S_ISWHT (S_IFREG) }; /* Sanity checks. */ verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR)); verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP)); verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH)); #ifdef S_IFBLK verify (S_ISBLK (S_IFBLK)); #endif verify (!S_ISBLK (S_IFCHR)); verify (!S_ISBLK (S_IFDIR)); verify (!S_ISBLK (S_IFIFO)); verify (!S_ISBLK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISBLK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISBLK (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISCHR (S_IFBLK)); #endif verify (S_ISCHR (S_IFCHR)); verify (!S_ISCHR (S_IFDIR)); verify (!S_ISCHR (S_IFIFO)); verify (!S_ISCHR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISCHR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISCHR (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISDIR (S_IFBLK)); #endif verify (!S_ISDIR (S_IFCHR)); verify (S_ISDIR (S_IFDIR)); verify (!S_ISDIR (S_IFIFO)); verify (!S_ISDIR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISDIR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISDIR (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISFIFO (S_IFBLK)); #endif verify (!S_ISFIFO (S_IFCHR)); verify (!S_ISFIFO (S_IFDIR)); verify (S_ISFIFO (S_IFIFO)); verify (!S_ISFIFO (S_IFREG)); #ifdef S_IFLNK verify (!S_ISFIFO (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISFIFO (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISREG (S_IFBLK)); #endif verify (!S_ISREG (S_IFCHR)); verify (!S_ISREG (S_IFDIR)); verify (!S_ISREG (S_IFIFO)); verify (S_ISREG (S_IFREG)); #ifdef S_IFLNK verify (!S_ISREG (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISREG (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISLNK (S_IFBLK)); #endif verify (!S_ISLNK (S_IFCHR)); verify (!S_ISLNK (S_IFDIR)); verify (!S_ISLNK (S_IFIFO)); verify (!S_ISLNK (S_IFREG)); #ifdef S_IFLNK verify (S_ISLNK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISLNK (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISSOCK (S_IFBLK)); #endif verify (!S_ISSOCK (S_IFCHR)); verify (!S_ISSOCK (S_IFDIR)); verify (!S_ISSOCK (S_IFIFO)); verify (!S_ISSOCK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISSOCK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (S_ISSOCK (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISDOOR (S_IFBLK)); #endif verify (!S_ISDOOR (S_IFCHR)); verify (!S_ISDOOR (S_IFDIR)); verify (!S_ISDOOR (S_IFIFO)); verify (!S_ISDOOR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISDOOR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISDOOR (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISMPB (S_IFBLK)); #endif verify (!S_ISMPB (S_IFCHR)); verify (!S_ISMPB (S_IFDIR)); verify (!S_ISMPB (S_IFIFO)); verify (!S_ISMPB (S_IFREG)); #ifdef S_IFLNK verify (!S_ISMPB (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISMPB (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISNAM (S_IFBLK)); #endif verify (!S_ISNAM (S_IFCHR)); verify (!S_ISNAM (S_IFDIR)); verify (!S_ISNAM (S_IFIFO)); verify (!S_ISNAM (S_IFREG)); #ifdef S_IFLNK verify (!S_ISNAM (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISNAM (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISNWK (S_IFBLK)); #endif verify (!S_ISNWK (S_IFCHR)); verify (!S_ISNWK (S_IFDIR)); verify (!S_ISNWK (S_IFIFO)); verify (!S_ISNWK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISNWK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISNWK (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISPORT (S_IFBLK)); #endif verify (!S_ISPORT (S_IFCHR)); verify (!S_ISPORT (S_IFDIR)); verify (!S_ISPORT (S_IFIFO)); verify (!S_ISPORT (S_IFREG)); #ifdef S_IFLNK verify (!S_ISPORT (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISPORT (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISCTG (S_IFBLK)); #endif verify (!S_ISCTG (S_IFCHR)); verify (!S_ISCTG (S_IFDIR)); verify (!S_ISCTG (S_IFIFO)); verify (!S_ISCTG (S_IFREG)); #ifdef S_IFLNK verify (!S_ISCTG (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISCTG (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISOFD (S_IFBLK)); #endif verify (!S_ISOFD (S_IFCHR)); verify (!S_ISOFD (S_IFDIR)); verify (!S_ISOFD (S_IFIFO)); verify (!S_ISOFD (S_IFREG)); #ifdef S_IFLNK verify (!S_ISOFD (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISOFD (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISOFL (S_IFBLK)); #endif verify (!S_ISOFL (S_IFCHR)); verify (!S_ISOFL (S_IFDIR)); verify (!S_ISOFL (S_IFIFO)); verify (!S_ISOFL (S_IFREG)); #ifdef S_IFLNK verify (!S_ISOFL (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISOFL (S_IFSOCK)); #endif #ifdef S_IFBLK verify (!S_ISWHT (S_IFBLK)); #endif verify (!S_ISWHT (S_IFCHR)); verify (!S_ISWHT (S_IFDIR)); verify (!S_ISWHT (S_IFIFO)); verify (!S_ISWHT (S_IFREG)); #ifdef S_IFLNK verify (!S_ISWHT (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISWHT (S_IFSOCK)); #endif /* POSIX 2008 requires traditional encoding of permission constants. */ verify (S_IRWXU == 00700); verify (S_IRUSR == 00400); verify (S_IWUSR == 00200); verify (S_IXUSR == 00100); verify (S_IRWXG == 00070); verify (S_IRGRP == 00040); verify (S_IWGRP == 00020); verify (S_IXGRP == 00010); verify (S_IRWXO == 00007); verify (S_IROTH == 00004); verify (S_IWOTH == 00002); verify (S_IXOTH == 00001); verify (S_ISUID == 04000); verify (S_ISGID == 02000); verify (S_ISVTX == 01000); #if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \ || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \ || UTIME_NOW == UTIME_OMIT) invalid UTIME macros #endif /* Check the existence of some types. */ nlink_t t1; off_t t2; mode_t t3; struct timespec st; int main (void) { return 0; } ������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fopen.c��������������������������������������������������0000664�0000000�0000000�00000001777�12166360012�016264� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of opening a file stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *)); #define BASE "test-fopen.t" #include "test-fopen.h" int main (void) { return test_fopen (); } �id-utils-4.6+git20120811/gnulib-tests/test-getdelim.c�����������������������������������������������0000664�0000000�0000000�00000004765�12166360012�016747� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of getdelim() function. Copyright (C) 2007-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, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake <ebb9@byu.net>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *)); #include <stdlib.h> #include <string.h> #include "macros.h" int main (void) { FILE *f; char *line; size_t len; ssize_t result; /* Create test file. */ f = fopen ("test-getdelim.txt", "wb"); if (!f || fwrite ("anAnbcnd\0f", 1, 10, f) != 10 || fclose (f) != 0) { fputs ("Failed to create sample file.\n", stderr); remove ("test-getdelim.txt"); return 1; } f = fopen ("test-getdelim.txt", "rb"); if (!f) { fputs ("Failed to reopen sample file.\n", stderr); remove ("test-getdelim.txt"); return 1; } /* Test initial allocation, which must include trailing NUL. */ line = NULL; len = 0; result = getdelim (&line, &len, 'n', f); ASSERT (result == 2); ASSERT (strcmp (line, "an") == 0); ASSERT (2 < len); free (line); /* Test initial allocation again, with line = NULL and len != 0. */ line = NULL; len = (size_t)(~0) / 4; result = getdelim (&line, &len, 'n', f); ASSERT (result == 2); ASSERT (strcmp (line, "An") == 0); ASSERT (2 < len); free (line); /* Test growth of buffer. */ line = malloc (1); len = 1; result = getdelim (&line, &len, 'n', f); ASSERT (result == 3); ASSERT (strcmp (line, "bcn") == 0); ASSERT (3 < len); /* Test embedded NULs and EOF behavior. */ result = getdelim (&line, &len, 'n', f); ASSERT (result == 3); ASSERT (memcmp (line, "d\0f", 4) == 0); ASSERT (3 < len); result = getdelim (&line, &len, 'n', f); ASSERT (result == -1); free (line); fclose (f); remove ("test-getdelim.txt"); return 0; } �����������id-utils-4.6+git20120811/gnulib-tests/test-init.sh��������������������������������������������������0000775�0000000�0000000�00000004514�12166360012�016303� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Unit tests for init.sh # Copyright (C) 2011-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. */ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ . fail=0 test_compare() { touch empty || fail=1 echo xyz > in || fail=1 compare /dev/null /dev/null >out 2>err || fail=1 test -s out && fail_ "out not empty: $(cat out)" # "err" should be empty, too, but has "set -x" output when VERBOSE=yes case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac compare /dev/null empty >out 2>err || fail=1 test -s out && fail_ "out not empty: $(cat out)" case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac compare in in >out 2>err || fail=1 test -s out && fail_ "out not empty: $(cat out)" case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac compare /dev/null in >out 2>err && fail=1 cat <<\EOF > exp diff -u /dev/null in --- /dev/null 1970-01-01 +++ in 1970-01-01 +xyz EOF compare exp out || fail=1 case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac compare empty in >out 2>err && fail=1 # Remove the TAB-date suffix on each --- and +++ line, # for both the expected and the actual output files. # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ: # -@@ -0,0 +1 @@ # +@@ -1,0 +1,1 @@ cat <<\EOF > exp --- empty +++ in +xyz EOF sed 's/ .*//;/^@@/d' out > k && mv k out # Compare against expected output only if compare is using diff -u. if diff -u out out < /dev/null > /dev/null 2>&1; then compare exp out || fail=1 fi case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac } test_compare Exit $fail ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/resource-ext.h������������������������������������������������0000664�0000000�0000000�00000003214�12166360012�016616� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Extra functions for resource usage. Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. 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 <http://www.gnu.org/licenses/>. */ #ifndef _RESOURCE_EXT_H #define _RESOURCE_EXT_H #include <stdint.h> #ifdef __cplusplus extern "C" { #endif /* Returns the amount of address space currently in use by the current process, or zero if unknown. This is the quantity which is limited by setrlimit(RLIMIT_AS,...). Note: This function always returns zero on AIX. */ extern uintptr_t get_rusage_as (void); /* Returns the size of the data segment, or zero if unknown. This is the quantity which is limited by setrlimit(RLIMIT_DATA,...). Note: This function always returns zero on HP-UX 11.00. Note: The total size of all malloc()ed memory is bounded by the size of the data segment only on the following platforms: FreeBSD, AIX, HP-UX 11.23 and newer, IRIX, OSF/1, Solaris, BeOS, Haiku. */ extern uintptr_t get_rusage_data (void); #ifdef __cplusplus } #endif #endif /* _RESOURCE_EXT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getcwd.sh������������������������������������������������0000775�0000000�0000000�00000000112�12166360012�016603� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . test-getcwd Exit $? ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getdtablesize.c������������������������������������������0000664�0000000�0000000�00000001772�12166360012�017776� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of getdtablesize() function. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (getdtablesize, int, (void)); #include "macros.h" int main (int argc, char *argv[]) { ASSERT (getdtablesize () >= 3); return 0; } ������id-utils-4.6+git20120811/gnulib-tests/test-environ.c������������������������������������������������0000664�0000000�0000000�00000002727�12166360012�016631� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of environ variable. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <unistd.h> #include <string.h> int main () { /* The environment variables that are set even in the weirdest situations are HOME and PATH. POSIX says that HOME is initialized by the system, and that PATH may be unset. But in practice it's more frequent to see HOME unset and PATH set. So we test the presence of PATH. */ char **remaining_variables = environ; char *string; for (; (string = *remaining_variables) != NULL; remaining_variables++) { if (strncmp (string, "PATH=", 5) == 0) /* Found the PATH environment variable. */ return 0; } /* Failed to find the PATH environment variable. */ return 1; } �����������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getopt.c�������������������������������������������������0000664�0000000�0000000�00000005472�12166360012�016453� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of command line argument processing. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <config.h> /* None of the files accessed by this test are large, so disable the ftell link warning if we are not using the gnulib ftell module. */ #define _GL_NO_LARGE_FILES #if GNULIB_TEST_GETOPT_GNU # include <getopt.h> # ifndef __getopt_argv_const # define __getopt_argv_const const # endif # include "signature.h" SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *, char const *, struct option const *, int *)); SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *, char const *, struct option const *, int *)); #endif #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *)); #include <stdio.h> #include <stdlib.h> #include <string.h> /* This test intentionally remaps stderr. So, we arrange to have fd 10 (outside the range of interesting fd's during the test) set up to duplicate the original stderr. */ #define BACKUP_STDERR_FILENO 10 #define ASSERT_STREAM myerr #include "macros.h" static FILE *myerr; #include "test-getopt.h" #if GNULIB_TEST_GETOPT_GNU # include "test-getopt_long.h" #endif int main (void) { /* This test validates that stderr is used correctly, so move the original into fd 10. */ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) return 2; ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr); /* These default values are required by POSIX. */ ASSERT (optind == 1); ASSERT (opterr != 0); setenv ("POSIXLY_CORRECT", "1", 1); test_getopt (); #if GNULIB_TEST_GETOPT_GNU test_getopt_long_posix (); #endif unsetenv ("POSIXLY_CORRECT"); test_getopt (); #if GNULIB_TEST_GETOPT_GNU test_getopt_long (); test_getopt_long_only (); #endif ASSERT (fclose (stderr) == 0); ASSERT (remove ("test-getopt.tmp") == 0); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/macros.h������������������������������������������������������0000664�0000000�0000000�00000006263�12166360012�015464� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Common macros used by gnulib tests. 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 <http://www.gnu.org/licenses/>. */ /* This file contains macros that are used by many gnulib tests. Put here only frequently used macros, say, used by 10 tests or more. */ #include <stdio.h> #include <stdlib.h> /* Define ASSERT_STREAM before including this file if ASSERT must target a stream other than stderr. */ #ifndef ASSERT_STREAM # define ASSERT_STREAM stderr #endif /* ASSERT (condition); verifies that the specified condition is fulfilled. If not, a message is printed to ASSERT_STREAM if defined (defaulting to stderr if undefined) and the program is terminated with an error code. This macro has the following properties: - The programmer specifies the expected condition, not the failure condition. This simplifies thinking. - The condition is tested always, regardless of compilation flags. (Unlike the macro from <assert.h>.) - On Unix platforms, the tester can debug the test program with a debugger (provided core dumps are enabled: "ulimit -c unlimited"). - For the sake of platforms where no debugger is available (such as some mingw systems), an error message is printed on the error stream that includes the source location of the ASSERT invocation. */ #define ASSERT(expr) \ do \ { \ if (!(expr)) \ { \ fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ __FILE__, __LINE__); \ fflush (ASSERT_STREAM); \ abort (); \ } \ } \ while (0) /* SIZEOF (array) returns the number of elements of an array. It works for arrays that are declared outside functions and for local variables of array type. It does *not* work for function parameters of array type, because they are actually parameters of pointer type. */ #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) /* STREQ (str1, str2) Return true if two strings compare equal. */ #define STREQ(a, b) (strcmp (a, b) == 0) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-c-strcasecmp.c�������������������������������������������0000664�0000000�0000000�00000004144�12166360012�017530� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of case-insensitive string comparison function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "c-strcase.h" #include <locale.h> #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { if (argc > 1) { /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; } ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0); ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0); ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0); ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0); ASSERT (c_strcasecmp ("para", "paragraph") < 0); ASSERT (c_strcasecmp ("paragraph", "para") > 0); /* The following tests shows how c_strcasecmp() is different from strcasecmp(). */ ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0); ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0); /* The following tests shows how c_strcasecmp() is different from mbscasecmp(). */ ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */ /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0); ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-frexp.c��������������������������������������������������0000664�0000000�0000000�00000011771�12166360012�016274� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of splitting a double into fraction and mantissa. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <math.h> #include "signature.h" SIGNATURE_CHECK (frexp, double, (double, int *)); #include <float.h> #include "isnand-nolibm.h" #include "minus-zero.h" #include "infinity.h" #include "nan.h" #include "macros.h" /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() function. */ #undef exp #define exp exponent static double my_ldexp (double x, int d) { for (; d > 0; d--) x *= 2.0; for (; d < 0; d++) x *= 0.5; return x; } int main () { int i; /* The use of 'volatile' guarantees that excess precision bits are dropped when dealing with denormalized numbers. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile double x; { /* NaN. */ int exp = -9999; double mantissa; x = NaNd (); mantissa = frexp (x, &exp); ASSERT (isnand (mantissa)); } { /* Positive infinity. */ int exp = -9999; double mantissa; x = Infinityd (); mantissa = frexp (x, &exp); ASSERT (mantissa == x); } { /* Negative infinity. */ int exp = -9999; double mantissa; x = - Infinityd (); mantissa = frexp (x, &exp); ASSERT (mantissa == x); } { /* Positive zero. */ int exp = -9999; double mantissa; x = 0.0; mantissa = frexp (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (!signbit (mantissa)); } { /* Negative zero. */ int exp = -9999; double mantissa; x = minus_zerod; mantissa = frexp (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (signbit (mantissa)); } for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505); } for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa >= 0.5); ASSERT (mantissa < 1.0); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025); } for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i || exp == i + 1); ASSERT (mantissa >= 0.5); ASSERT (mantissa < 1.0); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } �������id-utils-4.6+git20120811/gnulib-tests/Makefile.in���������������������������������������������������0000664�0000000�0000000�00000651372�12166360012�016103� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file 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 file 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 file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \ $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/test-driver TESTS = test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \ test-argv-iter$(EXEEXT) test-binary-io.sh \ test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \ test-c-ctype$(EXEEXT) test-c-strcase.sh \ test-calloc-gnu$(EXEEXT) test-chdir$(EXEEXT) \ test-cloexec$(EXEEXT) test-close$(EXEEXT) test-dirent$(EXEEXT) \ test-dirname$(EXEEXT) test-dup$(EXEEXT) test-dup2$(EXEEXT) \ test-environ$(EXEEXT) test-errno$(EXEEXT) test-exclude1.sh \ test-exclude2.sh test-exclude3.sh test-exclude4.sh \ test-exclude5.sh test-exclude6.sh test-exclude7.sh \ test-exclude8.sh test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \ test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) test-fflush2.sh \ test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ test-fopen$(EXEEXT) test-fpending.sh test-fprintf-posix.sh \ test-fprintf-posix2.sh test-fprintf-posix3.sh \ test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ test-freading$(EXEEXT) test-freopen$(EXEEXT) \ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ test-fseek.sh test-fseek2.sh test-fseeko.sh test-fseeko2.sh \ test-fseeko3.sh test-fseeko4.sh test-fseterr$(EXEEXT) \ test-fstat$(EXEEXT) test-fstatat$(EXEEXT) test-ftell.sh \ test-ftell2.sh test-ftell3$(EXEEXT) test-ftello.sh \ test-ftello2.sh test-ftello3$(EXEEXT) test-ftello4.sh \ test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) test-getcwd.sh \ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \ test-getopt$(EXEEXT) test-hash$(EXEEXT) \ test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \ test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ test-langinfo$(EXEEXT) test-locale$(EXEEXT) \ test-localename$(EXEEXT) test-lock$(EXEEXT) test-lseek.sh \ test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \ test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ test-mbrtowc-w32-5.sh test-mbscasecmp.sh test-mbsinit.sh \ test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ test-mbsrtowcs4.sh test-memchr$(EXEEXT) test-memrchr$(EXEEXT) \ test-nl_langinfo.sh test-open$(EXEEXT) test-openat$(EXEEXT) \ test-pathmax$(EXEEXT) test-printf-frexp$(EXEEXT) \ test-printf-frexpl$(EXEEXT) test-printf-posix.sh \ test-printf-posix2.sh test-quotearg-simple$(EXEEXT) \ test-realloc-gnu$(EXEEXT) test-setenv$(EXEEXT) \ test-setlocale1.sh test-setlocale2.sh test-signbit$(EXEEXT) \ test-snprintf$(EXEEXT) test-sprintf-posix$(EXEEXT) \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-strnlen$(EXEEXT) test-symlink$(EXEEXT) \ test-sys_ioctl$(EXEEXT) test-sys_stat$(EXEEXT) \ test-sys_types$(EXEEXT) test-init.sh test-thread_self$(EXEEXT) \ test-thread_create$(EXEEXT) test-time$(EXEEXT) \ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \ test-unsetenv$(EXEEXT) test-update-copyright.sh \ test-vasnprintf$(EXEEXT) test-vc-list-files-git.sh \ test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \ test-vfprintf-posix.sh test-wchar$(EXEEXT) test-wcrtomb.sh \ test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \ test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \ test-wcrtomb-w32-5.sh test-wctype-h$(EXEEXT) \ test-wcwidth$(EXEEXT) test-xalloc-die.sh XFAIL_TESTS = noinst_PROGRAMS = check_PROGRAMS = test-alloca-opt$(EXEEXT) test-argmatch$(EXEEXT) \ test-argv-iter$(EXEEXT) test-binary-io$(EXEEXT) \ test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \ test-c-strncasecmp$(EXEEXT) test-calloc-gnu$(EXEEXT) \ test-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \ test-dirent$(EXEEXT) test-dirname$(EXEEXT) test-dup$(EXEEXT) \ test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \ test-exclude$(EXEEXT) test-fchdir$(EXEEXT) \ test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) \ test-fflush2$(EXEEXT) test-fgetc$(EXEEXT) test-float$(EXEEXT) \ test-fnmatch$(EXEEXT) test-fopen$(EXEEXT) \ test-fpending$(EXEEXT) test-fprintf-posix$(EXEEXT) \ test-fprintf-posix2$(EXEEXT) test-fprintf-posix3$(EXEEXT) \ test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ test-freading$(EXEEXT) test-freopen$(EXEEXT) \ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ test-fseek$(EXEEXT) test-fseeko$(EXEEXT) test-fseeko3$(EXEEXT) \ test-fseeko4$(EXEEXT) test-fseterr$(EXEEXT) \ test-fstat$(EXEEXT) test-fstatat$(EXEEXT) test-ftell$(EXEEXT) \ test-ftell3$(EXEEXT) test-ftello$(EXEEXT) \ test-ftello3$(EXEEXT) test-ftello4$(EXEEXT) \ test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getcwd$(EXEEXT) test-getdelim$(EXEEXT) \ test-getdtablesize$(EXEEXT) test-getopt$(EXEEXT) \ test-hash$(EXEEXT) test-ignore-value$(EXEEXT) \ test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \ test-inttypes$(EXEEXT) test-isnand-nolibm$(EXEEXT) \ test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \ test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ test-locale$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lseek$(EXEEXT) test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ test-math$(EXEEXT) test-mbrtowc$(EXEEXT) \ test-mbrtowc-w32$(EXEEXT) test-mbscasecmp$(EXEEXT) \ test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \ test-memchr$(EXEEXT) test-memrchr$(EXEEXT) \ test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \ test-openat$(EXEEXT) test-pathmax$(EXEEXT) \ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \ test-printf-posix$(EXEEXT) test-printf-posix2$(EXEEXT) \ test-quotearg-simple$(EXEEXT) test-realloc-gnu$(EXEEXT) \ test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \ test-setlocale2$(EXEEXT) test-signbit$(EXEEXT) \ test-snprintf$(EXEEXT) test-sprintf-posix$(EXEEXT) \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-strnlen$(EXEEXT) test-symlink$(EXEEXT) \ test-sys_ioctl$(EXEEXT) test-sys_stat$(EXEEXT) \ test-sys_types$(EXEEXT) test-thread_self$(EXEEXT) \ test-thread_create$(EXEEXT) test-time$(EXEEXT) \ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \ test-unsetenv$(EXEEXT) test-vasnprintf$(EXEEXT) \ test-verify$(EXEEXT) test-vfprintf-posix$(EXEEXT) \ test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \ test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \ test-wcwidth$(EXEEXT) test-xalloc-die$(EXEEXT) subdir = gnulib-tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libtests_a_OBJECTS = argmatch.$(OBJEXT) fd-safer-flag.$(OBJEXT) \ dup-safer-flag.$(OBJEXT) get-rusage-as.$(OBJEXT) \ hash-pjw.$(OBJEXT) localename.$(OBJEXT) \ glthread/lock.$(OBJEXT) malloca.$(OBJEXT) \ glthread/thread.$(OBJEXT) glthread/threadlib.$(OBJEXT) \ vma-iter.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) test_alloca_opt_SOURCES = test-alloca-opt.c test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) test_alloca_opt_LDADD = $(LDADD) test_alloca_opt_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_argmatch_SOURCES = test-argmatch.c test_argmatch_OBJECTS = test-argmatch.$(OBJEXT) am__DEPENDENCIES_2 = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2) test_argv_iter_SOURCES = test-argv-iter.c test_argv_iter_OBJECTS = test-argv-iter.$(OBJEXT) test_argv_iter_LDADD = $(LDADD) test_argv_iter_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_binary_io_SOURCES = test-binary-io.c test_binary_io_OBJECTS = test-binary-io.$(OBJEXT) test_binary_io_LDADD = $(LDADD) test_binary_io_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_bitrotate_SOURCES = test-bitrotate.c test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT) test_bitrotate_LDADD = $(LDADD) test_bitrotate_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_btowc_SOURCES = test-btowc.c test_btowc_OBJECTS = test-btowc.$(OBJEXT) test_btowc_LDADD = $(LDADD) test_btowc_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_c_ctype_SOURCES = test-c-ctype.c test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT) test_c_ctype_LDADD = $(LDADD) test_c_ctype_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_c_strcasecmp_SOURCES = test-c-strcasecmp.c test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT) test_c_strcasecmp_LDADD = $(LDADD) test_c_strcasecmp_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_c_strncasecmp_SOURCES = test-c-strncasecmp.c test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT) test_c_strncasecmp_LDADD = $(LDADD) test_c_strncasecmp_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_calloc_gnu_SOURCES = test-calloc-gnu.c test_calloc_gnu_OBJECTS = test-calloc-gnu.$(OBJEXT) test_calloc_gnu_LDADD = $(LDADD) test_calloc_gnu_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_chdir_SOURCES = test-chdir.c test_chdir_OBJECTS = test-chdir.$(OBJEXT) test_chdir_LDADD = $(LDADD) test_chdir_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_cloexec_SOURCES = test-cloexec.c test_cloexec_OBJECTS = test-cloexec.$(OBJEXT) test_cloexec_LDADD = $(LDADD) test_cloexec_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_close_SOURCES = test-close.c test_close_OBJECTS = test-close.$(OBJEXT) test_close_LDADD = $(LDADD) test_close_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_dirent_SOURCES = test-dirent.c test_dirent_OBJECTS = test-dirent.$(OBJEXT) test_dirent_LDADD = $(LDADD) test_dirent_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_dirname_SOURCES = test-dirname.c test_dirname_OBJECTS = test-dirname.$(OBJEXT) test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_dup_SOURCES = test-dup.c test_dup_OBJECTS = test-dup.$(OBJEXT) test_dup_LDADD = $(LDADD) test_dup_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_dup_safer_SOURCES = test-dup-safer.c test_dup_safer_OBJECTS = test-dup-safer.$(OBJEXT) test_dup_safer_LDADD = $(LDADD) test_dup_safer_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_dup2_SOURCES = test-dup2.c test_dup2_OBJECTS = test-dup2.$(OBJEXT) test_dup2_LDADD = $(LDADD) test_dup2_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_environ_SOURCES = test-environ.c test_environ_OBJECTS = test-environ.$(OBJEXT) test_environ_LDADD = $(LDADD) test_environ_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_errno_SOURCES = test-errno.c test_errno_OBJECTS = test-errno.$(OBJEXT) test_errno_LDADD = $(LDADD) test_errno_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_exclude_SOURCES = test-exclude.c test_exclude_OBJECTS = test-exclude.$(OBJEXT) test_exclude_DEPENDENCIES = $(am__DEPENDENCIES_2) test_fchdir_SOURCES = test-fchdir.c test_fchdir_OBJECTS = test-fchdir.$(OBJEXT) test_fchdir_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_fcntl_SOURCES = test-fcntl.c test_fcntl_OBJECTS = test-fcntl.$(OBJEXT) test_fcntl_LDADD = $(LDADD) test_fcntl_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fcntl_h_SOURCES = test-fcntl-h.c test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT) test_fcntl_h_LDADD = $(LDADD) test_fcntl_h_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fdopen_SOURCES = test-fdopen.c test_fdopen_OBJECTS = test-fdopen.$(OBJEXT) test_fdopen_LDADD = $(LDADD) test_fdopen_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fdopendir_SOURCES = test-fdopendir.c test_fdopendir_OBJECTS = test-fdopendir.$(OBJEXT) test_fdopendir_DEPENDENCIES = $(am__DEPENDENCIES_2) test_fflush_SOURCES = test-fflush.c test_fflush_OBJECTS = test-fflush.$(OBJEXT) test_fflush_LDADD = $(LDADD) test_fflush_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fflush2_SOURCES = test-fflush2.c test_fflush2_OBJECTS = test-fflush2.$(OBJEXT) test_fflush2_LDADD = $(LDADD) test_fflush2_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fgetc_SOURCES = test-fgetc.c test_fgetc_OBJECTS = test-fgetc.$(OBJEXT) test_fgetc_LDADD = $(LDADD) test_fgetc_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_float_SOURCES = test-float.c test_float_OBJECTS = test-float.$(OBJEXT) test_float_LDADD = $(LDADD) test_float_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fnmatch_SOURCES = test-fnmatch.c test_fnmatch_OBJECTS = test-fnmatch.$(OBJEXT) test_fnmatch_LDADD = $(LDADD) test_fnmatch_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fopen_SOURCES = test-fopen.c test_fopen_OBJECTS = test-fopen.$(OBJEXT) test_fopen_LDADD = $(LDADD) test_fopen_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fpending_SOURCES = test-fpending.c test_fpending_OBJECTS = test-fpending.$(OBJEXT) test_fpending_LDADD = $(LDADD) test_fpending_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fprintf_posix_SOURCES = test-fprintf-posix.c test_fprintf_posix_OBJECTS = test-fprintf-posix.$(OBJEXT) test_fprintf_posix_LDADD = $(LDADD) test_fprintf_posix_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_fprintf_posix2_SOURCES = test-fprintf-posix2.c test_fprintf_posix2_OBJECTS = test-fprintf-posix2.$(OBJEXT) test_fprintf_posix2_LDADD = $(LDADD) test_fprintf_posix2_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_fprintf_posix3_SOURCES = test-fprintf-posix3.c test_fprintf_posix3_OBJECTS = test-fprintf-posix3.$(OBJEXT) test_fprintf_posix3_LDADD = $(LDADD) test_fprintf_posix3_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_fpurge_SOURCES = test-fpurge.c test_fpurge_OBJECTS = test-fpurge.$(OBJEXT) test_fpurge_LDADD = $(LDADD) test_fpurge_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fputc_SOURCES = test-fputc.c test_fputc_OBJECTS = test-fputc.$(OBJEXT) test_fputc_LDADD = $(LDADD) test_fputc_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fread_SOURCES = test-fread.c test_fread_OBJECTS = test-fread.$(OBJEXT) test_fread_LDADD = $(LDADD) test_fread_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_freading_SOURCES = test-freading.c test_freading_OBJECTS = test-freading.$(OBJEXT) test_freading_LDADD = $(LDADD) test_freading_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_freopen_SOURCES = test-freopen.c test_freopen_OBJECTS = test-freopen.$(OBJEXT) test_freopen_LDADD = $(LDADD) test_freopen_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) am_test_frexp_nolibm_OBJECTS = test-frexp.$(OBJEXT) test_frexp_nolibm_OBJECTS = $(am_test_frexp_nolibm_OBJECTS) test_frexp_nolibm_LDADD = $(LDADD) test_frexp_nolibm_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) am_test_frexpl_nolibm_OBJECTS = test-frexpl.$(OBJEXT) test_frexpl_nolibm_OBJECTS = $(am_test_frexpl_nolibm_OBJECTS) test_frexpl_nolibm_LDADD = $(LDADD) test_frexpl_nolibm_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_fseek_SOURCES = test-fseek.c test_fseek_OBJECTS = test-fseek.$(OBJEXT) test_fseek_LDADD = $(LDADD) test_fseek_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fseeko_SOURCES = test-fseeko.c test_fseeko_OBJECTS = test-fseeko.$(OBJEXT) test_fseeko_LDADD = $(LDADD) test_fseeko_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fseeko3_SOURCES = test-fseeko3.c test_fseeko3_OBJECTS = test-fseeko3.$(OBJEXT) test_fseeko3_LDADD = $(LDADD) test_fseeko3_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fseeko4_SOURCES = test-fseeko4.c test_fseeko4_OBJECTS = test-fseeko4.$(OBJEXT) test_fseeko4_LDADD = $(LDADD) test_fseeko4_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fseterr_SOURCES = test-fseterr.c test_fseterr_OBJECTS = test-fseterr.$(OBJEXT) test_fseterr_LDADD = $(LDADD) test_fseterr_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fstat_SOURCES = test-fstat.c test_fstat_OBJECTS = test-fstat.$(OBJEXT) test_fstat_LDADD = $(LDADD) test_fstat_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fstatat_SOURCES = test-fstatat.c test_fstatat_OBJECTS = test-fstatat.$(OBJEXT) test_fstatat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_ftell_SOURCES = test-ftell.c test_ftell_OBJECTS = test-ftell.$(OBJEXT) test_ftell_LDADD = $(LDADD) test_ftell_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_ftell3_SOURCES = test-ftell3.c test_ftell3_OBJECTS = test-ftell3.$(OBJEXT) test_ftell3_LDADD = $(LDADD) test_ftell3_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_ftello_SOURCES = test-ftello.c test_ftello_OBJECTS = test-ftello.$(OBJEXT) test_ftello_LDADD = $(LDADD) test_ftello_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_ftello3_SOURCES = test-ftello3.c test_ftello3_OBJECTS = test-ftello3.$(OBJEXT) test_ftello3_LDADD = $(LDADD) test_ftello3_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_ftello4_SOURCES = test-ftello4.c test_ftello4_OBJECTS = test-ftello4.$(OBJEXT) test_ftello4_LDADD = $(LDADD) test_ftello4_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_fwrite_SOURCES = test-fwrite.c test_fwrite_OBJECTS = test-fwrite.$(OBJEXT) test_fwrite_LDADD = $(LDADD) test_fwrite_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_getcwd_SOURCES = test-getcwd.c test_getcwd_OBJECTS = test-getcwd.$(OBJEXT) test_getcwd_DEPENDENCIES = $(am__DEPENDENCIES_2) test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT) test_getcwd_lgpl_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) test_getdelim_SOURCES = test-getdelim.c test_getdelim_OBJECTS = test-getdelim.$(OBJEXT) test_getdelim_LDADD = $(LDADD) test_getdelim_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_getdtablesize_SOURCES = test-getdtablesize.c test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT) test_getdtablesize_LDADD = $(LDADD) test_getdtablesize_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_getopt_SOURCES = test-getopt.c test_getopt_OBJECTS = test-getopt.$(OBJEXT) test_getopt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_hash_SOURCES = test-hash.c test_hash_OBJECTS = test-hash.$(OBJEXT) test_hash_LDADD = $(LDADD) test_hash_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_ignore_value_SOURCES = test-ignore-value.c test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT) test_ignore_value_LDADD = $(LDADD) test_ignore_value_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_intprops_SOURCES = test-intprops.c test_intprops_OBJECTS = test-intprops.$(OBJEXT) test_intprops_LDADD = $(LDADD) test_intprops_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_inttostr_SOURCES = test-inttostr.c test_inttostr_OBJECTS = test-inttostr.$(OBJEXT) test_inttostr_LDADD = $(LDADD) test_inttostr_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_inttypes_SOURCES = test-inttypes.c test_inttypes_OBJECTS = test-inttypes.$(OBJEXT) test_inttypes_LDADD = $(LDADD) test_inttypes_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_isnand_nolibm_SOURCES = test-isnand-nolibm.c test_isnand_nolibm_OBJECTS = test-isnand-nolibm.$(OBJEXT) test_isnand_nolibm_LDADD = $(LDADD) test_isnand_nolibm_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_isnanf_nolibm_SOURCES = test-isnanf-nolibm.c test_isnanf_nolibm_OBJECTS = test-isnanf-nolibm.$(OBJEXT) test_isnanf_nolibm_LDADD = $(LDADD) test_isnanf_nolibm_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_isnanl_nolibm_SOURCES = test-isnanl-nolibm.c test_isnanl_nolibm_OBJECTS = test-isnanl-nolibm.$(OBJEXT) test_isnanl_nolibm_LDADD = $(LDADD) test_isnanl_nolibm_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_iswblank_SOURCES = test-iswblank.c test_iswblank_OBJECTS = test-iswblank.$(OBJEXT) test_iswblank_LDADD = $(LDADD) test_iswblank_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_langinfo_SOURCES = test-langinfo.c test_langinfo_OBJECTS = test-langinfo.$(OBJEXT) test_langinfo_LDADD = $(LDADD) test_langinfo_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_locale_SOURCES = test-locale.c test_locale_OBJECTS = test-locale.$(OBJEXT) test_locale_LDADD = $(LDADD) test_locale_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_localename_SOURCES = test-localename.c test_localename_OBJECTS = test-localename.$(OBJEXT) test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) test_lock_SOURCES = test-lock.c test_lock_OBJECTS = test-lock.$(OBJEXT) test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2) test_lseek_SOURCES = test-lseek.c test_lseek_OBJECTS = test-lseek.$(OBJEXT) test_lseek_LDADD = $(LDADD) test_lseek_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_lstat_SOURCES = test-lstat.c test_lstat_OBJECTS = test-lstat.$(OBJEXT) test_lstat_LDADD = $(LDADD) test_lstat_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_malloc_gnu_SOURCES = test-malloc-gnu.c test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT) test_malloc_gnu_LDADD = $(LDADD) test_malloc_gnu_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_malloca_SOURCES = test-malloca.c test_malloca_OBJECTS = test-malloca.$(OBJEXT) test_malloca_LDADD = $(LDADD) test_malloca_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_math_SOURCES = test-math.c test_math_OBJECTS = test-math.$(OBJEXT) test_math_LDADD = $(LDADD) test_math_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_mbrtowc_SOURCES = test-mbrtowc.c test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT) test_mbrtowc_LDADD = $(LDADD) test_mbrtowc_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT) test_mbrtowc_w32_LDADD = $(LDADD) test_mbrtowc_w32_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_mbscasecmp_SOURCES = test-mbscasecmp.c test_mbscasecmp_OBJECTS = test-mbscasecmp.$(OBJEXT) test_mbscasecmp_LDADD = $(LDADD) test_mbscasecmp_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_mbsinit_SOURCES = test-mbsinit.c test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT) test_mbsinit_LDADD = $(LDADD) test_mbsinit_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_mbsrtowcs_SOURCES = test-mbsrtowcs.c test_mbsrtowcs_OBJECTS = test-mbsrtowcs.$(OBJEXT) test_mbsrtowcs_LDADD = $(LDADD) test_mbsrtowcs_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_memchr_SOURCES = test-memchr.c test_memchr_OBJECTS = test-memchr.$(OBJEXT) test_memchr_LDADD = $(LDADD) test_memchr_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_memrchr_SOURCES = test-memrchr.c test_memrchr_OBJECTS = test-memrchr.$(OBJEXT) test_memrchr_LDADD = $(LDADD) test_memrchr_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_nl_langinfo_SOURCES = test-nl_langinfo.c test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT) test_nl_langinfo_LDADD = $(LDADD) test_nl_langinfo_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_open_SOURCES = test-open.c test_open_OBJECTS = test-open.$(OBJEXT) test_open_LDADD = $(LDADD) test_open_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_openat_SOURCES = test-openat.c test_openat_OBJECTS = test-openat.$(OBJEXT) test_openat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_pathmax_SOURCES = test-pathmax.c test_pathmax_OBJECTS = test-pathmax.$(OBJEXT) test_pathmax_LDADD = $(LDADD) test_pathmax_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_printf_frexp_SOURCES = test-printf-frexp.c test_printf_frexp_OBJECTS = test-printf-frexp.$(OBJEXT) test_printf_frexp_LDADD = $(LDADD) test_printf_frexp_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_printf_frexpl_SOURCES = test-printf-frexpl.c test_printf_frexpl_OBJECTS = test-printf-frexpl.$(OBJEXT) test_printf_frexpl_LDADD = $(LDADD) test_printf_frexpl_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_printf_posix_SOURCES = test-printf-posix.c test_printf_posix_OBJECTS = test-printf-posix.$(OBJEXT) test_printf_posix_LDADD = $(LDADD) test_printf_posix_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_printf_posix2_SOURCES = test-printf-posix2.c test_printf_posix2_OBJECTS = test-printf-posix2.$(OBJEXT) test_printf_posix2_LDADD = $(LDADD) test_printf_posix2_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_quotearg_simple_SOURCES = test-quotearg-simple.c test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT) test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2) test_realloc_gnu_SOURCES = test-realloc-gnu.c test_realloc_gnu_OBJECTS = test-realloc-gnu.$(OBJEXT) test_realloc_gnu_LDADD = $(LDADD) test_realloc_gnu_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_setenv_SOURCES = test-setenv.c test_setenv_OBJECTS = test-setenv.$(OBJEXT) test_setenv_LDADD = $(LDADD) test_setenv_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_setlocale1_SOURCES = test-setlocale1.c test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT) test_setlocale1_LDADD = $(LDADD) test_setlocale1_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_setlocale2_SOURCES = test-setlocale2.c test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT) test_setlocale2_LDADD = $(LDADD) test_setlocale2_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_signbit_SOURCES = test-signbit.c test_signbit_OBJECTS = test-signbit.$(OBJEXT) test_signbit_LDADD = $(LDADD) test_signbit_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_snprintf_SOURCES = test-snprintf.c test_snprintf_OBJECTS = test-snprintf.$(OBJEXT) test_snprintf_LDADD = $(LDADD) test_snprintf_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_sprintf_posix_SOURCES = test-sprintf-posix.c test_sprintf_posix_OBJECTS = test-sprintf-posix.$(OBJEXT) test_sprintf_posix_LDADD = $(LDADD) test_sprintf_posix_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_stat_SOURCES = test-stat.c test_stat_OBJECTS = test-stat.$(OBJEXT) test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_stdbool_SOURCES = test-stdbool.c test_stdbool_OBJECTS = test-stdbool.$(OBJEXT) test_stdbool_LDADD = $(LDADD) test_stdbool_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_stddef_SOURCES = test-stddef.c test_stddef_OBJECTS = test-stddef.$(OBJEXT) test_stddef_LDADD = $(LDADD) test_stddef_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_stdint_SOURCES = test-stdint.c test_stdint_OBJECTS = test-stdint.$(OBJEXT) test_stdint_LDADD = $(LDADD) test_stdint_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_stdio_SOURCES = test-stdio.c test_stdio_OBJECTS = test-stdio.$(OBJEXT) test_stdio_LDADD = $(LDADD) test_stdio_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_stdlib_SOURCES = test-stdlib.c test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) test_stdlib_LDADD = $(LDADD) test_stdlib_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_strcasestr_SOURCES = test-strcasestr.c test_strcasestr_OBJECTS = test-strcasestr.$(OBJEXT) test_strcasestr_LDADD = $(LDADD) test_strcasestr_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_strerror_SOURCES = test-strerror.c test_strerror_OBJECTS = test-strerror.$(OBJEXT) test_strerror_LDADD = $(LDADD) test_strerror_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_string_SOURCES = test-string.c test_string_OBJECTS = test-string.$(OBJEXT) test_string_LDADD = $(LDADD) test_string_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_strings_SOURCES = test-strings.c test_strings_OBJECTS = test-strings.$(OBJEXT) test_strings_LDADD = $(LDADD) test_strings_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_strnlen_SOURCES = test-strnlen.c test_strnlen_OBJECTS = test-strnlen.$(OBJEXT) test_strnlen_LDADD = $(LDADD) test_strnlen_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_symlink_SOURCES = test-symlink.c test_symlink_OBJECTS = test-symlink.$(OBJEXT) test_symlink_LDADD = $(LDADD) test_symlink_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_sys_ioctl_SOURCES = test-sys_ioctl.c test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT) test_sys_ioctl_LDADD = $(LDADD) test_sys_ioctl_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_sys_stat_SOURCES = test-sys_stat.c test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) test_sys_stat_LDADD = $(LDADD) test_sys_stat_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_sys_types_SOURCES = test-sys_types.c test_sys_types_OBJECTS = test-sys_types.$(OBJEXT) test_sys_types_LDADD = $(LDADD) test_sys_types_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_thread_create_SOURCES = test-thread_create.c test_thread_create_OBJECTS = test-thread_create.$(OBJEXT) test_thread_create_DEPENDENCIES = $(am__DEPENDENCIES_2) test_thread_self_SOURCES = test-thread_self.c test_thread_self_OBJECTS = test-thread_self.$(OBJEXT) test_thread_self_DEPENDENCIES = $(am__DEPENDENCIES_2) test_time_SOURCES = test-time.c test_time_OBJECTS = test-time.$(OBJEXT) test_time_LDADD = $(LDADD) test_time_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) am_test_uc_width_OBJECTS = uniwidth/test-uc_width.$(OBJEXT) test_uc_width_OBJECTS = $(am_test_uc_width_OBJECTS) test_uc_width_DEPENDENCIES = $(am__DEPENDENCIES_2) am_test_uc_width2_OBJECTS = uniwidth/test-uc_width2.$(OBJEXT) test_uc_width2_OBJECTS = $(am_test_uc_width2_OBJECTS) test_uc_width2_DEPENDENCIES = $(am__DEPENDENCIES_2) test_unistd_SOURCES = test-unistd.c test_unistd_OBJECTS = test-unistd.$(OBJEXT) test_unistd_LDADD = $(LDADD) test_unistd_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_unsetenv_SOURCES = test-unsetenv.c test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT) test_unsetenv_LDADD = $(LDADD) test_unsetenv_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_vasnprintf_SOURCES = test-vasnprintf.c test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT) test_vasnprintf_LDADD = $(LDADD) test_vasnprintf_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_verify_SOURCES = test-verify.c test_verify_OBJECTS = test-verify.$(OBJEXT) test_verify_LDADD = $(LDADD) test_verify_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_vfprintf_posix_SOURCES = test-vfprintf-posix.c test_vfprintf_posix_OBJECTS = test-vfprintf-posix.$(OBJEXT) test_vfprintf_posix_LDADD = $(LDADD) test_vfprintf_posix_DEPENDENCIES = libtests.a ../lib/libgnu.a \ libtests.a $(am__DEPENDENCIES_1) test_wchar_SOURCES = test-wchar.c test_wchar_OBJECTS = test-wchar.$(OBJEXT) test_wchar_LDADD = $(LDADD) test_wchar_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_wcrtomb_SOURCES = test-wcrtomb.c test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT) test_wcrtomb_LDADD = $(LDADD) test_wcrtomb_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT) test_wcrtomb_w32_LDADD = $(LDADD) test_wcrtomb_w32_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_wctype_h_SOURCES = test-wctype-h.c test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT) test_wctype_h_LDADD = $(LDADD) test_wctype_h_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_wcwidth_SOURCES = test-wcwidth.c test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT) test_wcwidth_LDADD = $(LDADD) test_wcwidth_DEPENDENCIES = libtests.a ../lib/libgnu.a libtests.a \ $(am__DEPENDENCIES_1) test_xalloc_die_SOURCES = test-xalloc-die.c test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT) test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-argmatch.c test-argv-iter.c \ test-binary-io.c test-bitrotate.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c test-calloc-gnu.c \ test-chdir.c test-cloexec.c test-close.c test-dirent.c \ test-dirname.c test-dup.c test-dup-safer.c test-dup2.c \ test-environ.c test-errno.c test-exclude.c test-fchdir.c \ test-fcntl.c test-fcntl-h.c test-fdopen.c test-fdopendir.c \ test-fflush.c test-fflush2.c test-fgetc.c test-float.c \ test-fnmatch.c test-fopen.c test-fpending.c \ test-fprintf-posix.c test-fprintf-posix2.c \ test-fprintf-posix3.c test-fpurge.c test-fputc.c test-fread.c \ test-freading.c test-freopen.c $(test_frexp_nolibm_SOURCES) \ $(test_frexpl_nolibm_SOURCES) test-fseek.c test-fseeko.c \ test-fseeko3.c test-fseeko4.c test-fseterr.c test-fstat.c \ test-fstatat.c test-ftell.c test-ftell3.c test-ftello.c \ test-ftello3.c test-ftello4.c test-fwrite.c test-getcwd.c \ test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ test-getopt.c test-hash.c test-ignore-value.c test-intprops.c \ test-inttostr.c test-inttypes.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ test-langinfo.c test-locale.c test-localename.c test-lock.c \ test-lseek.c test-lstat.c test-malloc-gnu.c test-malloca.c \ test-math.c test-mbrtowc.c test-mbrtowc-w32.c \ test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \ test-memchr.c test-memrchr.c test-nl_langinfo.c test-open.c \ test-openat.c test-pathmax.c test-printf-frexp.c \ test-printf-frexpl.c test-printf-posix.c test-printf-posix2.c \ test-quotearg-simple.c test-realloc-gnu.c test-setenv.c \ test-setlocale1.c test-setlocale2.c test-signbit.c \ test-snprintf.c test-sprintf-posix.c test-stat.c \ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ test-stdlib.c test-strcasestr.c test-strerror.c test-string.c \ test-strings.c test-strnlen.c test-symlink.c test-sys_ioctl.c \ test-sys_stat.c test-sys_types.c test-thread_create.c \ test-thread_self.c test-time.c $(test_uc_width_SOURCES) \ $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \ test-vasnprintf.c test-verify.c test-vfprintf-posix.c \ test-wchar.c test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \ test-wcwidth.c test-xalloc-die.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-argmatch.c test-argv-iter.c \ test-binary-io.c test-bitrotate.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c test-calloc-gnu.c \ test-chdir.c test-cloexec.c test-close.c test-dirent.c \ test-dirname.c test-dup.c test-dup-safer.c test-dup2.c \ test-environ.c test-errno.c test-exclude.c test-fchdir.c \ test-fcntl.c test-fcntl-h.c test-fdopen.c test-fdopendir.c \ test-fflush.c test-fflush2.c test-fgetc.c test-float.c \ test-fnmatch.c test-fopen.c test-fpending.c \ test-fprintf-posix.c test-fprintf-posix2.c \ test-fprintf-posix3.c test-fpurge.c test-fputc.c test-fread.c \ test-freading.c test-freopen.c $(test_frexp_nolibm_SOURCES) \ $(test_frexpl_nolibm_SOURCES) test-fseek.c test-fseeko.c \ test-fseeko3.c test-fseeko4.c test-fseterr.c test-fstat.c \ test-fstatat.c test-ftell.c test-ftell3.c test-ftello.c \ test-ftello3.c test-ftello4.c test-fwrite.c test-getcwd.c \ test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ test-getopt.c test-hash.c test-ignore-value.c test-intprops.c \ test-inttostr.c test-inttypes.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ test-langinfo.c test-locale.c test-localename.c test-lock.c \ test-lseek.c test-lstat.c test-malloc-gnu.c test-malloca.c \ test-math.c test-mbrtowc.c test-mbrtowc-w32.c \ test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \ test-memchr.c test-memrchr.c test-nl_langinfo.c test-open.c \ test-openat.c test-pathmax.c test-printf-frexp.c \ test-printf-frexpl.c test-printf-posix.c test-printf-posix2.c \ test-quotearg-simple.c test-realloc-gnu.c test-setenv.c \ test-setlocale1.c test-setlocale2.c test-signbit.c \ test-snprintf.c test-sprintf-posix.c test-stat.c \ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ test-stdlib.c test-strcasestr.c test-strerror.c test-string.c \ test-strings.c test-strnlen.c test-symlink.c test-sys_ioctl.c \ test-sys_stat.c test-sys_types.c test-thread_create.c \ test-thread_self.c test-time.c $(test_uc_width_SOURCES) \ $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \ test-vasnprintf.c test-verify.c test-vfprintf-posix.c \ test-wchar.c test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \ test-wcwidth.c test-xalloc-die.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ check recheck distdir ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no # If stdout is a non-dumb tty, use colors. If test -t is not supported, # then this fails; a conservative approach. Of course do not redirect # stdout here, just stderr. am__tty_colors = \ $(am__tty_colors_dummy); \ test "X$(AM_COLOR_TESTS)" != Xno \ && test "X$$TERM" != Xdumb \ && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ && { \ am__color_tests=yes; \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } # Restructured Text title and section. am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' am__rst_section = sed 'p;s/./=/g;p;g' # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the `.log' extension removed). The result is saved in the shell variable # `$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects SUBDIRS = . TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \ LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' abs_aux_dir='$(abs_aux_dir)' \ abs_aux_dir='$(abs_aux_dir)' MAKE='$(MAKE)' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = test-alloca-opt.c argmatch.h test-argmatch.c macros.h \ test-argv-iter.c macros.h test-binary-io.sh test-binary-io.c \ macros.h test-bitrotate.c macros.h test-btowc1.sh \ test-btowc2.sh test-btowc.c signature.h macros.h \ test-c-ctype.c macros.h test-c-strcase.sh test-c-strcasecmp.c \ test-c-strncasecmp.c macros.h test-calloc-gnu.c test-chdir.c \ signature.h macros.h test-cloexec.c macros.h test-close.c \ signature.h macros.h test-dirent.c test-dirname.c test-dup.c \ signature.h macros.h test-dup2.c signature.h macros.h \ test-environ.c test-errno.c test-exclude.c test-exclude1.sh \ test-exclude2.sh test-exclude3.sh test-exclude4.sh \ test-exclude5.sh test-exclude6.sh test-exclude7.sh \ test-exclude8.sh test-fchdir.c signature.h macros.h \ test-fcntl-h.c test-fcntl.c signature.h macros.h fdopen.c \ test-fdopen.c signature.h macros.h test-fdopendir.c \ signature.h macros.h test-fflush.c test-fflush2.sh \ test-fflush2.c signature.h macros.h test-fgetc.c signature.h \ macros.h test-float.c macros.h test-fnmatch.c signature.h \ macros.h test-fopen.h test-fopen.c signature.h macros.h \ test-fpending.c test-fpending.sh macros.h \ test-fprintf-posix.sh test-fprintf-posix.c \ test-fprintf-posix.h test-printf-posix.output \ test-fprintf-posix2.sh test-fprintf-posix2.c \ test-fprintf-posix3.sh test-fprintf-posix3.c infinity.h \ signature.h macros.h test-fpurge.c macros.h test-fputc.c \ signature.h macros.h test-fread.c signature.h macros.h \ test-freading.c macros.h test-freopen.c signature.h macros.h \ test-frexp.c minus-zero.h infinity.h nan.h signature.h \ macros.h test-frexpl.c minus-zero.h infinity.h nan.h \ signature.h macros.h test-fseek.c test-fseek.sh test-fseek2.sh \ signature.h macros.h test-fseeko.c test-fseeko.sh \ test-fseeko2.sh test-fseeko3.c test-fseeko3.sh test-fseeko4.c \ test-fseeko4.sh signature.h macros.h test-fseterr.c \ test-fstat.c signature.h macros.h test-fstatat.c test-lstat.h \ test-stat.h signature.h macros.h test-ftell.c test-ftell.sh \ test-ftell2.sh test-ftell3.c signature.h macros.h \ test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c \ test-ftello4.c test-ftello4.sh signature.h macros.h \ test-fwrite.c signature.h macros.h resource-ext.h \ test-getcwd-lgpl.c signature.h macros.h test-getcwd.c \ test-getcwd.sh test-getdelim.c signature.h macros.h \ test-getdtablesize.c signature.h macros.h macros.h signature.h \ test-getopt.c test-getopt.h test-getopt_long.h getpagesize.c \ test-hash.c macros.h test-ignore-value.c test-intprops.c \ macros.h macros.h test-inttostr.c inttypes.in.h \ test-inttypes.c test-isnand-nolibm.c test-isnand.h \ minus-zero.h infinity.h nan.h macros.h test-isnanf-nolibm.c \ test-isnanf.h minus-zero.h infinity.h nan.h macros.h \ test-isnanl-nolibm.c test-isnanl.h minus-zero.h infinity.h \ nan.h macros.h test-iswblank.c macros.h test-langinfo.c \ locale.in.h test-locale.c localename.h test-localename.c \ macros.h test-lock.c test-lseek.c test-lseek.sh signature.h \ macros.h test-lstat.h test-lstat.c signature.h macros.h \ test-malloc-gnu.c malloca.h malloca.valgrind test-malloca.c \ test-math.c test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \ test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \ test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \ test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c \ signature.h macros.h test-mbscasecmp.sh test-mbscasecmp.c \ macros.h test-mbsinit.sh test-mbsinit.c signature.h macros.h \ test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \ test-memchr.c zerosize-ptr.h signature.h macros.h \ test-memrchr.c zerosize-ptr.h signature.h macros.h \ test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \ test-open.h test-open.c signature.h macros.h test-openat.c \ test-open.h signature.h macros.h test-pathmax.c \ test-printf-frexp.c macros.h test-printf-frexpl.c macros.h \ test-printf-posix.sh test-printf-posix.c test-printf-posix.h \ test-printf-posix.output test-printf-posix2.sh \ test-printf-posix2.c infinity.h signature.h macros.h putenv.c \ test-quotearg-simple.c test-quotearg.h macros.h \ test-realloc-gnu.c same-inode.h setenv.c test-setenv.c \ signature.h macros.h setlocale.c test-setlocale1.sh \ test-setlocale1.c test-setlocale2.sh test-setlocale2.c \ signature.h macros.h test-signbit.c minus-zero.h infinity.h \ macros.h $(top_srcdir)/build-aux/snippet/_Noreturn.h \ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ $(top_srcdir)/build-aux/snippet/warn-on-use.h snprintf.c \ test-snprintf.c signature.h macros.h test-sprintf-posix.c \ test-sprintf-posix.h minus-zero.h infinity.h nan.h signature.h \ macros.h test-stat.h test-stat.c signature.h macros.h \ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ test-stdlib.c test-sys_wait.h test-strcasestr.c signature.h \ macros.h test-strerror.c signature.h macros.h test-string.c \ test-strings.c test-strnlen.c zerosize-ptr.h signature.h \ macros.h symlink.c test-symlink.h test-symlink.c signature.h \ macros.h test-sys_ioctl.c test-sys_stat.c test-sys_types.c \ init.sh test-init.sh test-thread_self.c test-thread_create.c \ macros.h $(top_srcdir)/build-aux/config.rpath test-time.c \ test-dup-safer.c macros.h test-unistd.c \ uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \ uniwidth/test-uc_width2.sh macros.h unsetenv.c test-unsetenv.c \ signature.h macros.h test-update-copyright.sh \ test-vasnprintf.c macros.h test-vc-list-files-git.sh \ test-vc-list-files-cvs.sh test-verify.c test-verify.sh \ test-vfprintf-posix.sh test-vfprintf-posix.c \ test-fprintf-posix.h test-printf-posix.output infinity.h \ signature.h macros.h vma-iter.h test-wchar.c test-wcrtomb.sh \ test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \ test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \ test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h \ wctob.c wctomb-impl.h wctomb.c test-wctype-h.c macros.h \ test-wcwidth.c signature.h macros.h test-xalloc-die.c \ test-xalloc-die.sh # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = inttypes.h locale.h arg-nonnull.h c++defs.h \ warn-on-use.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump test-fflush.txt test-fpending.t \ t-fpurge.tmp t-freading.tmp t-ftell3.tmp t-ftello3.tmp \ test-getdelim.txt inttypes.h inttypes.h-t locale.h locale.h-t \ arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ warn-on-use.h warn-on-use.h-t MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -D@gltests_WITNESS@=1 \ -I. -I$(srcdir) \ -I.. -I$(srcdir)/.. \ -I../lib -I$(srcdir)/../lib LDADD = libtests.a ../lib/libgnu.a libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = argmatch.c binary-io.h fd-safer-flag.c \ dup-safer-flag.c get-rusage-as.c hash-pjw.h hash-pjw.c \ localename.c glthread/lock.h glthread/lock.c malloca.c \ glthread/thread.h glthread/thread.c glthread/threadlib.c \ vma-iter.c glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = fdopen.c getpagesize.c putenv.c setenv.c \ setlocale.c snprintf.c symlink.c unsetenv.c wctob.c wctomb.c AM_LIBTOOLFLAGS = --preserve-dup-deps test_argmatch_LDADD = $(LDADD) @LIBINTL@ test_dirname_LDADD = $(LDADD) @LIBINTL@ test_exclude_LDADD = $(LDADD) @LIBINTL@ test_fchdir_LDADD = $(LDADD) $(LIBINTL) test_fdopendir_LDADD = $(LDADD) @LIBINTL@ test_frexp_nolibm_SOURCES = test-frexp.c test_frexpl_nolibm_SOURCES = test-frexpl.c test_fstatat_LDADD = $(LDADD) @LIBINTL@ test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) test_getcwd_LDADD = $(LDADD) @LIBINTL@ test_getopt_LDADD = $(LDADD) $(LIBINTL) test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ test_openat_LDADD = $(LDADD) @LIBINTL@ test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h test_stat_LDADD = $(LDADD) $(LIBINTL) test_thread_self_LDADD = $(LDADD) @LIBTHREAD@ test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@ test_uc_width_SOURCES = uniwidth/test-uc_width.c test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING) test_uc_width2_SOURCES = uniwidth/test-uc_width2.c test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING) test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gnulib-tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gnulib-tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/gnulib.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) glthread/$(am__dirstamp): @$(MKDIR_P) glthread @: > glthread/$(am__dirstamp) glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) $(AM_V_at)-rm -f libtests.a $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(AM_V_at)$(RANLIB) libtests.a clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) $(EXTRA_test_alloca_opt_DEPENDENCIES) @rm -f test-alloca-opt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) test-argmatch$(EXEEXT): $(test_argmatch_OBJECTS) $(test_argmatch_DEPENDENCIES) $(EXTRA_test_argmatch_DEPENDENCIES) @rm -f test-argmatch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_argmatch_OBJECTS) $(test_argmatch_LDADD) $(LIBS) test-argv-iter$(EXEEXT): $(test_argv_iter_OBJECTS) $(test_argv_iter_DEPENDENCIES) $(EXTRA_test_argv_iter_DEPENDENCIES) @rm -f test-argv-iter$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_argv_iter_OBJECTS) $(test_argv_iter_LDADD) $(LIBS) test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES) @rm -f test-binary-io$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS) test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES) $(EXTRA_test_bitrotate_DEPENDENCIES) @rm -f test-bitrotate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_bitrotate_OBJECTS) $(test_bitrotate_LDADD) $(LIBS) test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) $(EXTRA_test_btowc_DEPENDENCIES) @rm -f test-btowc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS) test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) $(EXTRA_test_c_ctype_DEPENDENCIES) @rm -f test-c-ctype$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS) test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) $(EXTRA_test_c_strcasecmp_DEPENDENCIES) @rm -f test-c-strcasecmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS) test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) $(EXTRA_test_c_strncasecmp_DEPENDENCIES) @rm -f test-c-strncasecmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS) test-calloc-gnu$(EXEEXT): $(test_calloc_gnu_OBJECTS) $(test_calloc_gnu_DEPENDENCIES) $(EXTRA_test_calloc_gnu_DEPENDENCIES) @rm -f test-calloc-gnu$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_calloc_gnu_OBJECTS) $(test_calloc_gnu_LDADD) $(LIBS) test-chdir$(EXEEXT): $(test_chdir_OBJECTS) $(test_chdir_DEPENDENCIES) $(EXTRA_test_chdir_DEPENDENCIES) @rm -f test-chdir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_chdir_OBJECTS) $(test_chdir_LDADD) $(LIBS) test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) $(EXTRA_test_cloexec_DEPENDENCIES) @rm -f test-cloexec$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS) test-close$(EXEEXT): $(test_close_OBJECTS) $(test_close_DEPENDENCIES) $(EXTRA_test_close_DEPENDENCIES) @rm -f test-close$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS) test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) $(EXTRA_test_dirent_DEPENDENCIES) @rm -f test-dirent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS) test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) $(EXTRA_test_dirname_DEPENDENCIES) @rm -f test-dirname$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS) test-dup$(EXEEXT): $(test_dup_OBJECTS) $(test_dup_DEPENDENCIES) $(EXTRA_test_dup_DEPENDENCIES) @rm -f test-dup$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dup_OBJECTS) $(test_dup_LDADD) $(LIBS) test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES) $(EXTRA_test_dup_safer_DEPENDENCIES) @rm -f test-dup-safer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dup_safer_OBJECTS) $(test_dup_safer_LDADD) $(LIBS) test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) $(EXTRA_test_dup2_DEPENDENCIES) @rm -f test-dup2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS) test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) $(EXTRA_test_environ_DEPENDENCIES) @rm -f test-environ$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS) test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_test_errno_DEPENDENCIES) @rm -f test-errno$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS) test-exclude$(EXEEXT): $(test_exclude_OBJECTS) $(test_exclude_DEPENDENCIES) $(EXTRA_test_exclude_DEPENDENCIES) @rm -f test-exclude$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_exclude_OBJECTS) $(test_exclude_LDADD) $(LIBS) test-fchdir$(EXEEXT): $(test_fchdir_OBJECTS) $(test_fchdir_DEPENDENCIES) $(EXTRA_test_fchdir_DEPENDENCIES) @rm -f test-fchdir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fchdir_OBJECTS) $(test_fchdir_LDADD) $(LIBS) test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) $(EXTRA_test_fcntl_DEPENDENCIES) @rm -f test-fcntl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS) test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) $(EXTRA_test_fcntl_h_DEPENDENCIES) @rm -f test-fcntl-h$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS) test-fdopen$(EXEEXT): $(test_fdopen_OBJECTS) $(test_fdopen_DEPENDENCIES) $(EXTRA_test_fdopen_DEPENDENCIES) @rm -f test-fdopen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fdopen_OBJECTS) $(test_fdopen_LDADD) $(LIBS) test-fdopendir$(EXEEXT): $(test_fdopendir_OBJECTS) $(test_fdopendir_DEPENDENCIES) $(EXTRA_test_fdopendir_DEPENDENCIES) @rm -f test-fdopendir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fdopendir_OBJECTS) $(test_fdopendir_LDADD) $(LIBS) test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) $(EXTRA_test_fflush_DEPENDENCIES) @rm -f test-fflush$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS) test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) $(EXTRA_test_fflush2_DEPENDENCIES) @rm -f test-fflush2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS) test-fgetc$(EXEEXT): $(test_fgetc_OBJECTS) $(test_fgetc_DEPENDENCIES) $(EXTRA_test_fgetc_DEPENDENCIES) @rm -f test-fgetc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fgetc_OBJECTS) $(test_fgetc_LDADD) $(LIBS) test-float$(EXEEXT): $(test_float_OBJECTS) $(test_float_DEPENDENCIES) $(EXTRA_test_float_DEPENDENCIES) @rm -f test-float$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_float_OBJECTS) $(test_float_LDADD) $(LIBS) test-fnmatch$(EXEEXT): $(test_fnmatch_OBJECTS) $(test_fnmatch_DEPENDENCIES) $(EXTRA_test_fnmatch_DEPENDENCIES) @rm -f test-fnmatch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fnmatch_OBJECTS) $(test_fnmatch_LDADD) $(LIBS) test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) $(EXTRA_test_fopen_DEPENDENCIES) @rm -f test-fopen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS) test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) $(EXTRA_test_fpending_DEPENDENCIES) @rm -f test-fpending$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS) test-fprintf-posix$(EXEEXT): $(test_fprintf_posix_OBJECTS) $(test_fprintf_posix_DEPENDENCIES) $(EXTRA_test_fprintf_posix_DEPENDENCIES) @rm -f test-fprintf-posix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fprintf_posix_OBJECTS) $(test_fprintf_posix_LDADD) $(LIBS) test-fprintf-posix2$(EXEEXT): $(test_fprintf_posix2_OBJECTS) $(test_fprintf_posix2_DEPENDENCIES) $(EXTRA_test_fprintf_posix2_DEPENDENCIES) @rm -f test-fprintf-posix2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fprintf_posix2_OBJECTS) $(test_fprintf_posix2_LDADD) $(LIBS) test-fprintf-posix3$(EXEEXT): $(test_fprintf_posix3_OBJECTS) $(test_fprintf_posix3_DEPENDENCIES) $(EXTRA_test_fprintf_posix3_DEPENDENCIES) @rm -f test-fprintf-posix3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fprintf_posix3_OBJECTS) $(test_fprintf_posix3_LDADD) $(LIBS) test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) $(EXTRA_test_fpurge_DEPENDENCIES) @rm -f test-fpurge$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS) test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES) @rm -f test-fputc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fputc_OBJECTS) $(test_fputc_LDADD) $(LIBS) test-fread$(EXEEXT): $(test_fread_OBJECTS) $(test_fread_DEPENDENCIES) $(EXTRA_test_fread_DEPENDENCIES) @rm -f test-fread$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fread_OBJECTS) $(test_fread_LDADD) $(LIBS) test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) $(EXTRA_test_freading_DEPENDENCIES) @rm -f test-freading$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS) test-freopen$(EXEEXT): $(test_freopen_OBJECTS) $(test_freopen_DEPENDENCIES) $(EXTRA_test_freopen_DEPENDENCIES) @rm -f test-freopen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_freopen_OBJECTS) $(test_freopen_LDADD) $(LIBS) test-frexp-nolibm$(EXEEXT): $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_DEPENDENCIES) $(EXTRA_test_frexp_nolibm_DEPENDENCIES) @rm -f test-frexp-nolibm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_LDADD) $(LIBS) test-frexpl-nolibm$(EXEEXT): $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_DEPENDENCIES) $(EXTRA_test_frexpl_nolibm_DEPENDENCIES) @rm -f test-frexpl-nolibm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_LDADD) $(LIBS) test-fseek$(EXEEXT): $(test_fseek_OBJECTS) $(test_fseek_DEPENDENCIES) $(EXTRA_test_fseek_DEPENDENCIES) @rm -f test-fseek$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseek_OBJECTS) $(test_fseek_LDADD) $(LIBS) test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) $(EXTRA_test_fseeko_DEPENDENCIES) @rm -f test-fseeko$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS) test-fseeko3$(EXEEXT): $(test_fseeko3_OBJECTS) $(test_fseeko3_DEPENDENCIES) $(EXTRA_test_fseeko3_DEPENDENCIES) @rm -f test-fseeko3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseeko3_OBJECTS) $(test_fseeko3_LDADD) $(LIBS) test-fseeko4$(EXEEXT): $(test_fseeko4_OBJECTS) $(test_fseeko4_DEPENDENCIES) $(EXTRA_test_fseeko4_DEPENDENCIES) @rm -f test-fseeko4$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseeko4_OBJECTS) $(test_fseeko4_LDADD) $(LIBS) test-fseterr$(EXEEXT): $(test_fseterr_OBJECTS) $(test_fseterr_DEPENDENCIES) $(EXTRA_test_fseterr_DEPENDENCIES) @rm -f test-fseterr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseterr_OBJECTS) $(test_fseterr_LDADD) $(LIBS) test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES) @rm -f test-fstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS) test-fstatat$(EXEEXT): $(test_fstatat_OBJECTS) $(test_fstatat_DEPENDENCIES) $(EXTRA_test_fstatat_DEPENDENCIES) @rm -f test-fstatat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fstatat_OBJECTS) $(test_fstatat_LDADD) $(LIBS) test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) $(EXTRA_test_ftell_DEPENDENCIES) @rm -f test-ftell$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS) test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) $(EXTRA_test_ftell3_DEPENDENCIES) @rm -f test-ftell3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftell3_OBJECTS) $(test_ftell3_LDADD) $(LIBS) test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) $(EXTRA_test_ftello_DEPENDENCIES) @rm -f test-ftello$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS) test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) $(EXTRA_test_ftello3_DEPENDENCIES) @rm -f test-ftello3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftello3_OBJECTS) $(test_ftello3_LDADD) $(LIBS) test-ftello4$(EXEEXT): $(test_ftello4_OBJECTS) $(test_ftello4_DEPENDENCIES) $(EXTRA_test_ftello4_DEPENDENCIES) @rm -f test-ftello4$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftello4_OBJECTS) $(test_ftello4_LDADD) $(LIBS) test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA_test_fwrite_DEPENDENCIES) @rm -f test-fwrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS) test-getcwd$(EXEEXT): $(test_getcwd_OBJECTS) $(test_getcwd_DEPENDENCIES) $(EXTRA_test_getcwd_DEPENDENCIES) @rm -f test-getcwd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getcwd_OBJECTS) $(test_getcwd_LDADD) $(LIBS) test-getcwd-lgpl$(EXEEXT): $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_DEPENDENCIES) $(EXTRA_test_getcwd_lgpl_DEPENDENCIES) @rm -f test-getcwd-lgpl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_LDADD) $(LIBS) test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) $(EXTRA_test_getdelim_DEPENDENCIES) @rm -f test-getdelim$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS) test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) $(EXTRA_test_getdtablesize_DEPENDENCIES) @rm -f test-getdtablesize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS) test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) $(EXTRA_test_getopt_DEPENDENCIES) @rm -f test-getopt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS) test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) $(EXTRA_test_hash_DEPENDENCIES) @rm -f test-hash$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_hash_OBJECTS) $(test_hash_LDADD) $(LIBS) test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) $(EXTRA_test_ignore_value_DEPENDENCIES) @rm -f test-ignore-value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS) test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES) @rm -f test-intprops$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS) test-inttostr$(EXEEXT): $(test_inttostr_OBJECTS) $(test_inttostr_DEPENDENCIES) $(EXTRA_test_inttostr_DEPENDENCIES) @rm -f test-inttostr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_inttostr_OBJECTS) $(test_inttostr_LDADD) $(LIBS) test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $(EXTRA_test_inttypes_DEPENDENCIES) @rm -f test-inttypes$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS) test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES) $(EXTRA_test_isnand_nolibm_DEPENDENCIES) @rm -f test-isnand-nolibm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_LDADD) $(LIBS) test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES) $(EXTRA_test_isnanf_nolibm_DEPENDENCIES) @rm -f test-isnanf-nolibm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_LDADD) $(LIBS) test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES) $(EXTRA_test_isnanl_nolibm_DEPENDENCIES) @rm -f test-isnanl-nolibm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_LDADD) $(LIBS) test-iswblank$(EXEEXT): $(test_iswblank_OBJECTS) $(test_iswblank_DEPENDENCIES) $(EXTRA_test_iswblank_DEPENDENCIES) @rm -f test-iswblank$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_iswblank_OBJECTS) $(test_iswblank_LDADD) $(LIBS) test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $(EXTRA_test_langinfo_DEPENDENCIES) @rm -f test-langinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS) test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES) @rm -f test-locale$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS) test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) $(EXTRA_test_localename_DEPENDENCIES) @rm -f test-localename$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_localename_OBJECTS) $(test_localename_LDADD) $(LIBS) test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) $(EXTRA_test_lock_DEPENDENCIES) @rm -f test-lock$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_lock_OBJECTS) $(test_lock_LDADD) $(LIBS) test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) $(EXTRA_test_lseek_DEPENDENCIES) @rm -f test-lseek$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS) test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) $(EXTRA_test_lstat_DEPENDENCIES) @rm -f test-lstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS) test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) $(EXTRA_test_malloc_gnu_DEPENDENCIES) @rm -f test-malloc-gnu$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS) test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES) @rm -f test-malloca$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS) test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) $(EXTRA_test_math_DEPENDENCIES) @rm -f test-math$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS) test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) $(EXTRA_test_mbrtowc_DEPENDENCIES) @rm -f test-mbrtowc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS) test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) $(EXTRA_test_mbrtowc_w32_DEPENDENCIES) @rm -f test-mbrtowc-w32$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_LDADD) $(LIBS) test-mbscasecmp$(EXEEXT): $(test_mbscasecmp_OBJECTS) $(test_mbscasecmp_DEPENDENCIES) $(EXTRA_test_mbscasecmp_DEPENDENCIES) @rm -f test-mbscasecmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_mbscasecmp_OBJECTS) $(test_mbscasecmp_LDADD) $(LIBS) test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) $(EXTRA_test_mbsinit_DEPENDENCIES) @rm -f test-mbsinit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS) test-mbsrtowcs$(EXEEXT): $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_DEPENDENCIES) $(EXTRA_test_mbsrtowcs_DEPENDENCIES) @rm -f test-mbsrtowcs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_LDADD) $(LIBS) test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) $(EXTRA_test_memchr_DEPENDENCIES) @rm -f test-memchr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS) test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) $(EXTRA_test_memrchr_DEPENDENCIES) @rm -f test-memrchr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS) test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES) @rm -f test-nl_langinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS) test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) $(EXTRA_test_open_DEPENDENCIES) @rm -f test-open$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS) test-openat$(EXEEXT): $(test_openat_OBJECTS) $(test_openat_DEPENDENCIES) $(EXTRA_test_openat_DEPENDENCIES) @rm -f test-openat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_openat_OBJECTS) $(test_openat_LDADD) $(LIBS) test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EXTRA_test_pathmax_DEPENDENCIES) @rm -f test-pathmax$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS) test-printf-frexp$(EXEEXT): $(test_printf_frexp_OBJECTS) $(test_printf_frexp_DEPENDENCIES) $(EXTRA_test_printf_frexp_DEPENDENCIES) @rm -f test-printf-frexp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_printf_frexp_OBJECTS) $(test_printf_frexp_LDADD) $(LIBS) test-printf-frexpl$(EXEEXT): $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_DEPENDENCIES) $(EXTRA_test_printf_frexpl_DEPENDENCIES) @rm -f test-printf-frexpl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_LDADD) $(LIBS) test-printf-posix$(EXEEXT): $(test_printf_posix_OBJECTS) $(test_printf_posix_DEPENDENCIES) $(EXTRA_test_printf_posix_DEPENDENCIES) @rm -f test-printf-posix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_printf_posix_OBJECTS) $(test_printf_posix_LDADD) $(LIBS) test-printf-posix2$(EXEEXT): $(test_printf_posix2_OBJECTS) $(test_printf_posix2_DEPENDENCIES) $(EXTRA_test_printf_posix2_DEPENDENCIES) @rm -f test-printf-posix2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_printf_posix2_OBJECTS) $(test_printf_posix2_LDADD) $(LIBS) test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) $(EXTRA_test_quotearg_simple_DEPENDENCIES) @rm -f test-quotearg-simple$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS) test-realloc-gnu$(EXEEXT): $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_DEPENDENCIES) $(EXTRA_test_realloc_gnu_DEPENDENCIES) @rm -f test-realloc-gnu$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_LDADD) $(LIBS) test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES) @rm -f test-setenv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS) test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) $(EXTRA_test_setlocale1_DEPENDENCIES) @rm -f test-setlocale1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS) test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) $(EXTRA_test_setlocale2_DEPENDENCIES) @rm -f test-setlocale2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS) test-signbit$(EXEEXT): $(test_signbit_OBJECTS) $(test_signbit_DEPENDENCIES) $(EXTRA_test_signbit_DEPENDENCIES) @rm -f test-signbit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_signbit_OBJECTS) $(test_signbit_LDADD) $(LIBS) test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) $(EXTRA_test_snprintf_DEPENDENCIES) @rm -f test-snprintf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS) test-sprintf-posix$(EXEEXT): $(test_sprintf_posix_OBJECTS) $(test_sprintf_posix_DEPENDENCIES) $(EXTRA_test_sprintf_posix_DEPENDENCIES) @rm -f test-sprintf-posix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sprintf_posix_OBJECTS) $(test_sprintf_posix_LDADD) $(LIBS) test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) $(EXTRA_test_stat_DEPENDENCIES) @rm -f test-stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS) test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES) @rm -f test-stdbool$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS) test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) $(EXTRA_test_stddef_DEPENDENCIES) @rm -f test-stddef$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS) test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) $(EXTRA_test_stdint_DEPENDENCIES) @rm -f test-stdint$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS) test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) $(EXTRA_test_stdio_DEPENDENCIES) @rm -f test-stdio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS) test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) $(EXTRA_test_stdlib_DEPENDENCIES) @rm -f test-stdlib$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) test-strcasestr$(EXEEXT): $(test_strcasestr_OBJECTS) $(test_strcasestr_DEPENDENCIES) $(EXTRA_test_strcasestr_DEPENDENCIES) @rm -f test-strcasestr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_strcasestr_OBJECTS) $(test_strcasestr_LDADD) $(LIBS) test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) $(EXTRA_test_strerror_DEPENDENCIES) @rm -f test-strerror$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS) test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) $(EXTRA_test_string_DEPENDENCIES) @rm -f test-string$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS) test-strings$(EXEEXT): $(test_strings_OBJECTS) $(test_strings_DEPENDENCIES) $(EXTRA_test_strings_DEPENDENCIES) @rm -f test-strings$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_strings_OBJECTS) $(test_strings_LDADD) $(LIBS) test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) $(EXTRA_test_strnlen_DEPENDENCIES) @rm -f test-strnlen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_strnlen_OBJECTS) $(test_strnlen_LDADD) $(LIBS) test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES) @rm -f test-symlink$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS) test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES) $(EXTRA_test_sys_ioctl_DEPENDENCIES) @rm -f test-sys_ioctl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS) test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES) @rm -f test-sys_stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES) @rm -f test-sys_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_LDADD) $(LIBS) test-thread_create$(EXEEXT): $(test_thread_create_OBJECTS) $(test_thread_create_DEPENDENCIES) $(EXTRA_test_thread_create_DEPENDENCIES) @rm -f test-thread_create$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_thread_create_OBJECTS) $(test_thread_create_LDADD) $(LIBS) test-thread_self$(EXEEXT): $(test_thread_self_OBJECTS) $(test_thread_self_DEPENDENCIES) $(EXTRA_test_thread_self_DEPENDENCIES) @rm -f test-thread_self$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_thread_self_OBJECTS) $(test_thread_self_LDADD) $(LIBS) test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES) @rm -f test-time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) uniwidth/$(am__dirstamp): @$(MKDIR_P) uniwidth @: > uniwidth/$(am__dirstamp) uniwidth/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) uniwidth/$(DEPDIR) @: > uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/test-uc_width.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) test-uc_width$(EXEEXT): $(test_uc_width_OBJECTS) $(test_uc_width_DEPENDENCIES) $(EXTRA_test_uc_width_DEPENDENCIES) @rm -f test-uc_width$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_uc_width_OBJECTS) $(test_uc_width_LDADD) $(LIBS) uniwidth/test-uc_width2.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) test-uc_width2$(EXEEXT): $(test_uc_width2_OBJECTS) $(test_uc_width2_DEPENDENCIES) $(EXTRA_test_uc_width2_DEPENDENCIES) @rm -f test-uc_width2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_uc_width2_OBJECTS) $(test_uc_width2_LDADD) $(LIBS) test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) $(EXTRA_test_unistd_DEPENDENCIES) @rm -f test-unistd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS) test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) $(EXTRA_test_unsetenv_DEPENDENCIES) @rm -f test-unsetenv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS) test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) $(EXTRA_test_vasnprintf_DEPENDENCIES) @rm -f test-vasnprintf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS) test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) $(EXTRA_test_verify_DEPENDENCIES) @rm -f test-verify$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_verify_OBJECTS) $(test_verify_LDADD) $(LIBS) test-vfprintf-posix$(EXEEXT): $(test_vfprintf_posix_OBJECTS) $(test_vfprintf_posix_DEPENDENCIES) $(EXTRA_test_vfprintf_posix_DEPENDENCIES) @rm -f test-vfprintf-posix$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_vfprintf_posix_OBJECTS) $(test_vfprintf_posix_LDADD) $(LIBS) test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) $(EXTRA_test_wchar_DEPENDENCIES) @rm -f test-wchar$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS) test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) $(EXTRA_test_wcrtomb_DEPENDENCIES) @rm -f test-wcrtomb$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS) test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) $(EXTRA_test_wcrtomb_w32_DEPENDENCIES) @rm -f test-wcrtomb-w32$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_LDADD) $(LIBS) test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) $(EXTRA_test_wctype_h_DEPENDENCIES) @rm -f test-wctype-h$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS) test-wcwidth$(EXEEXT): $(test_wcwidth_OBJECTS) $(test_wcwidth_DEPENDENCIES) $(EXTRA_test_wcwidth_DEPENDENCIES) @rm -f test-wcwidth$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wcwidth_OBJECTS) $(test_wcwidth_LDADD) $(LIBS) test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) $(EXTRA_test_xalloc_die_DEPENDENCIES) @rm -f test-xalloc-die$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f glthread/lock.$(OBJEXT) -rm -f glthread/thread.$(OBJEXT) -rm -f glthread/threadlib.$(OBJEXT) -rm -f uniwidth/test-uc_width.$(OBJEXT) -rm -f uniwidth/test-uc_width2.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-rusage-as.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argv-iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-calloc-gnu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exclude.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fgetc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-float.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fprintf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fprintf-posix2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fprintf-posix3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseterr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstatat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnand-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc-w32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsrtowcs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pathmax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-posix2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-realloc-gnu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signbit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sprintf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_self.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vfprintf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb-w32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vma-iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted `.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run `foo.test', and re-create # both `foo.log' and `foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Helper recipe used by $(TEST_SUITE_LOG) below, to avoid problems with # "make -n". Break this recipe in multiple shell invocations too, to # really work as expected with "make -n". am--redo-logs: @rm -f $$redo_logs @rm -f $$redo_results @if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; @st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs"; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log"; st=1; }; \ done; \ test $$st -eq 0 $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ redo_bases="$$redo_bases" \ redo_logs="$$redo_logs" \ redo_results="$$redo_results" \ $(MAKE) $(AM_MAKEFLAGS) am--redo-logs || exit 1; \ else :; fi; @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for i in $$bases; do \ if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ >/dev/null; then continue; \ fi; \ glob_res=`sed -n -e "s/$$ws*$$//" \ -e "s/^$$ws*:global-test-result:$$ws*//p" \ $$i.trs`; \ test -n "$$glob_res" || glob_res=RUN; \ echo "$$glob_res: $$i" | $(am__rst_section); \ if test ! -r $$i.log; then \ echo "fatal: making $@: $$i.log is unreadable" >&2; \ exit 1; \ fi; \ cat $$i.log; echo; \ done; \ } >$(TEST_SUITE_LOG).tmp; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS recheck: @if test $@ != recheck; then \ list='$(RECHECK_LOGS)'; \ test -z "$$list" || rm -f $$list; \ fi @if test $@ != recheck; then \ list='$(RECHECK_LOGS:.log=.trs)'; \ test -z "$$list" || rm -f $$list; \ fi @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @ws='[ ]'; \ list=''; $(am__set_TESTS_bases); \ for i in $$bases; do \ if test $@ = recheck; then \ test -f $$i.trs || test -f $$i.log || continue; \ grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \ >/dev/null 2>&1 && continue; \ else :; fi; \ if test -z "$$list"; then list=$$i.log; else list="$$list $$i.log"; fi; \ done; \ if test $@ = recheck && test -n "$$list"; then \ { \ echo 'am--clean: am--clean-log am--clean-trs'; \ echo 'am--clean-log: ; rm -f $$(am__logs)'; \ echo 'am--clean-trs: ; rm -f $$(am__logs:.log=.trs)'; \ } | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean am__logs="$$list" \ || exit 1; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" recheck: $(check_LIBRARIES) $(check_PROGRAMS) test-alloca-opt.log: test-alloca-opt$(EXEEXT) @p='test-alloca-opt$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-alloca-opt.log' --trs-file 'test-alloca-opt.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-argmatch.log: test-argmatch$(EXEEXT) @p='test-argmatch$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-argmatch.log' --trs-file 'test-argmatch.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-argv-iter.log: test-argv-iter$(EXEEXT) @p='test-argv-iter$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-argv-iter.log' --trs-file 'test-argv-iter.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-binary-io.sh.log: test-binary-io.sh @p='test-binary-io.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-binary-io.sh.log' --trs-file 'test-binary-io.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-bitrotate.log: test-bitrotate$(EXEEXT) @p='test-bitrotate$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-bitrotate.log' --trs-file 'test-bitrotate.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-btowc1.sh.log: test-btowc1.sh @p='test-btowc1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-btowc1.sh.log' --trs-file 'test-btowc1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-btowc2.sh.log: test-btowc2.sh @p='test-btowc2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-btowc2.sh.log' --trs-file 'test-btowc2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-c-ctype.log: test-c-ctype$(EXEEXT) @p='test-c-ctype$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-c-ctype.log' --trs-file 'test-c-ctype.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-c-strcase.sh.log: test-c-strcase.sh @p='test-c-strcase.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-c-strcase.sh.log' --trs-file 'test-c-strcase.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-calloc-gnu.log: test-calloc-gnu$(EXEEXT) @p='test-calloc-gnu$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-calloc-gnu.log' --trs-file 'test-calloc-gnu.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-chdir.log: test-chdir$(EXEEXT) @p='test-chdir$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-chdir.log' --trs-file 'test-chdir.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-cloexec.log: test-cloexec$(EXEEXT) @p='test-cloexec$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-cloexec.log' --trs-file 'test-cloexec.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-close.log: test-close$(EXEEXT) @p='test-close$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-close.log' --trs-file 'test-close.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-dirent.log: test-dirent$(EXEEXT) @p='test-dirent$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-dirent.log' --trs-file 'test-dirent.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-dirname.log: test-dirname$(EXEEXT) @p='test-dirname$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-dirname.log' --trs-file 'test-dirname.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-dup.log: test-dup$(EXEEXT) @p='test-dup$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-dup.log' --trs-file 'test-dup.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-dup2.log: test-dup2$(EXEEXT) @p='test-dup2$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-dup2.log' --trs-file 'test-dup2.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-environ.log: test-environ$(EXEEXT) @p='test-environ$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-environ.log' --trs-file 'test-environ.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-errno.log: test-errno$(EXEEXT) @p='test-errno$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-errno.log' --trs-file 'test-errno.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude1.sh.log: test-exclude1.sh @p='test-exclude1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude1.sh.log' --trs-file 'test-exclude1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude2.sh.log: test-exclude2.sh @p='test-exclude2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude2.sh.log' --trs-file 'test-exclude2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude3.sh.log: test-exclude3.sh @p='test-exclude3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude3.sh.log' --trs-file 'test-exclude3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude4.sh.log: test-exclude4.sh @p='test-exclude4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude4.sh.log' --trs-file 'test-exclude4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude5.sh.log: test-exclude5.sh @p='test-exclude5.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude5.sh.log' --trs-file 'test-exclude5.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude6.sh.log: test-exclude6.sh @p='test-exclude6.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude6.sh.log' --trs-file 'test-exclude6.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude7.sh.log: test-exclude7.sh @p='test-exclude7.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude7.sh.log' --trs-file 'test-exclude7.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-exclude8.sh.log: test-exclude8.sh @p='test-exclude8.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-exclude8.sh.log' --trs-file 'test-exclude8.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fchdir.log: test-fchdir$(EXEEXT) @p='test-fchdir$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fchdir.log' --trs-file 'test-fchdir.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fcntl-h.log: test-fcntl-h$(EXEEXT) @p='test-fcntl-h$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fcntl-h.log' --trs-file 'test-fcntl-h.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fcntl.log: test-fcntl$(EXEEXT) @p='test-fcntl$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fcntl.log' --trs-file 'test-fcntl.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fdopen.log: test-fdopen$(EXEEXT) @p='test-fdopen$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fdopen.log' --trs-file 'test-fdopen.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fdopendir.log: test-fdopendir$(EXEEXT) @p='test-fdopendir$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fdopendir.log' --trs-file 'test-fdopendir.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fflush.log: test-fflush$(EXEEXT) @p='test-fflush$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fflush.log' --trs-file 'test-fflush.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fflush2.sh.log: test-fflush2.sh @p='test-fflush2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fflush2.sh.log' --trs-file 'test-fflush2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fgetc.log: test-fgetc$(EXEEXT) @p='test-fgetc$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fgetc.log' --trs-file 'test-fgetc.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-float.log: test-float$(EXEEXT) @p='test-float$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-float.log' --trs-file 'test-float.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fnmatch.log: test-fnmatch$(EXEEXT) @p='test-fnmatch$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fnmatch.log' --trs-file 'test-fnmatch.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fopen.log: test-fopen$(EXEEXT) @p='test-fopen$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fopen.log' --trs-file 'test-fopen.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fpending.sh.log: test-fpending.sh @p='test-fpending.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fpending.sh.log' --trs-file 'test-fpending.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fprintf-posix.sh.log: test-fprintf-posix.sh @p='test-fprintf-posix.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fprintf-posix.sh.log' --trs-file 'test-fprintf-posix.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fprintf-posix2.sh.log: test-fprintf-posix2.sh @p='test-fprintf-posix2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fprintf-posix2.sh.log' --trs-file 'test-fprintf-posix2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fprintf-posix3.sh.log: test-fprintf-posix3.sh @p='test-fprintf-posix3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fprintf-posix3.sh.log' --trs-file 'test-fprintf-posix3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fpurge.log: test-fpurge$(EXEEXT) @p='test-fpurge$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fpurge.log' --trs-file 'test-fpurge.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fputc.log: test-fputc$(EXEEXT) @p='test-fputc$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fputc.log' --trs-file 'test-fputc.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fread.log: test-fread$(EXEEXT) @p='test-fread$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fread.log' --trs-file 'test-fread.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-freading.log: test-freading$(EXEEXT) @p='test-freading$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-freading.log' --trs-file 'test-freading.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-freopen.log: test-freopen$(EXEEXT) @p='test-freopen$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-freopen.log' --trs-file 'test-freopen.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-frexp-nolibm.log: test-frexp-nolibm$(EXEEXT) @p='test-frexp-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-frexp-nolibm.log' --trs-file 'test-frexp-nolibm.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-frexpl-nolibm.log: test-frexpl-nolibm$(EXEEXT) @p='test-frexpl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-frexpl-nolibm.log' --trs-file 'test-frexpl-nolibm.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseek.sh.log: test-fseek.sh @p='test-fseek.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseek.sh.log' --trs-file 'test-fseek.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseek2.sh.log: test-fseek2.sh @p='test-fseek2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseek2.sh.log' --trs-file 'test-fseek2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseeko.sh.log: test-fseeko.sh @p='test-fseeko.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseeko.sh.log' --trs-file 'test-fseeko.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseeko2.sh.log: test-fseeko2.sh @p='test-fseeko2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseeko2.sh.log' --trs-file 'test-fseeko2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseeko3.sh.log: test-fseeko3.sh @p='test-fseeko3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseeko3.sh.log' --trs-file 'test-fseeko3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseeko4.sh.log: test-fseeko4.sh @p='test-fseeko4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseeko4.sh.log' --trs-file 'test-fseeko4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fseterr.log: test-fseterr$(EXEEXT) @p='test-fseterr$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fseterr.log' --trs-file 'test-fseterr.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fstat.log: test-fstat$(EXEEXT) @p='test-fstat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fstat.log' --trs-file 'test-fstat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fstatat.log: test-fstatat$(EXEEXT) @p='test-fstatat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fstatat.log' --trs-file 'test-fstatat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftell.sh.log: test-ftell.sh @p='test-ftell.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftell.sh.log' --trs-file 'test-ftell.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftell2.sh.log: test-ftell2.sh @p='test-ftell2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftell2.sh.log' --trs-file 'test-ftell2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftell3.log: test-ftell3$(EXEEXT) @p='test-ftell3$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftell3.log' --trs-file 'test-ftell3.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftello.sh.log: test-ftello.sh @p='test-ftello.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftello.sh.log' --trs-file 'test-ftello.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftello2.sh.log: test-ftello2.sh @p='test-ftello2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftello2.sh.log' --trs-file 'test-ftello2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftello3.log: test-ftello3$(EXEEXT) @p='test-ftello3$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftello3.log' --trs-file 'test-ftello3.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ftello4.sh.log: test-ftello4.sh @p='test-ftello4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ftello4.sh.log' --trs-file 'test-ftello4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-fwrite.log: test-fwrite$(EXEEXT) @p='test-fwrite$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-fwrite.log' --trs-file 'test-fwrite.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-getcwd-lgpl.log: test-getcwd-lgpl$(EXEEXT) @p='test-getcwd-lgpl$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-getcwd-lgpl.log' --trs-file 'test-getcwd-lgpl.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-getcwd.sh.log: test-getcwd.sh @p='test-getcwd.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-getcwd.sh.log' --trs-file 'test-getcwd.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-getdelim.log: test-getdelim$(EXEEXT) @p='test-getdelim$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-getdelim.log' --trs-file 'test-getdelim.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-getdtablesize.log: test-getdtablesize$(EXEEXT) @p='test-getdtablesize$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-getdtablesize.log' --trs-file 'test-getdtablesize.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-getopt.log: test-getopt$(EXEEXT) @p='test-getopt$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-getopt.log' --trs-file 'test-getopt.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-hash.log: test-hash$(EXEEXT) @p='test-hash$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-hash.log' --trs-file 'test-hash.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-ignore-value.log: test-ignore-value$(EXEEXT) @p='test-ignore-value$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-ignore-value.log' --trs-file 'test-ignore-value.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-intprops.log: test-intprops$(EXEEXT) @p='test-intprops$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-intprops.log' --trs-file 'test-intprops.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-inttostr.log: test-inttostr$(EXEEXT) @p='test-inttostr$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-inttostr.log' --trs-file 'test-inttostr.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-inttypes.log: test-inttypes$(EXEEXT) @p='test-inttypes$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-inttypes.log' --trs-file 'test-inttypes.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-isnand-nolibm.log: test-isnand-nolibm$(EXEEXT) @p='test-isnand-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-isnand-nolibm.log' --trs-file 'test-isnand-nolibm.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-isnanf-nolibm.log: test-isnanf-nolibm$(EXEEXT) @p='test-isnanf-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-isnanf-nolibm.log' --trs-file 'test-isnanf-nolibm.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-isnanl-nolibm.log: test-isnanl-nolibm$(EXEEXT) @p='test-isnanl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-isnanl-nolibm.log' --trs-file 'test-isnanl-nolibm.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-iswblank.log: test-iswblank$(EXEEXT) @p='test-iswblank$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-iswblank.log' --trs-file 'test-iswblank.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-langinfo.log: test-langinfo$(EXEEXT) @p='test-langinfo$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-langinfo.log' --trs-file 'test-langinfo.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-locale.log: test-locale$(EXEEXT) @p='test-locale$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-locale.log' --trs-file 'test-locale.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-localename.log: test-localename$(EXEEXT) @p='test-localename$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-localename.log' --trs-file 'test-localename.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-lock.log: test-lock$(EXEEXT) @p='test-lock$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-lock.log' --trs-file 'test-lock.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-lseek.sh.log: test-lseek.sh @p='test-lseek.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-lseek.sh.log' --trs-file 'test-lseek.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-lstat.log: test-lstat$(EXEEXT) @p='test-lstat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-lstat.log' --trs-file 'test-lstat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-malloc-gnu.log: test-malloc-gnu$(EXEEXT) @p='test-malloc-gnu$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-malloc-gnu.log' --trs-file 'test-malloc-gnu.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-malloca.log: test-malloca$(EXEEXT) @p='test-malloca$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-malloca.log' --trs-file 'test-malloca.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-math.log: test-math$(EXEEXT) @p='test-math$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-math.log' --trs-file 'test-math.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc1.sh.log: test-mbrtowc1.sh @p='test-mbrtowc1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc1.sh.log' --trs-file 'test-mbrtowc1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc2.sh.log: test-mbrtowc2.sh @p='test-mbrtowc2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc2.sh.log' --trs-file 'test-mbrtowc2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc3.sh.log: test-mbrtowc3.sh @p='test-mbrtowc3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc3.sh.log' --trs-file 'test-mbrtowc3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc4.sh.log: test-mbrtowc4.sh @p='test-mbrtowc4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc4.sh.log' --trs-file 'test-mbrtowc4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh @p='test-mbrtowc-w32-1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc-w32-1.sh.log' --trs-file 'test-mbrtowc-w32-1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-2.sh.log: test-mbrtowc-w32-2.sh @p='test-mbrtowc-w32-2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc-w32-2.sh.log' --trs-file 'test-mbrtowc-w32-2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-3.sh.log: test-mbrtowc-w32-3.sh @p='test-mbrtowc-w32-3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc-w32-3.sh.log' --trs-file 'test-mbrtowc-w32-3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-4.sh.log: test-mbrtowc-w32-4.sh @p='test-mbrtowc-w32-4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc-w32-4.sh.log' --trs-file 'test-mbrtowc-w32-4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-5.sh.log: test-mbrtowc-w32-5.sh @p='test-mbrtowc-w32-5.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbrtowc-w32-5.sh.log' --trs-file 'test-mbrtowc-w32-5.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbscasecmp.sh.log: test-mbscasecmp.sh @p='test-mbscasecmp.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbscasecmp.sh.log' --trs-file 'test-mbscasecmp.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsinit.sh.log: test-mbsinit.sh @p='test-mbsinit.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbsinit.sh.log' --trs-file 'test-mbsinit.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs1.sh.log: test-mbsrtowcs1.sh @p='test-mbsrtowcs1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbsrtowcs1.sh.log' --trs-file 'test-mbsrtowcs1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs2.sh.log: test-mbsrtowcs2.sh @p='test-mbsrtowcs2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbsrtowcs2.sh.log' --trs-file 'test-mbsrtowcs2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs3.sh.log: test-mbsrtowcs3.sh @p='test-mbsrtowcs3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbsrtowcs3.sh.log' --trs-file 'test-mbsrtowcs3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs4.sh.log: test-mbsrtowcs4.sh @p='test-mbsrtowcs4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-mbsrtowcs4.sh.log' --trs-file 'test-mbsrtowcs4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-memchr.log: test-memchr$(EXEEXT) @p='test-memchr$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-memchr.log' --trs-file 'test-memchr.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-memrchr.log: test-memrchr$(EXEEXT) @p='test-memrchr$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-memrchr.log' --trs-file 'test-memrchr.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-nl_langinfo.sh.log: test-nl_langinfo.sh @p='test-nl_langinfo.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-nl_langinfo.sh.log' --trs-file 'test-nl_langinfo.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-open.log: test-open$(EXEEXT) @p='test-open$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-open.log' --trs-file 'test-open.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-openat.log: test-openat$(EXEEXT) @p='test-openat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-openat.log' --trs-file 'test-openat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-pathmax.log: test-pathmax$(EXEEXT) @p='test-pathmax$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-pathmax.log' --trs-file 'test-pathmax.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-printf-frexp.log: test-printf-frexp$(EXEEXT) @p='test-printf-frexp$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-printf-frexp.log' --trs-file 'test-printf-frexp.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-printf-frexpl.log: test-printf-frexpl$(EXEEXT) @p='test-printf-frexpl$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-printf-frexpl.log' --trs-file 'test-printf-frexpl.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-printf-posix.sh.log: test-printf-posix.sh @p='test-printf-posix.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-printf-posix.sh.log' --trs-file 'test-printf-posix.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-printf-posix2.sh.log: test-printf-posix2.sh @p='test-printf-posix2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-printf-posix2.sh.log' --trs-file 'test-printf-posix2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-quotearg-simple.log: test-quotearg-simple$(EXEEXT) @p='test-quotearg-simple$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-quotearg-simple.log' --trs-file 'test-quotearg-simple.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-realloc-gnu.log: test-realloc-gnu$(EXEEXT) @p='test-realloc-gnu$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-realloc-gnu.log' --trs-file 'test-realloc-gnu.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-setenv.log: test-setenv$(EXEEXT) @p='test-setenv$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-setenv.log' --trs-file 'test-setenv.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-setlocale1.sh.log: test-setlocale1.sh @p='test-setlocale1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-setlocale1.sh.log' --trs-file 'test-setlocale1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-setlocale2.sh.log: test-setlocale2.sh @p='test-setlocale2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-setlocale2.sh.log' --trs-file 'test-setlocale2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-signbit.log: test-signbit$(EXEEXT) @p='test-signbit$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-signbit.log' --trs-file 'test-signbit.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-snprintf.log: test-snprintf$(EXEEXT) @p='test-snprintf$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-snprintf.log' --trs-file 'test-snprintf.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-sprintf-posix.log: test-sprintf-posix$(EXEEXT) @p='test-sprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-sprintf-posix.log' --trs-file 'test-sprintf-posix.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stat.log: test-stat$(EXEEXT) @p='test-stat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stat.log' --trs-file 'test-stat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdbool.log: test-stdbool$(EXEEXT) @p='test-stdbool$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stdbool.log' --trs-file 'test-stdbool.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stddef.log: test-stddef$(EXEEXT) @p='test-stddef$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stddef.log' --trs-file 'test-stddef.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdint.log: test-stdint$(EXEEXT) @p='test-stdint$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stdint.log' --trs-file 'test-stdint.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdio.log: test-stdio$(EXEEXT) @p='test-stdio$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stdio.log' --trs-file 'test-stdio.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdlib.log: test-stdlib$(EXEEXT) @p='test-stdlib$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-stdlib.log' --trs-file 'test-stdlib.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-strcasestr.log: test-strcasestr$(EXEEXT) @p='test-strcasestr$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-strcasestr.log' --trs-file 'test-strcasestr.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-strerror.log: test-strerror$(EXEEXT) @p='test-strerror$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-strerror.log' --trs-file 'test-strerror.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-string.log: test-string$(EXEEXT) @p='test-string$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-string.log' --trs-file 'test-string.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-strings.log: test-strings$(EXEEXT) @p='test-strings$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-strings.log' --trs-file 'test-strings.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-strnlen.log: test-strnlen$(EXEEXT) @p='test-strnlen$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-strnlen.log' --trs-file 'test-strnlen.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-symlink.log: test-symlink$(EXEEXT) @p='test-symlink$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-symlink.log' --trs-file 'test-symlink.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_ioctl.log: test-sys_ioctl$(EXEEXT) @p='test-sys_ioctl$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-sys_ioctl.log' --trs-file 'test-sys_ioctl.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_stat.log: test-sys_stat$(EXEEXT) @p='test-sys_stat$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-sys_stat.log' --trs-file 'test-sys_stat.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_types.log: test-sys_types$(EXEEXT) @p='test-sys_types$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-sys_types.log' --trs-file 'test-sys_types.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-init.sh.log: test-init.sh @p='test-init.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-init.sh.log' --trs-file 'test-init.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-thread_self.log: test-thread_self$(EXEEXT) @p='test-thread_self$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-thread_self.log' --trs-file 'test-thread_self.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-thread_create.log: test-thread_create$(EXEEXT) @p='test-thread_create$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-thread_create.log' --trs-file 'test-thread_create.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-time.log: test-time$(EXEEXT) @p='test-time$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-time.log' --trs-file 'test-time.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-dup-safer.log: test-dup-safer$(EXEEXT) @p='test-dup-safer$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-dup-safer.log' --trs-file 'test-dup-safer.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-unistd.log: test-unistd$(EXEEXT) @p='test-unistd$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-unistd.log' --trs-file 'test-unistd.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-uc_width.log: test-uc_width$(EXEEXT) @p='test-uc_width$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-uc_width.log' --trs-file 'test-uc_width.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) uniwidth/test-uc_width2.sh.log: uniwidth/test-uc_width2.sh @p='uniwidth/test-uc_width2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'uniwidth/test-uc_width2.sh.log' --trs-file 'uniwidth/test-uc_width2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-unsetenv.log: test-unsetenv$(EXEEXT) @p='test-unsetenv$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-unsetenv.log' --trs-file 'test-unsetenv.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-update-copyright.sh.log: test-update-copyright.sh @p='test-update-copyright.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-update-copyright.sh.log' --trs-file 'test-update-copyright.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-vasnprintf.log: test-vasnprintf$(EXEEXT) @p='test-vasnprintf$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-vasnprintf.log' --trs-file 'test-vasnprintf.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-vc-list-files-git.sh.log: test-vc-list-files-git.sh @p='test-vc-list-files-git.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-vc-list-files-git.sh.log' --trs-file 'test-vc-list-files-git.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-vc-list-files-cvs.sh.log: test-vc-list-files-cvs.sh @p='test-vc-list-files-cvs.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-vc-list-files-cvs.sh.log' --trs-file 'test-vc-list-files-cvs.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-verify.log: test-verify$(EXEEXT) @p='test-verify$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-verify.log' --trs-file 'test-verify.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-verify.sh.log: test-verify.sh @p='test-verify.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-verify.sh.log' --trs-file 'test-verify.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-vfprintf-posix.sh.log: test-vfprintf-posix.sh @p='test-vfprintf-posix.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-vfprintf-posix.sh.log' --trs-file 'test-vfprintf-posix.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wchar.log: test-wchar$(EXEEXT) @p='test-wchar$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wchar.log' --trs-file 'test-wchar.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb.sh.log: test-wcrtomb.sh @p='test-wcrtomb.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb.sh.log' --trs-file 'test-wcrtomb.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-1.sh.log: test-wcrtomb-w32-1.sh @p='test-wcrtomb-w32-1.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb-w32-1.sh.log' --trs-file 'test-wcrtomb-w32-1.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-2.sh.log: test-wcrtomb-w32-2.sh @p='test-wcrtomb-w32-2.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb-w32-2.sh.log' --trs-file 'test-wcrtomb-w32-2.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-3.sh.log: test-wcrtomb-w32-3.sh @p='test-wcrtomb-w32-3.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb-w32-3.sh.log' --trs-file 'test-wcrtomb-w32-3.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-4.sh.log: test-wcrtomb-w32-4.sh @p='test-wcrtomb-w32-4.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb-w32-4.sh.log' --trs-file 'test-wcrtomb-w32-4.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-5.sh.log: test-wcrtomb-w32-5.sh @p='test-wcrtomb-w32-5.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcrtomb-w32-5.sh.log' --trs-file 'test-wcrtomb-w32-5.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wctype-h.log: test-wctype-h$(EXEEXT) @p='test-wctype-h$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wctype-h.log' --trs-file 'test-wctype-h.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcwidth.log: test-wcwidth$(EXEEXT) @p='test-wcwidth$(EXEEXT)'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-wcwidth.log' --trs-file 'test-wcwidth.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test-xalloc-die.sh.log: test-xalloc-die.sh @p='test-xalloc-die.sh'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'test-xalloc-die.sh.log' --trs-file 'test-xalloc-die.sh.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file '$*.log' --trs-file '$*.trs' \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file '$*.log' --trs-file '$*.trs' \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f glthread/$(DEPDIR)/$(am__dirstamp) -rm -f glthread/$(am__dirstamp) -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp) -rm -f uniwidth/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ check-am cscopelist-recursive ctags-recursive install \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--redo-logs check check-TESTS check-am clean \ clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS \ cscopelist cscopelist-recursive ctags ctags-recursive \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf pdf-am ps ps-am recheck tags \ tags-recursive uninstall uninstall-am # We need the following in order to create <inttypes.h> when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <locale.h> when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/locale.in.h; \ } > $@-t && \ mv $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stdbool.c������������������������������������������������0000664�0000000�0000000�00000006660�12166360012�016617� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <stdbool.h> substitute. Copyright (C) 2002-2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ /* We want this test to succeed even when using gcc's -Werror; but to do that requires a pragma that didn't exist before 4.3.0. */ #ifndef __GNUC__ # define ADDRESS_CHECK_OKAY #elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) /* No way to silence -Waddress. */ #else # pragma GCC diagnostic ignored "-Waddress" # define ADDRESS_CHECK_OKAY #endif #include <config.h> #include <stdbool.h> #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif /* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at least, not for all compilers and compiler options. */ #if HAVE_STDBOOL_H || 3 <= __GNUC__ struct s { _Bool s: 1; _Bool t; } s; #endif char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; #if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ char d[(bool) 0.5 == true ? 1 : -1]; # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */ /* C99 may plausibly be interpreted as not requiring support for a cast from a variable's address to bool in a static initializer. So treat it like a GCC extension. */ # ifdef __GNUC__ bool e = &s; # endif # endif char f[(_Bool) 0.0 == false ? 1 : -1]; #endif char g[true]; char h[sizeof (_Bool)]; #if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ char i[sizeof s.t]; #endif enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { int error = 0; #if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */ /* A cast from a variable's address to bool is valid in expressions. */ { bool e1 = &s; if (!e1) error = 1; } # endif #endif /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This is a runtime test, since a corresponding compile-time test would rely on initializer extensions. */ { char digs[] = "0123456789"; if (&(digs + 5)[-2 + (bool) 1] != &digs[4]) error = 1; } return error; } ��������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-binary-io.sh���������������������������������������������0000775�0000000�0000000�00000000363�12166360012�017227� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" ./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 cmp t-bin-out1.tmp t-bin-out2.tmp > /dev/null || exit 1 rm -fr $tmpfiles exit 0 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-isnanl-nolibm.c������������������������������������������0000664�0000000�0000000�00000001553�12166360012�017707� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of isnanl() substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "isnanl-nolibm.h" #include "test-isnanl.h" �����������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-verify.sh������������������������������������������������0000775�0000000�0000000�00000001305�11433657032�016646� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh . "${srcdir=.}/init.sh" # We are not interested in triggering bugs in the compilers and tools # (such as gcc 4.3.1 on openSUSE 11.0). unset MALLOC_PERTURB_ # Rather than figure out how to invoke the compiler with the right # include path ourselves, we let make do it: (cd "$initial_cwd_" && rm -f test-verify.o \ && $MAKE test-verify.o >/dev/null 2>&1) \ || skip_ "cannot compile error-free" # Now, prove that we encounter all expected compilation failures: : >out : >err for i in 1 2 3 4 5; do (cd "$initial_cwd_" rm -f test-verify.o $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \ && { warn_ "compiler didn't detect verification failure $i"; fail=1; } done Exit $fail ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-chdir.c��������������������������������������������������0000664�0000000�0000000�00000001674�12166360012�016242� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test changing to a directory. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <unistd.h> #include "signature.h" SIGNATURE_CHECK (chdir, int, (const char *)); #include "macros.h" int main (void) { ASSERT (chdir ("/") == 0); return 0; } ��������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32-2.sh�����������������������������������������0000775�0000000�0000000�00000000132�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP1256 locale. ./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-sys_wait.h�����������������������������������������������0000664�0000000�0000000�00000003615�12166360012�017015� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of macros shared between <sys/wait.h> and <stdlib.h>. Copyright (C) 2010-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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2010. */ static int test_sys_wait_macros (void) { /* Check subset of <sys/wait.h> macros that must be visible here. Note that some of these macros are only portable when operating on an lvalue. */ int i; for (i = 0; i < 0x8000; i = (i ? i << 1 : 1)) { /* POSIX requires that for all valid process statuses, that exactly one of these three macros is true. But not all possible 16-bit values map to valid process status. Traditionally, 8 of the bits are for WIFEXITED, 7 of the bits to tell between WIFSIGNALED and WIFSTOPPED, and either 0x80 or 0x8000 to flag that core was also dumped. Since we don't know which byte is WIFEXITED, we skip the both possible bits that can signal core dump. */ if (i == 0x80) continue; if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1) return 1; } i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i); switch (i) { #if 0 /* Gnulib doesn't guarantee these, yet. */ case WNOHANG: case WUNTRACED: #endif break; } return 0; } �������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude4.sh����������������������������������������������0000775�0000000�0000000�00000002340�12166360012�017050� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test wildcard matching cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT foobar: 1 EOT test-exclude -wildcards in -- foobar > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/setenv.c������������������������������������������������������0000664�0000000�0000000�00000025025�12166360012�015474� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1992, 1995-2003, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #if !_LIBC # define _GL_USE_STDLIB_ALLOC 1 # include <config.h> #endif /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ #define _GL_ARG_NONNULL(params) #include <alloca.h> /* Specification. */ #include <stdlib.h> #include <errno.h> #ifndef __set_errno # define __set_errno(ev) ((errno) = (ev)) #endif #include <string.h> #if _LIBC || HAVE_UNISTD_H # include <unistd.h> #endif #if !_LIBC # include "malloca.h" #endif #if _LIBC || !HAVE_SETENV #if !_LIBC # define __environ environ #endif #if _LIBC /* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif /* In the GNU C library we must keep the namespace clean. */ #ifdef _LIBC # define setenv __setenv # define clearenv __clearenv # define tfind __tfind # define tsearch __tsearch #endif /* In the GNU C library implementation we try to be more clever and allow arbitrarily many changes of the environment given that the used values are from a small set. Outside glibc this will eat up all memory after a while. */ #if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ && defined __GNUC__) # define USE_TSEARCH 1 # include <search.h> typedef int (*compar_fn_t) (const void *, const void *); /* This is a pointer to the root of the search tree with the known values. */ static void *known_values; # define KNOWN_VALUE(Str) \ ({ \ void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ value != NULL ? *(char **) value : NULL; \ }) # define STORE_VALUE(Str) \ tsearch (Str, &known_values, (compar_fn_t) strcmp) #else # undef USE_TSEARCH # define KNOWN_VALUE(Str) NULL # define STORE_VALUE(Str) do { } while (0) #endif /* If this variable is not a null pointer we allocated the current environment. */ static char **last_environ; /* This function is used by 'setenv' and 'putenv'. The difference between the two functions is that for the former must create a new string which is then placed in the environment, while the argument of 'putenv' must be used directly. This is all complicated by the fact that we try to reuse values once generated for a 'setenv' call since we can never free the strings. */ int __add_to_environ (const char *name, const char *value, const char *combined, int replace) { char **ep; size_t size; const size_t namelen = strlen (name); const size_t vallen = value != NULL ? strlen (value) + 1 : 0; LOCK; /* We have to get the pointer now that we have the lock and not earlier since another thread might have created a new environment. */ ep = __environ; size = 0; if (ep != NULL) { for (; *ep != NULL; ++ep) if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') break; else ++size; } if (ep == NULL || *ep == NULL) { char **new_environ; #ifdef USE_TSEARCH char *new_value; #endif /* We allocated this space; we can extend it. */ new_environ = (char **) (last_environ == NULL ? malloc ((size + 2) * sizeof (char *)) : realloc (last_environ, (size + 2) * sizeof (char *))); if (new_environ == NULL) { /* It's easier to set errno to ENOMEM than to rely on the 'malloc-posix' and 'realloc-posix' gnulib modules. */ __set_errno (ENOMEM); UNLOCK; return -1; } /* If the whole entry is given add it. */ if (combined != NULL) /* We must not add the string to the search tree since it belongs to the user. */ new_environ[size] = (char *) combined; else { /* See whether the value is already known. */ #ifdef USE_TSEARCH # ifdef _LIBC new_value = (char *) alloca (namelen + 1 + vallen); __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), value, vallen); # else new_value = (char *) malloca (namelen + 1 + vallen); if (new_value == NULL) { __set_errno (ENOMEM); UNLOCK; return -1; } memcpy (new_value, name, namelen); new_value[namelen] = '='; memcpy (&new_value[namelen + 1], value, vallen); # endif new_environ[size] = KNOWN_VALUE (new_value); if (new_environ[size] == NULL) #endif { new_environ[size] = (char *) malloc (namelen + 1 + vallen); if (new_environ[size] == NULL) { #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif __set_errno (ENOMEM); UNLOCK; return -1; } #ifdef USE_TSEARCH memcpy (new_environ[size], new_value, namelen + 1 + vallen); #else memcpy (new_environ[size], name, namelen); new_environ[size][namelen] = '='; memcpy (&new_environ[size][namelen + 1], value, vallen); #endif /* And save the value now. We cannot do this when we remove the string since then we cannot decide whether it is a user string or not. */ STORE_VALUE (new_environ[size]); } #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif } if (__environ != last_environ) memcpy ((char *) new_environ, (char *) __environ, size * sizeof (char *)); new_environ[size + 1] = NULL; last_environ = __environ = new_environ; } else if (replace) { char *np; /* Use the user string if given. */ if (combined != NULL) np = (char *) combined; else { #ifdef USE_TSEARCH char *new_value; # ifdef _LIBC new_value = alloca (namelen + 1 + vallen); __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), value, vallen); # else new_value = malloca (namelen + 1 + vallen); if (new_value == NULL) { __set_errno (ENOMEM); UNLOCK; return -1; } memcpy (new_value, name, namelen); new_value[namelen] = '='; memcpy (&new_value[namelen + 1], value, vallen); # endif np = KNOWN_VALUE (new_value); if (np == NULL) #endif { np = (char *) malloc (namelen + 1 + vallen); if (np == NULL) { #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif __set_errno (ENOMEM); UNLOCK; return -1; } #ifdef USE_TSEARCH memcpy (np, new_value, namelen + 1 + vallen); #else memcpy (np, name, namelen); np[namelen] = '='; memcpy (&np[namelen + 1], value, vallen); #endif /* And remember the value. */ STORE_VALUE (np); } #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif } *ep = np; } UNLOCK; return 0; } int setenv (const char *name, const char *value, int replace) { if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } return __add_to_environ (name, value, NULL, replace); } /* The 'clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ int clearenv (void) { LOCK; if (__environ == last_environ && __environ != NULL) { /* We allocated this environment so we can free it. */ free (__environ); last_environ = NULL; } /* Clear the environment pointer removes the whole environment. */ __environ = NULL; UNLOCK; return 0; } #ifdef _LIBC static void free_mem (void) { /* Remove all traces. */ clearenv (); /* Now remove the search tree. */ __tdestroy (known_values, free); known_values = NULL; } text_set_element (__libc_subfreeres, free_mem); # undef setenv # undef clearenv weak_alias (__setenv, setenv) weak_alias (__clearenv, clearenv) #endif #endif /* _LIBC || !HAVE_SETENV */ /* The rest of this file is called into use when replacing an existing but buggy setenv. Known bugs include failure to diagnose invalid name, and consuming a leading '=' from value. */ #if HAVE_SETENV # undef setenv # if !HAVE_DECL_SETENV extern int setenv (const char *, const char *, int); # endif # define STREQ(a, b) (strcmp (a, b) == 0) int rpl_setenv (const char *name, const char *value, int replace) { int result; if (!name || !*name || strchr (name, '=')) { errno = EINVAL; return -1; } /* Call the real setenv even if replace is 0, in case implementation has underlying data to update, such as when environ changes. */ result = setenv (name, value, replace); if (result == 0 && replace && *value == '=') { char *tmp = getenv (name); if (!STREQ (tmp, value)) { int saved_errno; size_t len = strlen (value); tmp = malloca (len + 2); /* Since leading '=' is eaten, double it up. */ *tmp = '='; memcpy (tmp + 1, value, len + 1); result = setenv (name, tmp, replace); saved_errno = errno; freea (tmp); errno = saved_errno; } } return result; } #endif /* HAVE_SETENV */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/setlocale.c���������������������������������������������������0000664�0000000�0000000�00000070014�12166360012�016141� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Set the current locale. Copyright (C) 2009, 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <config.h> /* Override setlocale() so that when the default locale is requested (locale = ""), the environment variables LC_ALL, LC_*, and LANG are considered. Also include all the functionality from libintl's setlocale() override. */ /* Please keep this file in sync with gettext/gettext-runtime/intl/setlocale.c ! */ /* Specification. */ #include <locale.h> #include <stdlib.h> #include <string.h> #include "localename.h" #if 1 # undef setlocale /* Return string representation of locale category CATEGORY. */ static const char * category_to_name (int category) { const char *retval; switch (category) { case LC_COLLATE: retval = "LC_COLLATE"; break; case LC_CTYPE: retval = "LC_CTYPE"; break; case LC_MONETARY: retval = "LC_MONETARY"; break; case LC_NUMERIC: retval = "LC_NUMERIC"; break; case LC_TIME: retval = "LC_TIME"; break; case LC_MESSAGES: retval = "LC_MESSAGES"; break; default: /* If you have a better idea for a default value let me know. */ retval = "LC_XXX"; } return retval; } # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The native Windows setlocale() function expects locale names of the form "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need to convert the names from the form with ISO 639 language code and ISO 3166 country code to the form with English names or with three-letter identifier. The three-letter identifiers known by a Windows XP SP2 or SP3 are: AFK Afrikaans_South Africa.1252 ARA Arabic_Saudi Arabia.1256 ARB Arabic_Lebanon.1256 ARE Arabic_Egypt.1256 ARG Arabic_Algeria.1256 ARH Arabic_Bahrain.1256 ARI Arabic_Iraq.1256 ARJ Arabic_Jordan.1256 ARK Arabic_Kuwait.1256 ARL Arabic_Libya.1256 ARM Arabic_Morocco.1256 ARO Arabic_Oman.1256 ARQ Arabic_Qatar.1256 ARS Arabic_Syria.1256 ART Arabic_Tunisia.1256 ARU Arabic_U.A.E..1256 ARY Arabic_Yemen.1256 AZE Azeri (Latin)_Azerbaijan.1254 BEL Belarusian_Belarus.1251 BGR Bulgarian_Bulgaria.1251 BSB Bosnian_Bosnia and Herzegovina.1250 BSC Bosnian (Cyrillic)_Bosnia and Herzegovina.1250 (wrong encoding!) CAT Catalan_Spain.1252 CHH Chinese_Hong Kong S.A.R..950 CHI Chinese_Singapore.936 CHS Chinese_People's Republic of China.936 CHT Chinese_Taiwan.950 CSY Czech_Czech Republic.1250 CYM Welsh_United Kingdom.1252 DAN Danish_Denmark.1252 DEA German_Austria.1252 DEC German_Liechtenstein.1252 DEL German_Luxembourg.1252 DES German_Switzerland.1252 DEU German_Germany.1252 ELL Greek_Greece.1253 ENA English_Australia.1252 ENB English_Caribbean.1252 ENC English_Canada.1252 ENG English_United Kingdom.1252 ENI English_Ireland.1252 ENJ English_Jamaica.1252 ENL English_Belize.1252 ENP English_Republic of the Philippines.1252 ENS English_South Africa.1252 ENT English_Trinidad and Tobago.1252 ENU English_United States.1252 ENW English_Zimbabwe.1252 ENZ English_New Zealand.1252 ESA Spanish_Panama.1252 ESB Spanish_Bolivia.1252 ESC Spanish_Costa Rica.1252 ESD Spanish_Dominican Republic.1252 ESE Spanish_El Salvador.1252 ESF Spanish_Ecuador.1252 ESG Spanish_Guatemala.1252 ESH Spanish_Honduras.1252 ESI Spanish_Nicaragua.1252 ESL Spanish_Chile.1252 ESM Spanish_Mexico.1252 ESN Spanish_Spain.1252 ESO Spanish_Colombia.1252 ESP Spanish_Spain.1252 ESR Spanish_Peru.1252 ESS Spanish_Argentina.1252 ESU Spanish_Puerto Rico.1252 ESV Spanish_Venezuela.1252 ESY Spanish_Uruguay.1252 ESZ Spanish_Paraguay.1252 ETI Estonian_Estonia.1257 EUQ Basque_Spain.1252 FAR Farsi_Iran.1256 FIN Finnish_Finland.1252 FOS Faroese_Faroe Islands.1252 FPO Filipino_Philippines.1252 FRA French_France.1252 FRB French_Belgium.1252 FRC French_Canada.1252 FRL French_Luxembourg.1252 FRM French_Principality of Monaco.1252 FRS French_Switzerland.1252 FYN Frisian_Netherlands.1252 GLC Galician_Spain.1252 HEB Hebrew_Israel.1255 HRB Croatian_Bosnia and Herzegovina.1250 HRV Croatian_Croatia.1250 HUN Hungarian_Hungary.1250 IND Indonesian_Indonesia.1252 IRE Irish_Ireland.1252 ISL Icelandic_Iceland.1252 ITA Italian_Italy.1252 ITS Italian_Switzerland.1252 IUK Inuktitut (Latin)_Canada.1252 JPN Japanese_Japan.932 KKZ Kazakh_Kazakhstan.1251 KOR Korean_Korea.949 KYR Kyrgyz_Kyrgyzstan.1251 LBX Luxembourgish_Luxembourg.1252 LTH Lithuanian_Lithuania.1257 LVI Latvian_Latvia.1257 MKI FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251 MON Mongolian_Mongolia.1251 MPD Mapudungun_Chile.1252 MSB Malay_Brunei Darussalam.1252 MSL Malay_Malaysia.1252 MWK Mohawk_Canada.1252 NLB Dutch_Belgium.1252 NLD Dutch_Netherlands.1252 NON Norwegian-Nynorsk_Norway.1252 NOR Norwegian (Bokmål)_Norway.1252 NSO Northern Sotho_South Africa.1252 PLK Polish_Poland.1250 PTB Portuguese_Brazil.1252 PTG Portuguese_Portugal.1252 QUB Quechua_Bolivia.1252 QUE Quechua_Ecuador.1252 QUP Quechua_Peru.1252 RMC Romansh_Switzerland.1252 ROM Romanian_Romania.1250 RUS Russian_Russia.1251 SKY Slovak_Slovakia.1250 SLV Slovenian_Slovenia.1250 SMA Sami (Southern)_Norway.1252 SMB Sami (Southern)_Sweden.1252 SME Sami (Northern)_Norway.1252 SMF Sami (Northern)_Sweden.1252 SMG Sami (Northern)_Finland.1252 SMJ Sami (Lule)_Norway.1252 SMK Sami (Lule)_Sweden.1252 SMN Sami (Inari)_Finland.1252 SMS Sami (Skolt)_Finland.1252 SQI Albanian_Albania.1250 SRB Serbian (Cyrillic)_Serbia and Montenegro.1251 SRL Serbian (Latin)_Serbia and Montenegro.1250 SRN Serbian (Cyrillic)_Bosnia and Herzegovina.1251 SRS Serbian (Latin)_Bosnia and Herzegovina.1250 SVE Swedish_Sweden.1252 SVF Swedish_Finland.1252 SWK Swahili_Kenya.1252 THA Thai_Thailand.874 TRK Turkish_Turkey.1254 TSN Tswana_South Africa.1252 TTT Tatar_Russia.1251 UKR Ukrainian_Ukraine.1251 URD Urdu_Islamic Republic of Pakistan.1256 USA English_United States.1252 UZB Uzbek (Latin)_Uzbekistan.1254 VIT Vietnamese_Viet Nam.1258 XHO Xhosa_South Africa.1252 ZHH Chinese_Hong Kong S.A.R..950 ZHI Chinese_Singapore.936 ZHM Chinese_Macau S.A.R..950 ZUL Zulu_South Africa.1252 */ /* Table from ISO 639 language code, optionally with country or script suffix, to English name. Keep in sync with the gl_locale_name_from_win32_LANGID function in localename.c! */ struct table_entry { const char *code; const char *english; }; static const struct table_entry language_table[] = { { "af", "Afrikaans" }, { "am", "Amharic" }, { "ar", "Arabic" }, { "arn", "Mapudungun" }, { "as", "Assamese" }, { "az@cyrillic", "Azeri (Cyrillic)" }, { "az@latin", "Azeri (Latin)" }, { "ba", "Bashkir" }, { "be", "Belarusian" }, { "ber", "Tamazight" }, { "ber@arabic", "Tamazight (Arabic)" }, { "ber@latin", "Tamazight (Latin)" }, { "bg", "Bulgarian" }, { "bin", "Edo" }, { "bn", "Bengali" }, { "bn_BD", "Bengali (Bangladesh)" }, { "bn_IN", "Bengali (India)" }, { "bnt", "Sutu" }, { "bo", "Tibetan" }, { "br", "Breton" }, { "bs", "BSB" }, /* "Bosnian (Latin)" */ { "bs@cyrillic", "BSC" }, /* Bosnian (Cyrillic) */ { "ca", "Catalan" }, { "chr", "Cherokee" }, { "co", "Corsican" }, { "cpe", "Hawaiian" }, { "cs", "Czech" }, { "cy", "Welsh" }, { "da", "Danish" }, { "de", "German" }, { "dsb", "Lower Sorbian" }, { "dv", "Divehi" }, { "el", "Greek" }, { "en", "English" }, { "es", "Spanish" }, { "et", "Estonian" }, { "eu", "Basque" }, { "fa", "Farsi" }, { "ff", "Fulfulde" }, { "fi", "Finnish" }, { "fo", "Faroese" }, /* "Faeroese" does not work */ { "fr", "French" }, { "fy", "Frisian" }, { "ga", "IRE" }, /* Gaelic (Ireland) */ { "gd", "Gaelic (Scotland)" }, { "gd", "Scottish Gaelic" }, { "gl", "Galician" }, { "gn", "Guarani" }, { "gsw", "Alsatian" }, { "gu", "Gujarati" }, { "ha", "Hausa" }, { "he", "Hebrew" }, { "hi", "Hindi" }, { "hr", "Croatian" }, { "hsb", "Upper Sorbian" }, { "hu", "Hungarian" }, { "hy", "Armenian" }, { "id", "Indonesian" }, { "ig", "Igbo" }, { "ii", "Yi" }, { "is", "Icelandic" }, { "it", "Italian" }, { "iu", "IUK" }, /* Inuktitut */ { "ja", "Japanese" }, { "ka", "Georgian" }, { "kk", "Kazakh" }, { "kl", "Greenlandic" }, { "km", "Cambodian" }, { "km", "Khmer" }, { "kn", "Kannada" }, { "ko", "Korean" }, { "kok", "Konkani" }, { "kr", "Kanuri" }, { "ks", "Kashmiri" }, { "ks_IN", "Kashmiri_India" }, { "ks_PK", "Kashmiri (Arabic)_Pakistan" }, { "ky", "Kyrgyz" }, { "la", "Latin" }, { "lb", "Luxembourgish" }, { "lo", "Lao" }, { "lt", "Lithuanian" }, { "lv", "Latvian" }, { "mi", "Maori" }, { "mk", "FYRO Macedonian" }, { "mk", "Macedonian" }, { "ml", "Malayalam" }, { "mn", "Mongolian" }, { "mni", "Manipuri" }, { "moh", "Mohawk" }, { "mr", "Marathi" }, { "ms", "Malay" }, { "mt", "Maltese" }, { "my", "Burmese" }, { "nb", "NOR" }, /* Norwegian Bokmål */ { "ne", "Nepali" }, { "nic", "Ibibio" }, { "nl", "Dutch" }, { "nn", "NON" }, /* Norwegian Nynorsk */ { "no", "Norwegian" }, { "nso", "Northern Sotho" }, { "nso", "Sepedi" }, { "oc", "Occitan" }, { "om", "Oromo" }, { "or", "Oriya" }, { "pa", "Punjabi" }, { "pap", "Papiamentu" }, { "pl", "Polish" }, { "prs", "Dari" }, { "ps", "Pashto" }, { "pt", "Portuguese" }, { "qu", "Quechua" }, { "qut", "K'iche'" }, { "rm", "Romansh" }, { "ro", "Romanian" }, { "ru", "Russian" }, { "rw", "Kinyarwanda" }, { "sa", "Sanskrit" }, { "sah", "Yakut" }, { "sd", "Sindhi" }, { "se", "Sami (Northern)" }, { "se", "Northern Sami" }, { "si", "Sinhalese" }, { "sk", "Slovak" }, { "sl", "Slovenian" }, { "sma", "Sami (Southern)" }, { "sma", "Southern Sami" }, { "smj", "Sami (Lule)" }, { "smj", "Lule Sami" }, { "smn", "Sami (Inari)" }, { "smn", "Inari Sami" }, { "sms", "Sami (Skolt)" }, { "sms", "Skolt Sami" }, { "so", "Somali" }, { "sq", "Albanian" }, { "sr", "Serbian (Latin)" }, { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */ { "sw", "Swahili" }, { "syr", "Syriac" }, { "ta", "Tamil" }, { "te", "Telugu" }, { "tg", "Tajik" }, { "th", "Thai" }, { "ti", "Tigrinya" }, { "tk", "Turkmen" }, { "tl", "Filipino" }, { "tn", "Tswana" }, { "tr", "Turkish" }, { "ts", "Tsonga" }, { "tt", "Tatar" }, { "ug", "Uighur" }, { "uk", "Ukrainian" }, { "ur", "Urdu" }, { "uz", "Uzbek" }, { "uz", "Uzbek (Latin)" }, { "uz@cyrillic", "Uzbek (Cyrillic)" }, { "ve", "Venda" }, { "vi", "Vietnamese" }, { "wen", "Sorbian" }, { "wo", "Wolof" }, { "xh", "Xhosa" }, { "yi", "Yiddish" }, { "yo", "Yoruba" }, { "zh", "Chinese" }, { "zu", "Zulu" } }; /* Table from ISO 3166 country code to English name. Keep in sync with the gl_locale_name_from_win32_LANGID function in localename.c! */ static const struct table_entry country_table[] = { { "AE", "U.A.E." }, { "AF", "Afghanistan" }, { "AL", "Albania" }, { "AM", "Armenia" }, { "AN", "Netherlands Antilles" }, { "AR", "Argentina" }, { "AT", "Austria" }, { "AU", "Australia" }, { "AZ", "Azerbaijan" }, { "BA", "Bosnia and Herzegovina" }, { "BD", "Bangladesh" }, { "BE", "Belgium" }, { "BG", "Bulgaria" }, { "BH", "Bahrain" }, { "BN", "Brunei Darussalam" }, { "BO", "Bolivia" }, { "BR", "Brazil" }, { "BT", "Bhutan" }, { "BY", "Belarus" }, { "BZ", "Belize" }, { "CA", "Canada" }, { "CG", "Congo" }, { "CH", "Switzerland" }, { "CI", "Cote d'Ivoire" }, { "CL", "Chile" }, { "CM", "Cameroon" }, { "CN", "People's Republic of China" }, { "CO", "Colombia" }, { "CR", "Costa Rica" }, { "CS", "Serbia and Montenegro" }, { "CZ", "Czech Republic" }, { "DE", "Germany" }, { "DK", "Denmark" }, { "DO", "Dominican Republic" }, { "DZ", "Algeria" }, { "EC", "Ecuador" }, { "EE", "Estonia" }, { "EG", "Egypt" }, { "ER", "Eritrea" }, { "ES", "Spain" }, { "ET", "Ethiopia" }, { "FI", "Finland" }, { "FO", "Faroe Islands" }, { "FR", "France" }, { "GB", "United Kingdom" }, { "GD", "Caribbean" }, { "GE", "Georgia" }, { "GL", "Greenland" }, { "GR", "Greece" }, { "GT", "Guatemala" }, { "HK", "Hong Kong" }, { "HK", "Hong Kong S.A.R." }, { "HN", "Honduras" }, { "HR", "Croatia" }, { "HT", "Haiti" }, { "HU", "Hungary" }, { "ID", "Indonesia" }, { "IE", "Ireland" }, { "IL", "Israel" }, { "IN", "India" }, { "IQ", "Iraq" }, { "IR", "Iran" }, { "IS", "Iceland" }, { "IT", "Italy" }, { "JM", "Jamaica" }, { "JO", "Jordan" }, { "JP", "Japan" }, { "KE", "Kenya" }, { "KG", "Kyrgyzstan" }, { "KH", "Cambodia" }, { "KR", "South Korea" }, { "KW", "Kuwait" }, { "KZ", "Kazakhstan" }, { "LA", "Laos" }, { "LB", "Lebanon" }, { "LI", "Liechtenstein" }, { "LK", "Sri Lanka" }, { "LT", "Lithuania" }, { "LU", "Luxembourg" }, { "LV", "Latvia" }, { "LY", "Libya" }, { "MA", "Morocco" }, { "MC", "Principality of Monaco" }, { "MD", "Moldava" }, { "MD", "Moldova" }, { "ME", "Montenegro" }, { "MK", "Former Yugoslav Republic of Macedonia" }, { "ML", "Mali" }, { "MM", "Myanmar" }, { "MN", "Mongolia" }, { "MO", "Macau S.A.R." }, { "MT", "Malta" }, { "MV", "Maldives" }, { "MX", "Mexico" }, { "MY", "Malaysia" }, { "NG", "Nigeria" }, { "NI", "Nicaragua" }, { "NL", "Netherlands" }, { "NO", "Norway" }, { "NP", "Nepal" }, { "NZ", "New Zealand" }, { "OM", "Oman" }, { "PA", "Panama" }, { "PE", "Peru" }, { "PH", "Philippines" }, { "PK", "Islamic Republic of Pakistan" }, { "PL", "Poland" }, { "PR", "Puerto Rico" }, { "PT", "Portugal" }, { "PY", "Paraguay" }, { "QA", "Qatar" }, { "RE", "Reunion" }, { "RO", "Romania" }, { "RS", "Serbia" }, { "RU", "Russia" }, { "RW", "Rwanda" }, { "SA", "Saudi Arabia" }, { "SE", "Sweden" }, { "SG", "Singapore" }, { "SI", "Slovenia" }, { "SK", "Slovak" }, { "SN", "Senegal" }, { "SO", "Somalia" }, { "SR", "Suriname" }, { "SV", "El Salvador" }, { "SY", "Syria" }, { "TH", "Thailand" }, { "TJ", "Tajikistan" }, { "TM", "Turkmenistan" }, { "TN", "Tunisia" }, { "TR", "Turkey" }, { "TT", "Trinidad and Tobago" }, { "TW", "Taiwan" }, { "TZ", "Tanzania" }, { "UA", "Ukraine" }, { "US", "United States" }, { "UY", "Uruguay" }, { "VA", "Vatican" }, { "VE", "Venezuela" }, { "VN", "Viet Nam" }, { "YE", "Yemen" }, { "ZA", "South Africa" }, { "ZW", "Zimbabwe" } }; /* Given a string STRING, find the set of indices i such that TABLE[i].code is the given STRING. It is a range [lo,hi-1]. */ typedef struct { size_t lo; size_t hi; } range_t; static void search (const struct table_entry *table, size_t table_size, const char *string, range_t *result) { /* The table is sorted. Perform a binary search. */ size_t hi = table_size; size_t lo = 0; while (lo < hi) { /* Invariant: for i < lo, strcmp (table[i].code, string) < 0, for i >= hi, strcmp (table[i].code, string) > 0. */ size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ int cmp = strcmp (table[mid].code, string); if (cmp < 0) lo = mid + 1; else if (cmp > 0) hi = mid; else { /* Found an i with strcmp (language_table[i].code, string) == 0. Find the entire interval of such i. */ { size_t i; for (i = mid; i > lo; ) { i--; if (strcmp (table[i].code, string) < 0) { lo = i + 1; break; } } } { size_t i; for (i = mid; i < hi; i++) { if (strcmp (table[i].code, string) > 0) { hi = i; break; } } } /* The set of i with strcmp (language_table[i].code, string) == 0 is the interval [lo, hi-1]. */ break; } } result->lo = lo; result->hi = hi; } /* Like setlocale, but accept also locale names in the form ll or ll_CC, where ll is an ISO 639 language code and CC is an ISO 3166 country code. */ static char * setlocale_unixlike (int category, const char *locale) { char *result; char llCC_buf[64]; char ll_buf[64]; char CC_buf[64]; /* First, try setlocale with the original argument unchanged. */ result = setlocale (category, locale); if (result != NULL) return result; /* Otherwise, assume the argument is in the form language[_territory][.codeset][@modifier] and try to map it using the tables. */ if (strlen (locale) < sizeof (llCC_buf)) { /* Second try: Remove the codeset part. */ { const char *p = locale; char *q = llCC_buf; /* Copy the part before the dot. */ for (; *p != '\0' && *p != '.'; p++, q++) *q = *p; if (*p == '.') /* Skip the part up to the '@', if any. */ for (; *p != '\0' && *p != '@'; p++) ; /* Copy the part starting with '@', if any. */ for (; *p != '\0'; p++, q++) *q = *p; *q = '\0'; } /* llCC_buf now contains language[_territory][@modifier] */ if (strcmp (llCC_buf, locale) != 0) { result = setlocale (category, llCC_buf); if (result != NULL) return result; } /* Look it up in language_table. */ { range_t range; size_t i; search (language_table, sizeof (language_table) / sizeof (language_table[0]), llCC_buf, &range); for (i = range.lo; i < range.hi; i++) { /* Try the replacement in language_table[i]. */ result = setlocale (category, language_table[i].english); if (result != NULL) return result; } } /* Split language[_territory][@modifier] into ll_buf = language[@modifier] and CC_buf = territory */ { const char *underscore = strchr (llCC_buf, '_'); if (underscore != NULL) { const char *territory_start = underscore + 1; const char *territory_end = strchr (territory_start, '@'); if (territory_end == NULL) territory_end = territory_start + strlen (territory_start); memcpy (ll_buf, llCC_buf, underscore - llCC_buf); strcpy (ll_buf + (underscore - llCC_buf), territory_end); memcpy (CC_buf, territory_start, territory_end - territory_start); CC_buf[territory_end - territory_start] = '\0'; { /* Look up ll_buf in language_table and CC_buf in country_table. */ range_t language_range; search (language_table, sizeof (language_table) / sizeof (language_table[0]), ll_buf, &language_range); if (language_range.lo < language_range.hi) { range_t country_range; search (country_table, sizeof (country_table) / sizeof (country_table[0]), CC_buf, &country_range); if (country_range.lo < country_range.hi) { size_t i; size_t j; for (i = language_range.lo; i < language_range.hi; i++) for (j = country_range.lo; j < country_range.hi; j++) { /* Concatenate the replacements. */ const char *part1 = language_table[i].english; size_t part1_len = strlen (part1); const char *part2 = country_table[j].english; size_t part2_len = strlen (part2) + 1; char buf[64+64]; if (!(part1_len + 1 + part2_len <= sizeof (buf))) abort (); memcpy (buf, part1, part1_len); buf[part1_len] = '_'; memcpy (buf + part1_len + 1, part2, part2_len); /* Try the concatenated replacements. */ result = setlocale (category, buf); if (result != NULL) return result; } } /* Try omitting the country entirely. This may set a locale corresponding to the wrong country, but is better than failing entirely. */ { size_t i; for (i = language_range.lo; i < language_range.hi; i++) { /* Try only the language replacement. */ result = setlocale (category, language_table[i].english); if (result != NULL) return result; } } } } } } } /* Failed. */ return NULL; } # else # define setlocale_unixlike setlocale # endif # if LC_MESSAGES == 1729 /* The system does not store an LC_MESSAGES locale category. Do it here. */ static char lc_messages_name[64] = "C"; /* Like setlocale, but support also LC_MESSAGES. */ static char * setlocale_single (int category, const char *locale) { if (category == LC_MESSAGES) { if (locale != NULL) { lc_messages_name[sizeof (lc_messages_name) - 1] = '\0'; strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1); } return lc_messages_name; } else return setlocale_unixlike (category, locale); } # else # define setlocale_single setlocale_unixlike # endif char * rpl_setlocale (int category, const char *locale) { if (locale != NULL && locale[0] == '\0') { /* A request to the set the current locale to the default locale. */ if (category == LC_ALL) { /* Set LC_CTYPE first. Then the other categories. */ static int const categories[] = { LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES }; char *saved_locale; const char *base_name; unsigned int i; /* Back up the old locale, in case one of the steps fails. */ saved_locale = setlocale (LC_ALL, NULL); if (saved_locale == NULL) return NULL; saved_locale = strdup (saved_locale); if (saved_locale == NULL) return NULL; /* Set LC_CTYPE category. Set all other categories (except possibly LC_MESSAGES) to the same value in the same call; this is likely to save calls. */ base_name = gl_locale_name_environ (LC_CTYPE, category_to_name (LC_CTYPE)); if (base_name == NULL) base_name = gl_locale_name_default (); if (setlocale_unixlike (LC_ALL, base_name) == NULL) goto fail; # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the LC_CTYPE category to an invalid value ("C") when it does not support the specified encoding. Report a failure instead. */ if (strchr (base_name, '.') != NULL && strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) goto fail; # endif for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++) { int cat = categories[i]; const char *name; name = gl_locale_name_environ (cat, category_to_name (cat)); if (name == NULL) name = gl_locale_name_default (); /* If name is the same as base_name, it has already been set through the setlocale call before the loop. */ if (strcmp (name, base_name) != 0 # if LC_MESSAGES == 1729 || cat == LC_MESSAGES # endif ) if (setlocale_single (cat, name) == NULL) goto fail; } /* All steps were successful. */ free (saved_locale); return setlocale (LC_ALL, NULL); fail: if (saved_locale[0] != '\0') /* don't risk an endless recursion */ setlocale (LC_ALL, saved_locale); free (saved_locale); return NULL; } else { const char *name = gl_locale_name_environ (category, category_to_name (category)); if (name == NULL) name = gl_locale_name_default (); return setlocale_single (category, name); } } else { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL) { char *saved_locale; /* Back up the old locale. */ saved_locale = setlocale (LC_ALL, NULL); if (saved_locale == NULL) return NULL; saved_locale = strdup (saved_locale); if (saved_locale == NULL) return NULL; if (setlocale_unixlike (LC_ALL, locale) == NULL) { free (saved_locale); return NULL; } /* On native Windows, setlocale(LC_ALL,...) may succeed but set the LC_CTYPE category to an invalid value ("C") when it does not support the specified encoding. Report a failure instead. */ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) { if (saved_locale[0] != '\0') /* don't risk an endless recursion */ setlocale (LC_ALL, saved_locale); free (saved_locale); return NULL; } /* It was really successful. */ free (saved_locale); return setlocale (LC_ALL, NULL); } else # endif return setlocale_single (category, locale); } } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-memchr.c�������������������������������������������������0000664�0000000�0000000�00000007312�12166360012�016417� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2008-2012 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <string.h> #include "signature.h" SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); #include <stdlib.h> #include "zerosize-ptr.h" #include "macros.h" /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */ #define MEMCHR (char *) memchr int main (void) { size_t n = 0x100000; char *input = malloc (n); ASSERT (input); input[0] = 'a'; input[1] = 'b'; memset (input + 2, 'c', 1024); memset (input + 1026, 'd', n - 1028); input[n - 2] = 'e'; input[n - 1] = 'a'; /* Basic behavior tests. */ ASSERT (MEMCHR (input, 'a', n) == input); ASSERT (MEMCHR (input, 'a', 0) == NULL); ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL); ASSERT (MEMCHR (input, 'b', n) == input + 1); ASSERT (MEMCHR (input, 'c', n) == input + 2); ASSERT (MEMCHR (input, 'd', n) == input + 1026); ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1); ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2); ASSERT (MEMCHR (input + 1, 0x789abc00 | 'e', n - 1) == input + n - 2); ASSERT (MEMCHR (input, 'f', n) == NULL); ASSERT (MEMCHR (input, '\0', n) == NULL); /* Check that a very long haystack is handled quickly if the byte is found near the beginning. */ { size_t repeat = 10000; for (; repeat > 0; repeat--) { ASSERT (MEMCHR (input, 'c', n) == input + 2); } } /* Alignment tests. */ { int i, j; for (i = 0; i < 32; i++) { for (j = 0; j < 256; j++) input[i + j] = j; for (j = 0; j < 256; j++) { ASSERT (MEMCHR (input + i, j, 256) == input + i + j); } } } /* Check that memchr() does not read past the first occurrence of the byte being searched. See the Austin Group's clarification <http://www.opengroup.org/austin/docs/austin_454.txt>. Test both '\0' and something else, since some implementations special-case searching for NUL. */ { char *page_boundary = (char *) zerosize_ptr (); /* Too small, and we miss cache line boundary tests; too large, and the test takes cubically longer to complete. */ int limit = 257; if (page_boundary != NULL) { for (n = 1; n <= limit; n++) { char *mem = page_boundary - n; memset (mem, 'X', n); ASSERT (MEMCHR (mem, 'U', n) == NULL); ASSERT (MEMCHR (mem, 0, n) == NULL); { size_t i; size_t k; for (i = 0; i < n; i++) { mem[i] = 'U'; for (k = i + 1; k < n + limit; k++) ASSERT (MEMCHR (mem, 'U', k) == mem + i); mem[i] = 0; for (k = i + 1; k < n + limit; k++) ASSERT (MEMCHR (mem, 0, k) == mem + i); mem[i] = 'X'; } } } } } free (input); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-frexp.c�������������������������������������������0000664�0000000�0000000�00000007055�12166360012�017574� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of splitting a double into fraction and mantissa. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "printf-frexp.h" #include <float.h> #include "macros.h" static double my_ldexp (double x, int d) { for (; d > 0; d--) x *= 2.0; for (; d < 0; d++) x *= 0.5; return x; } int main () { int i; /* The use of 'volatile' guarantees that excess precision bits are dropped when dealing with denormalized numbers. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile double x; for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0); } for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa == my_ldexp (1.0, i - DBL_MIN_EXP)); } for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01); } for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205); } for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fcntl-h.c������������������������������������������������0000664�0000000�0000000�00000005235�12166360012�016501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <fcntl.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <fcntl.h> /* Check that the various O_* macros are defined. */ int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT; /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that the FD_* macros are defined. */ int i = FD_CLOEXEC; /* Check that the types are all defined. */ pid_t t1; off_t t2; mode_t t3; int main (void) { /* Ensure no overlap in SEEK_*. */ switch (0) { case SEEK_CUR: case SEEK_END: case SEEK_SET: ; } /* Ensure no dangerous overlap in non-zero gnulib-defined replacements. */ switch (O_RDONLY) { /* Access modes */ case O_RDONLY: case O_WRONLY: case O_RDWR: #if O_EXEC && O_EXEC != O_RDONLY case O_EXEC: #endif #if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY case O_SEARCH: #endif i = O_ACCMODE == (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH); break; /* Everyone should have these */ case O_CREAT: case O_EXCL: case O_TRUNC: case O_APPEND: break; /* These might be 0 or O_RDONLY, only test non-zero versions. */ #if O_CLOEXEC case O_CLOEXEC: #endif #if O_DIRECT case O_DIRECT: #endif #if O_DIRECTORY case O_DIRECTORY: #endif #if O_DSYNC case O_DSYNC: #endif #if O_NOATIME case O_NOATIME: #endif #if O_NONBLOCK case O_NONBLOCK: #endif #if O_NOCTTY case O_NOCTTY: #endif #if O_NOFOLLOW case O_NOFOLLOW: #endif #if O_NOLINKS case O_NOLINKS: #endif #if O_RSYNC && O_RSYNC != O_DSYNC case O_RSYNC: #endif #if O_SYNC && O_SYNC != O_RSYNC case O_SYNC: #endif #if O_TTY_INIT case O_TTY_INIT: #endif #if O_BINARY case O_BINARY: #endif #if O_TEXT case O_TEXT: #endif ; } return !i; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-getcwd.c�������������������������������������������������0000664�0000000�0000000�00000014415�12166360012�016423� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of getcwd() function. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include "pathmax.h" #include "macros.h" #if ! HAVE_GETPAGESIZE # define getpagesize() 0 #endif /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than the 16kB pagesize on ia64 linux. Those conditions make the code below trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ #define TARGET_LEN (5 * 1024) /* Keep this test in sync with m4/getcwd-abort-bug.m4. */ static int test_abort_bug (void) { char const *dir_name = "confdir-14B---"; char *cwd; size_t initial_cwd_len; int fail = 0; size_t desired_depth; size_t d; #ifdef PATH_MAX /* The bug is triggered when PATH_MAX < getpagesize (), so skip this relatively expensive and invasive test if that's not true. */ if (getpagesize () <= PATH_MAX) return 0; #endif cwd = getcwd (NULL, 0); if (cwd == NULL) return 2; initial_cwd_len = strlen (cwd); free (cwd); desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) / (1 + strlen (dir_name))); for (d = 0; d < desired_depth; d++) { if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) { if (! (errno == ERANGE || errno == ENAMETOOLONG || errno == ENOENT)) fail = 3; /* Unable to construct deep hierarchy. */ break; } } /* If libc has the bug in question, this invocation of getcwd results in a failed assertion. */ cwd = getcwd (NULL, 0); if (cwd == NULL) fail = 4; /* getcwd didn't assert, but it failed for a long name where the answer could have been learned. */ free (cwd); /* Call rmdir first, in case the above chdir failed. */ rmdir (dir_name); while (0 < d--) { if (chdir ("..") < 0) { fail = 5; break; } rmdir (dir_name); } return fail; } /* The length of this name must be 8. */ #define DIR_NAME "confdir3" #define DIR_NAME_LEN 8 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1) /* The length of "../". */ #define DOTDOTSLASH_LEN 3 /* Leftover bytes in the buffer, to work around library or OS bugs. */ #define BUF_SLOP 20 /* Keep this test in sync with m4/getcwd-path-max.m4. */ static int test_long_name (void) { #ifndef PATH_MAX /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- at least not on a local file system. And if we were to start worrying about remote file systems, we'd have to enable the wrapper function all of the time, just to be safe. That's not worth the cost. */ return 0; #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - DIR_NAME_SIZE - BUF_SLOP) \ <= PATH_MAX) /* FIXME: Assuming there's a system for which this is true, this should be done in a compile test. */ return 0; #else char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + DIR_NAME_SIZE + BUF_SLOP]; char *cwd = getcwd (buf, PATH_MAX); size_t initial_cwd_len; size_t cwd_len; int fail = 0; size_t n_chdirs = 0; if (cwd == NULL) return 1; cwd_len = initial_cwd_len = strlen (cwd); while (1) { size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); char *c = NULL; cwd_len += DIR_NAME_SIZE; /* If mkdir or chdir fails, it could be that this system cannot create any file with an absolute name longer than PATH_MAX, such as cygwin. If so, leave fail as 0, because the current working directory can't be too long for getcwd if it can't even be created. For other errors, be pessimistic and consider that as a failure, too. */ if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) { if (! (errno == ERANGE || errno == ENAMETOOLONG || errno == ENOENT)) fail = 2; break; } if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) { c = getcwd (buf, PATH_MAX); if (!c && errno == ENOENT) { fail = 3; break; } if (c) { fail = 4; break; } if (! (errno == ERANGE || errno == ENAMETOOLONG)) { fail = 5; break; } } if (dotdot_max <= cwd_len - initial_cwd_len) { if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) break; c = getcwd (buf, cwd_len + 1); if (!c) { if (! (errno == ERANGE || errno == ENOENT || errno == ENAMETOOLONG)) { fail = 6; break; } if (AT_FDCWD || errno == ERANGE || errno == ENOENT) { fail = 7; break; } } } if (c && strlen (c) != cwd_len) { fail = 8; break; } ++n_chdirs; } /* Leaving behind such a deep directory is not polite. So clean up here, right away, even though the driving shell script would also clean up. */ { size_t i; /* Try rmdir first, in case the chdir failed. */ rmdir (DIR_NAME); for (i = 0; i <= n_chdirs; i++) { if (chdir ("..") < 0) break; if (rmdir (DIR_NAME) != 0) break; } } return fail; #endif } int main (int argc, char **argv) { return test_abort_bug () * 10 + test_long_name (); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix2.c������������������������������������������0000664�0000000�0000000�00000006177�12166360012�017700� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible printf() function. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #if HAVE_GETRLIMIT && HAVE_SETRLIMIT #include <stdlib.h> #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <string.h> #include <errno.h> int main (int argc, char *argv[]) { struct rlimit limit; int arg; int ret; /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif arg = atoi (argv[1]); switch (arg) { case 0: { void *memory = malloc (5000000); if (memory == NULL) return 1; memset (memory, 17, 5000000); return 78; } case 1: ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); case 2: ret = printf ("%.5000000f", -1.0); return !(ret == 5000003 || (ret < 0 && errno == ENOMEM)); case 3: ret = printf ("%.5000000e", 1.0); return !(ret >= 5000006 || (ret < 0 && errno == ENOMEM)); case 4: ret = printf ("%.5000000d", 1); return !(ret == 5000000 || (ret < 0 && errno == ENOMEM)); case 5: ret = printf ("%.5000000d", -1); return !(ret == 5000001 || (ret < 0 && errno == ENOMEM)); case 6: ret = printf ("%.5000000u", 1); return !(ret == 5000000 || (ret < 0 && errno == ENOMEM)); } return 0; } #else int main (int argc, char *argv[]) { return 77; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-setlocale2.c���������������������������������������������0000664�0000000�0000000�00000003347�12166360012�017205� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of setting the current locale. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main () { /* Try to set the locale by implicitly looking at the LC_ALL environment variable. */ if (setlocale (LC_ALL, "") != NULL) /* It was successful. Check whether LC_CTYPE is non-trivial. */ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) { fprintf (stderr, "setlocale did not fail for implicit %s\n", getenv ("LC_ALL")); return 1; } /* Reset the locale. */ if (setlocale (LC_ALL, "C") == NULL) return 1; /* Try to set the locale by explicitly looking at the LC_ALL environment variable. */ if (setlocale (LC_ALL, getenv ("LC_ALL")) != NULL) /* It was successful. Check whether LC_CTYPE is non-trivial. */ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) { fprintf (stderr, "setlocale did not fail for explicit %s\n", getenv ("LC_ALL")); return 1; } return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb-w32.c��������������������������������������������0000664�0000000�0000000�00000021715�12166360012�017235� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of wide character to multibyte character. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <wchar.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "macros.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ static int test_one_locale (const char *name, int codepage) { char buf[64]; size_t ret; # if 1 /* Portable code to set the locale. */ { char name_with_codepage[1024]; sprintf (name_with_codepage, "%s.%d", name, codepage); /* Set the locale. */ if (setlocale (LC_ALL, name_with_codepage) == NULL) return 77; } # else /* Hacky way to set a locale.codepage combination that setlocale() refuses to set. */ { /* Codepage of the current locale, set with setlocale(). Not necessarily the same as GetACP(). */ extern __declspec(dllimport) unsigned int __lc_codepage; /* Set the locale. */ if (setlocale (LC_ALL, name) == NULL) return 77; /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */ __lc_codepage = codepage; switch (codepage) { case 1252: case 1256: MB_CUR_MAX = 1; break; case 932: case 950: case 936: MB_CUR_MAX = 2; break; case 54936: case 65001: MB_CUR_MAX = 4; break; } /* Test whether the codepage is really available. */ { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1)) return 77; } } # endif /* Test NUL character. */ { buf[0] = 'x'; ret = wcrtomb (buf, 0, NULL); ASSERT (ret == 1); ASSERT (buf[0] == '\0'); } /* Test single bytes. */ { int c; for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ ret = wcrtomb (buf, btowc (c), NULL); ASSERT (ret == 1); ASSERT (buf[0] == (char) c); break; } } /* Test special calling convention, passing a NULL pointer. */ { ret = wcrtomb (NULL, '\0', NULL); ASSERT (ret == 1); ret = wcrtomb (NULL, btowc ('x'), NULL); ASSERT (ret == 1); } switch (codepage) { case 1252: /* Locale encoding is CP1252, an extension of ISO-8859-1. */ { /* Convert "B\374\337er": "Büßer" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00FC, NULL); ASSERT (ret == 1); ASSERT (memcmp (buf, "\374", 1) == 0); ASSERT (buf[1] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00DF, NULL); ASSERT (ret == 1); ASSERT (memcmp (buf, "\337", 1) == 0); ASSERT (buf[1] == 'x'); } return 0; case 1256: /* Locale encoding is CP1256, not the same as ISO-8859-6. */ { /* Convert "x\302\341\346y": "xآلوy" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x0622, NULL); ASSERT (ret == 1); ASSERT (memcmp (buf, "\302", 1) == 0); ASSERT (buf[1] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x0644, NULL); ASSERT (ret == 1); ASSERT (memcmp (buf, "\341", 1) == 0); ASSERT (buf[1] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x0648, NULL); ASSERT (ret == 1); ASSERT (memcmp (buf, "\346", 1) == 0); ASSERT (buf[1] == 'x'); } return 0; case 932: /* Locale encoding is CP932, similar to Shift_JIS. */ { /* Convert "<\223\372\226\173\214\352>": "<日本語>" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x65E5, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\223\372", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x672C, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\226\173", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x8A9E, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\214\352", 2) == 0); ASSERT (buf[2] == 'x'); } return 0; case 950: /* Locale encoding is CP950, similar to Big5. */ { /* Convert "<\244\351\245\273\273\171>": "<日本語>" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x65E5, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\244\351", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x672C, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\245\273", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x8A9E, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\273\171", 2) == 0); ASSERT (buf[2] == 'x'); } return 0; case 936: /* Locale encoding is CP936 = GBK, an extension of GB2312. */ { /* Convert "<\310\325\261\276\325\132>": "<日本語>" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x65E5, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\310\325", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x672C, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\261\276", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x8A9E, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\325\132", 2) == 0); ASSERT (buf[2] == 'x'); } return 0; case 54936: /* Locale encoding is CP54936 = GB18030. */ { /* Convert "B\250\271\201\060\211\070er": "Büßer" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00FC, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\250\271", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00DF, NULL); ASSERT (ret == 4); ASSERT (memcmp (buf, "\201\060\211\070", 4) == 0); ASSERT (buf[4] == 'x'); } return 0; case 65001: /* Locale encoding is CP65001 = UTF-8. */ { /* Convert "B\303\274\303\237er": "Büßer" */ memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00FC, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\303\274", 2) == 0); ASSERT (buf[2] == 'x'); memset (buf, 'x', 8); ret = wcrtomb (buf, 0x00DF, NULL); ASSERT (ret == 2); ASSERT (memcmp (buf, "\303\237", 2) == 0); ASSERT (buf[2] == 'x'); } return 0; default: return 1; } } int main (int argc, char *argv[]) { int codepage = atoi (argv[argc - 1]); int result; int i; result = 77; for (i = 1; i < argc - 1; i++) { int ret = test_one_locale (argv[i], codepage); if (ret != 77) result = ret; } if (result == 77) { fprintf (stderr, "Skipping test: found no locale with codepage %d\n", codepage); } return result; } #else int main (int argc, char *argv[]) { fputs ("Skipping test: not a native Windows system\n", stderr); return 77; } #endif ���������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-symlink.h������������������������������������������������0000664�0000000�0000000�00000006070�12166360012�016637� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of symlink. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ /* This file is designed to test both symlink(a,b) and symlinkat(a,AT_FDCWD,b). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_symlink (int (*func) (char const *, char const *), bool print) { if (func ("nowhere", BASE "link1")) { if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } /* Some systems allow the creation of 0-length symlinks as a synonym for "."; but most reject it. */ { int status; errno = 0; status = func ("", BASE "link2"); if (status == -1) ASSERT (errno == ENOENT || errno == EINVAL); else { ASSERT (status == 0); ASSERT (unlink (BASE "link2") == 0); } } /* Sanity checks of failures. */ errno = 0; ASSERT (func ("nowhere", "") == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nowhere", ".") == -1); ASSERT (errno == EEXIST || errno == EINVAL); errno = 0; ASSERT (func ("somewhere", BASE "link1") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "link2/") == -1); ASSERT (errno == ENOTDIR || errno == ENOENT); ASSERT (mkdir (BASE "dir", 0700) == 0); errno = 0; ASSERT (func ("nowhere", BASE "dir") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "dir/") == -1); ASSERT (errno == EEXIST || errno == EINVAL); ASSERT (close (creat (BASE "file", 0600)) == 0); errno = 0; ASSERT (func ("nowhere", BASE "file") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "file/") == -1); ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); /* Trailing slash must always be rejected. */ ASSERT (unlink (BASE "link1") == 0); ASSERT (func (BASE "link2", BASE "link1") == 0); errno = 0; ASSERT (func (BASE "nowhere", BASE "link1/") == -1); ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); errno = 0; ASSERT (unlink (BASE "link2") == -1); ASSERT (errno == ENOENT); /* Cleanup. */ ASSERT (rmdir (BASE "dir") == 0); ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko4.sh�����������������������������������������������0000775�0000000�0000000�00000000117�12166360012�016673� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ./test-fseeko4${EXEEXT} "$srcdir/test-fseeko4.sh" || exit 1 exit 0 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-time.c���������������������������������������������������0000664�0000000�0000000�00000002357�12166360012�016106� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <time.h> substitute. Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <time.h> #include "verify.h" /* Check that the types are all defined. */ struct timespec t1; #if 0 /* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed it's missing on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */ pid_t t2; #endif /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fstat.c��������������������������������������������������0000664�0000000�0000000�00000002330�12166360012�016260� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of fstat() function. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <sys/stat.h> #include "signature.h" SIGNATURE_CHECK (fstat, int, (int, struct stat *)); #include <errno.h> #include "macros.h" int main (int argc, char *argv[]) { /* Test behaviour for invalid file descriptors. */ { struct stat statbuf; errno = 0; ASSERT (fstat (-1, &statbuf) == -1); ASSERT (errno == EBADF); } { struct stat statbuf; errno = 0; ASSERT (fstat (99, &statbuf) == -1); ASSERT (errno == EBADF); } return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix.h������������������������������������������0000664�0000000�0000000�00000011257�12166360012�017764� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible vsprintf() and sprintf() functions. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include "infinity.h" static void test_function (int (*my_fprintf) (FILE *, const char *, ...)) { /* Here we don't test output that may be platform dependent. The bulk of the tests is done as part of the 'vasnprintf-posix' module. */ /* Test support of size specifiers as in C99. */ my_fprintf (stdout, "%ju %d\n", (uintmax_t) 12345671, 33, 44, 55); my_fprintf (stdout, "%zu %d\n", (size_t) 12345672, 33, 44, 55); my_fprintf (stdout, "%tu %d\n", (ptrdiff_t) 12345673, 33, 44, 55); /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal output of floating-point numbers. */ /* Positive zero. */ my_fprintf (stdout, "%a %d\n", 0.0, 33, 44, 55); /* Positive infinity. */ my_fprintf (stdout, "%a %d\n", Infinityd (), 33, 44, 55); /* Negative infinity. */ my_fprintf (stdout, "%a %d\n", - Infinityd (), 33, 44, 55); /* FLAG_ZERO with infinite number. */ my_fprintf (stdout, "%010a %d\n", Infinityd (), 33, 44, 55); /* Test the support of the %f format directive. */ /* A positive number. */ my_fprintf (stdout, "%f %d\n", 12.75, 33, 44, 55); /* A larger positive number. */ my_fprintf (stdout, "%f %d\n", 1234567.0, 33, 44, 55); /* A negative number. */ my_fprintf (stdout, "%f %d\n", -0.03125, 33, 44, 55); /* Positive zero. */ my_fprintf (stdout, "%f %d\n", 0.0, 33, 44, 55); /* FLAG_ZERO. */ my_fprintf (stdout, "%015f %d\n", 1234.0, 33, 44, 55); /* Precision. */ my_fprintf (stdout, "%.f %d\n", 1234.0, 33, 44, 55); /* Precision with no rounding. */ my_fprintf (stdout, "%.2f %d\n", 999.95, 33, 44, 55); /* Precision with rounding. */ my_fprintf (stdout, "%.2f %d\n", 999.996, 33, 44, 55); /* A positive number. */ my_fprintf (stdout, "%Lf %d\n", 12.75L, 33, 44, 55); /* A larger positive number. */ my_fprintf (stdout, "%Lf %d\n", 1234567.0L, 33, 44, 55); /* A negative number. */ my_fprintf (stdout, "%Lf %d\n", -0.03125L, 33, 44, 55); /* Positive zero. */ my_fprintf (stdout, "%Lf %d\n", 0.0L, 33, 44, 55); /* FLAG_ZERO. */ my_fprintf (stdout, "%015Lf %d\n", 1234.0L, 33, 44, 55); /* Precision. */ my_fprintf (stdout, "%.Lf %d\n", 1234.0L, 33, 44, 55); /* Precision with no rounding. */ my_fprintf (stdout, "%.2Lf %d\n", 999.95L, 33, 44, 55); /* Precision with rounding. */ my_fprintf (stdout, "%.2Lf %d\n", 999.996L, 33, 44, 55); /* Test the support of the %F format directive. */ /* A positive number. */ my_fprintf (stdout, "%F %d\n", 12.75, 33, 44, 55); /* A larger positive number. */ my_fprintf (stdout, "%F %d\n", 1234567.0, 33, 44, 55); /* A negative number. */ my_fprintf (stdout, "%F %d\n", -0.03125, 33, 44, 55); /* Positive zero. */ my_fprintf (stdout, "%F %d\n", 0.0, 33, 44, 55); /* FLAG_ZERO. */ my_fprintf (stdout, "%015F %d\n", 1234.0, 33, 44, 55); /* Precision. */ my_fprintf (stdout, "%.F %d\n", 1234.0, 33, 44, 55); /* Precision with no rounding. */ my_fprintf (stdout, "%.2F %d\n", 999.95, 33, 44, 55); /* Precision with rounding. */ my_fprintf (stdout, "%.2F %d\n", 999.996, 33, 44, 55); /* A positive number. */ my_fprintf (stdout, "%LF %d\n", 12.75L, 33, 44, 55); /* A larger positive number. */ my_fprintf (stdout, "%LF %d\n", 1234567.0L, 33, 44, 55); /* A negative number. */ my_fprintf (stdout, "%LF %d\n", -0.03125L, 33, 44, 55); /* Positive zero. */ my_fprintf (stdout, "%LF %d\n", 0.0L, 33, 44, 55); /* FLAG_ZERO. */ my_fprintf (stdout, "%015LF %d\n", 1234.0L, 33, 44, 55); /* Precision. */ my_fprintf (stdout, "%.LF %d\n", 1234.0L, 33, 44, 55); /* Precision with no rounding. */ my_fprintf (stdout, "%.2LF %d\n", 999.95L, 33, 44, 55); /* Precision with rounding. */ my_fprintf (stdout, "%.2LF %d\n", 999.996L, 33, 44, 55); /* Test the support of the POSIX/XSI format strings with positions. */ my_fprintf (stdout, "%2$d %1$d\n", 33, 55); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-thread_create.c������������������������������������������0000664�0000000�0000000�00000004123�12166360012�017733� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of gl_thread_create () macro. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2011. */ #include <config.h> #include "glthread/thread.h" #include <stdio.h> #include <string.h> #include "macros.h" static gl_thread_t main_thread_before; static gl_thread_t main_thread_after; static gl_thread_t worker_thread; static int dummy; static volatile int work_done; static void * worker_thread_func (void *arg) { work_done = 1; return &dummy; } int main () { main_thread_before = gl_thread_self (); if (glthread_create (&worker_thread, worker_thread_func, NULL) == 0) { void *ret; /* Check that gl_thread_self () has the same value before than after the first call to gl_thread_create (). */ main_thread_after = gl_thread_self (); ASSERT (memcmp (&main_thread_before, &main_thread_after, sizeof (gl_thread_t)) == 0); gl_thread_join (worker_thread, &ret); /* Check the return value of the thread. */ ASSERT (ret == &dummy); /* Check that worker_thread_func () has finished executing. */ ASSERT (work_done); return 0; } else { #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS fputs ("glthread_create failed\n", stderr); return 1; #else fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; #endif } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-cloexec.c������������������������������������������������0000664�0000000�0000000�00000007703�12166360012�016572� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test duplicating non-inheritable file descriptors. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include "cloexec.h" #include <errno.h> #include <fcntl.h> #include <unistd.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> /* Get _get_osfhandle. */ # include "msvc-nothrow.h" #endif #include "binary-io.h" #include "macros.h" /* Return non-zero if FD is open and inheritable across exec/spawn. */ static int is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) return 0; return (flags & HANDLE_FLAG_INHERIT) != 0; #else # ifndef F_GETFD # error Please port fcntl to your platform # endif int i = fcntl (fd, F_GETFD); return 0 <= i && (i & FD_CLOEXEC) == 0; #endif } #if !O_BINARY # define setmode(f,m) zero () static int zero (void) { return 0; } #endif /* Return non-zero if FD is open in the given MODE, which is either O_TEXT or O_BINARY. */ static int is_mode (int fd, int mode) { int value = setmode (fd, O_BINARY); setmode (fd, value); return mode == value; } int main (void) { const char *file = "test-cloexec.tmp"; int fd = creat (file, 0600); int fd2; /* Assume std descriptors were provided by invoker. */ ASSERT (STDERR_FILENO < fd); ASSERT (is_inheritable (fd)); /* Normal use of set_cloexec_flag. */ ASSERT (set_cloexec_flag (fd, true) == 0); #if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) ASSERT (!is_inheritable (fd)); #endif ASSERT (set_cloexec_flag (fd, false) == 0); ASSERT (is_inheritable (fd)); /* Normal use of dup_cloexec. */ fd2 = dup_cloexec (fd); ASSERT (fd < fd2); ASSERT (!is_inheritable (fd2)); ASSERT (close (fd) == 0); ASSERT (dup_cloexec (fd2) == fd); ASSERT (!is_inheritable (fd)); ASSERT (close (fd2) == 0); /* On systems that distinguish between text and binary mode, dup_cloexec reuses the mode of the source. */ setmode (fd, O_BINARY); ASSERT (is_mode (fd, O_BINARY)); fd2 = dup_cloexec (fd); ASSERT (fd < fd2); ASSERT (is_mode (fd2, O_BINARY)); ASSERT (close (fd2) == 0); setmode (fd, O_TEXT); ASSERT (is_mode (fd, O_TEXT)); fd2 = dup_cloexec (fd); ASSERT (fd < fd2); ASSERT (is_mode (fd2, O_TEXT)); ASSERT (close (fd2) == 0); /* Test error handling. */ errno = 0; ASSERT (set_cloexec_flag (-1, false) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (set_cloexec_flag (10000000, false) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (set_cloexec_flag (fd2, false) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup_cloexec (-1) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup_cloexec (10000000) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup_cloexec (fd2) == -1); ASSERT (errno == EBADF); /* Clean up. */ ASSERT (close (fd) == 0); ASSERT (unlink (file) == 0); return 0; } �������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-vfprintf-posix.sh����������������������������������������0000775�0000000�0000000�00000000600�11433657032�020335� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-vfprintf-posix.tmp t-vfprintf-posix.out" ./test-vfprintf-posix${EXEEXT} > t-vfprintf-posix.tmp || exit 1 LC_ALL=C tr -d '\r' < t-vfprintf-posix.tmp > t-vfprintf-posix.out || exit 1 : ${DIFF=diff} ${DIFF} "${srcdir}/test-printf-posix.output" t-vfprintf-posix.out result=$? rm -fr $tmpfiles exit $result ��������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-malloca.c������������������������������������������������0000664�0000000�0000000�00000003057�12166360012�016556� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of safe automatic memory allocation. Copyright (C) 2005, 2007, 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. */ #include <config.h> #include "malloca.h" #include <stdlib.h> static void do_allocation (int n) { void *ptr = malloca (n); freea (ptr); safe_alloca (n); } void (*func) (int) = do_allocation; int main () { int i; /* This slows down malloc a lot. */ unsetenv ("MALLOC_PERTURB_"); /* Repeat a lot of times, to make sure there's no memory leak. */ for (i = 0; i < 50000; i++) { /* Try various values. n = 0 gave a crash on Alpha with gcc-2.5.8. Some versions of MacOS X have a stack size limit of 512 KB. */ func (34); func (134); func (399); func (510823); func (129321); func (0); func (4070); func (4095); func (1); func (16582); } return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-freopen.c������������������������������������������������0000664�0000000�0000000�00000004065�12166360012�016604� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of opening a file stream. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (freopen, FILE *, (char const *, char const *, FILE *)); #include <errno.h> #include <unistd.h> #include "macros.h" int main () { const char *filename = "test-freopen.txt"; ASSERT (freopen ("/dev/null", "r", stdin) != NULL); #if 0 /* freopen (NULL, ...) is unsupported on most platforms. */ /* Test that freopen() sets errno if someone else closes the stream fd behind the back of stdio. */ { FILE *fp = fopen (filename, "w+"); ASSERT (fp != NULL); ASSERT (close (fileno (fp)) == 0); errno = 0; ASSERT (freopen (NULL, "r", fp) == NULL); perror("freopen"); ASSERT (errno == EBADF); fclose (fp); } /* Test that freopen() sets errno if the stream was constructed with an invalid file descriptor. */ { FILE *fp = fdopen (-1, "w+"); if (fp != NULL) { errno = 0; ASSERT (freopen (NULL, "r", fp) == NULL); ASSERT (errno == EBADF); fclose (fp); } } { FILE *fp = fdopen (99, "w+"); if (fp != NULL) { errno = 0; ASSERT (freopen (NULL, "r", fp) == NULL); ASSERT (errno == EBADF); fclose (fp); } } #endif /* Clean up. */ unlink (filename); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/unsetenv.c����������������������������������������������������0000664�0000000�0000000�00000005472�12166360012�016043� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1992, 1995-2002, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ #define _GL_ARG_NONNULL(params) /* Specification. */ #include <stdlib.h> #include <errno.h> #if !_LIBC # define __set_errno(ev) ((errno) = (ev)) #endif #include <string.h> #include <unistd.h> #if !_LIBC # define __environ environ #endif #if _LIBC /* This lock protects against simultaneous modifications of 'environ'. */ # include <bits/libc-lock.h> __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif /* In the GNU C library we must keep the namespace clean. */ #ifdef _LIBC # define unsetenv __unsetenv #endif #if _LIBC || !HAVE_UNSETENV int unsetenv (const char *name) { size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } len = strlen (name); LOCK; ep = __environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; do dp[0] = dp[1]; while (*dp++); /* Continue the loop in case NAME appears again. */ } else ++ep; UNLOCK; return 0; } #ifdef _LIBC # undef unsetenv weak_alias (__unsetenv, unsetenv) #endif #else /* HAVE_UNSETENV */ # undef unsetenv # if !HAVE_DECL_UNSETENV # if VOID_UNSETENV extern void unsetenv (const char *); # else extern int unsetenv (const char *); # endif # endif /* Call the underlying unsetenv, in case there is hidden bookkeeping that needs updating beyond just modifying environ. */ int rpl_unsetenv (const char *name) { int result = 0; if (!name || !*name || strchr (name, '=')) { errno = EINVAL; return -1; } while (getenv (name)) # if !VOID_UNSETENV result = # endif unsetenv (name); return result; } #endif /* HAVE_UNSETENV */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fflush2.c������������������������������������������������0000664�0000000�0000000�00000006376�12166360012�016526� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible fflush() function. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include "binary-io.h" #include "macros.h" int main (int argc, char **argv) { int c; /* Avoid the well-known bugs of fflush() on streams in O_TEXT mode on native Windows platforms. */ SET_BINARY (0); if (argc > 1) switch (argv[1][0]) { case '1': /* Check fflush after a backup ungetc() call. This is case 1a in terms of <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>, according to the Austin Group's resolution on 2009-01-08. */ c = fgetc (stdin); ASSERT (c == '#'); c = fgetc (stdin); ASSERT (c == '!'); /* Here the file-position indicator must be 2. */ c = ungetc ('!', stdin); ASSERT (c == '!'); fflush (stdin); /* Here the file-position indicator must be 1. */ c = fgetc (stdin); ASSERT (c == '!'); c = fgetc (stdin); ASSERT (c == '/'); return 0; case '2': /* Check fflush after a non-backup ungetc() call. This is case 2a in terms of <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>, according to the Austin Group's resolution on 2009-01-08. */ /* Check that fflush after a non-backup ungetc() call discards the ungetc buffer. This is mandated by POSIX <http://www.opengroup.org/susv3/functions/ungetc.html>: "The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back." <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> "[After fflush(),] the file offset of the underlying open file description shall be set to the file position of the stream, and any characters pushed back onto the stream by ungetc() or ungetwc() that have not subsequently been read from the stream shall be discarded." */ c = fgetc (stdin); ASSERT (c == '#'); c = fgetc (stdin); ASSERT (c == '!'); /* Here the file-position indicator must be 2. */ c = ungetc ('@', stdin); ASSERT (c == '@'); fflush (stdin); /* Here the file-position indicator must be 1. */ c = fgetc (stdin); ASSERT (c == '!'); c = fgetc (stdin); ASSERT (c == '/'); return 0; } return 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-printf-posix2.sh�����������������������������������������0000775�0000000�0000000�00000001226�11433657032�020070� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test out-of-memory handling. (./test-printf-posix2${EXEEXT} 0 result=$? if test $result != 77 && test $result != 78; then result=1; fi exit $result ) 2>/dev/null malloc_result=$? if test $malloc_result = 77; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi for arg in 1 2 3 4 5 6 do ./test-printf-posix2${EXEEXT} $arg > /dev/null result=$? if test $result = 77; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi if test $result != 0; then exit 1 fi done if test $malloc_result = 78; then echo "Skipping test: getrlimit and setrlimit don't work" exit 77 fi exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/fdopen.c������������������������������������������������������0000664�0000000�0000000�00000002727�12166360012�015447� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Open a stream with a given file descriptor. Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #include <stdio.h> #include <errno.h> #if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" #endif #undef fdopen #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static FILE * fdopen_nothrow (int fd, const char *mode) { FILE *result; TRY_MSVC_INVAL { result = fdopen (fd, mode); } CATCH_MSVC_INVAL { result = NULL; } DONE_MSVC_INVAL; return result; } #else # define fdopen_nothrow fdopen #endif FILE * rpl_fdopen (int fd, const char *mode) { int saved_errno = errno; FILE *fp; errno = 0; fp = fdopen_nothrow (fd, mode); if (fp == NULL) { if (errno == 0) errno = EBADF; } else errno = saved_errno; return fp; } �����������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-dirent.c�������������������������������������������������0000664�0000000�0000000�00000001743�12166360012�016433� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <dirent.h> substitute. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <dirent.h> /* Check for existence of required types. */ static DIR *dir _GL_UNUSED; static struct dirent d; static ino_t i; int main (void) { return d.d_name[0] + i; } �����������������������������id-utils-4.6+git20120811/gnulib-tests/test-wcrtomb.sh�����������������������������������������������0000775�0000000�0000000�00000001361�11433657032�017021� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR \ ./test-wcrtomb${EXEEXT} 1 \ || exit 1 fi # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 != none; then LC_ALL=$LOCALE_FR_UTF8 \ ./test-wcrtomb${EXEEXT} 2 \ || exit 1 fi # Test whether a specific EUC-JP locale is installed. : ${LOCALE_JA=ja_JP} if test $LOCALE_JA != none; then LC_ALL=$LOCALE_JA \ ./test-wcrtomb${EXEEXT} 3 \ || exit 1 fi # Test whether a specific GB18030 locale is installed. : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_ZH_CN != none; then LC_ALL=$LOCALE_ZH_CN \ ./test-wcrtomb${EXEEXT} 4 \ || exit 1 fi exit 0 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-btowc2.sh������������������������������������������������0000775�0000000�0000000�00000000566�11433657032�016552� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-btowc${EXEEXT} 2 ������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32-5.sh�����������������������������������������0000775�0000000�0000000�00000000120�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP936 locale. ./test-mbrtowc-w32${EXEEXT} Chinese_China 936 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc-w32-4.sh�����������������������������������������0000775�0000000�0000000�00000000121�12166360012�017555� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test a CP950 locale. ./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/same-inode.h��������������������������������������������������0000664�0000000�0000000�00000002202�12166360012�016206� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Determine whether two stat buffers refer to the same file. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 # ifdef __VMS # define SAME_INODE(a, b) \ ((a).st_ino[0] == (b).st_ino[0] \ && (a).st_ino[1] == (b).st_ino[1] \ && (a).st_ino[2] == (b).st_ino[2] \ && (a).st_dev == (b).st_dev) # else # define SAME_INODE(a, b) \ ((a).st_ino == (b).st_ino \ && (a).st_dev == (b).st_dev) # endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsinit.sh�����������������������������������������������0000775�0000000�0000000�00000000566�11433657032�017017� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-mbsinit${EXEEXT} ������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude7.sh����������������������������������������������0000775�0000000�0000000�00000002444�12166360012�017060� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test exclude precedence cat > in <<EOT foo* bar Baz EOT cat > expected <<EOT bar: 1 bar: 0 EOT test-exclude in -include in -- bar > out || exit $? test-exclude -include in -no-include in -- bar >> out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-ftello.c�������������������������������������������������0000664�0000000�0000000�00000006275�12166360012�016440� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of ftello() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (ftello, off_t, (FILE *)); #include "binary-io.h" #include "macros.h" #ifndef FUNC_UNGETC_BROKEN # define FUNC_UNGETC_BROKEN 0 #endif int main (int argc, char **argv _GL_UNUSED) { int ch; /* Assume stdin is seekable iff argc > 1. */ if (argc == 1) { ASSERT (ftell (stdin) == -1); ASSERT (ftello (stdin) == -1); return 0; } /* mingw ftell is unreliable on text mode input. */ SET_BINARY (0); /* Simple tests. For each test, make sure ftell and ftello agree. */ ASSERT (ftell (stdin) == 0); ASSERT (ftello (stdin) == 0); ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 1); ASSERT (ftello (stdin) == 1); /* Test ftell after ungetc of read input. */ ch = ungetc ('#', stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 0); ASSERT (ftello (stdin) == 0); ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ftell (stdin) == 1); ASSERT (ftello (stdin) == 1); /* Test ftell after fseek. */ ASSERT (fseek (stdin, 2, SEEK_SET) == 0); ASSERT (ftell (stdin) == 2); ASSERT (ftello (stdin) == 2); /* Test ftell after random ungetc. */ ch = fgetc (stdin); ASSERT (ch == '/'); ch = ungetc ('@', stdin); ASSERT (ch == '@'); ASSERT (ftell (stdin) == 2); ASSERT (ftello (stdin) == 2); ch = fgetc (stdin); ASSERT (ch == '@'); ASSERT (ftell (stdin) == 3); ASSERT (ftello (stdin) == 3); if (2 < argc) { if (FUNC_UNGETC_BROKEN) { fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", stderr); return 77; } /* Test ftell after ungetc without read. */ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0); ASSERT (ftell (stdin) == 3); ASSERT (ftello (stdin) == 3); ch = ungetc ('~', stdin); ASSERT (ch == '~'); ASSERT (ftell (stdin) == 2); ASSERT (ftello (stdin) == 2); } #if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */ /* Test ftell beyond end of file. */ ASSERT (fseek (stdin, 0, SEEK_END) == 0); ch = ftello (stdin); ASSERT (fseek (stdin, 10, SEEK_END) == 0); ASSERT (ftell (stdin) == ch + 10); ASSERT (ftello (stdin) == ch + 10); #endif return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-unsetenv.c�����������������������������������������������0000664�0000000�0000000�00000003375�12166360012�017020� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Tests of unsetenv. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake <ebb9@byu.net>, 2009. */ #include <config.h> #include <stdlib.h> #include "signature.h" SIGNATURE_CHECK (unsetenv, int, (char const *)); #include <errno.h> #include <string.h> #include <unistd.h> #include "macros.h" int main (void) { char entry[] = "b=2"; /* Test removal when multiple entries present. */ ASSERT (putenv ((char *) "a=1") == 0); ASSERT (putenv (entry) == 0); entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */ ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */ ASSERT (getenv ("a") == NULL); ASSERT (unsetenv ("a") == 0); /* Required to fail with EINVAL. */ errno = 0; ASSERT (unsetenv ("") == -1); ASSERT (errno == EINVAL); errno = 0; ASSERT (unsetenv ("a=b") == -1); ASSERT (errno == EINVAL); #if 0 /* glibc and gnulib's implementation guarantee this, but POSIX no longer requires it: http://austingroupbugs.net/view.php?id=185 */ errno = 0; ASSERT (unsetenv (NULL) == -1); ASSERT (errno == EINVAL); #endif return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-snprintf.c�����������������������������������������������0000664�0000000�0000000�00000003722�12166360012�017010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of snprintf() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...)); #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { char buf[8]; int size; int retval; retval = snprintf (NULL, 0, "%d", 12345); ASSERT (retval == 5); for (size = 0; size <= 8; size++) { memcpy (buf, "DEADBEEF", 8); retval = snprintf (buf, size, "%d", 12345); ASSERT (retval == 5); if (size < 6) { if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); } #if !CHECK_SNPRINTF_POSIX if (size > 0) #endif ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } /* Test the support of the POSIX/XSI format strings with positions. */ { char result[100]; retval = snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); ASSERT (strcmp (result, "55 33") == 0); ASSERT (retval == strlen (result)); } return 0; } ����������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-binary-io.c����������������������������������������������0000664�0000000�0000000�00000002630�12166360012�017033� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of binary mode I/O. Copyright (C) 2005, 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2005. */ #include <config.h> #include "binary-io.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "macros.h" int main () { /* Test the O_BINARY macro. */ { int fd = open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600); if (write (fd, "Hello\n", 6) < 0) exit (1); close (fd); } { struct stat statbuf; if (stat ("t-bin-out2.tmp", &statbuf) < 0) exit (1); ASSERT (statbuf.st_size == 6); } /* Test the SET_BINARY macro. */ SET_BINARY (1); fputs ("Hello\n", stdout); return 0; } ��������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude2.sh����������������������������������������������0000775�0000000�0000000�00000002461�12166360012�017052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2009-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 cat > in <<EOT foo* bar Baz EOT # Test case-insensitive literal matches cat > expected <<EOT foo: 0 foo*: 1 bar: 1 foobar: 0 baz: 1 bar/qux: 0 EOT test-exclude -casefold in -- foo 'foo*' bar foobar baz bar/qux > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fprintf-posix3.c�����������������������������������������0000664�0000000�0000000�00000006336�12166360012�020044� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of POSIX compatible fprintf() function. Copyright (C) 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 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2009. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #if HAVE_GETRLIMIT && HAVE_SETRLIMIT # include <sys/types.h> # include <sys/time.h> # include <sys/resource.h> #endif #include "resource-ext.h" /* Test against a memory leak in the fprintf replacement. */ /* Number of iterations across the loop. */ #define NUM_ROUNDS 1000 /* Number of bytes that are allowed to escape per round. */ #define MAX_ALLOC_ROUND 10000 /* Number of bytes that are allowed to escape in total. This should be at least 10 MB, since it includes the normal memory or address space of the test program. */ #define MAX_ALLOC_TOTAL (NUM_ROUNDS * MAX_ALLOC_ROUND) int main (int argc, char *argv[]) { uintptr_t initial_rusage_as; int arg; int result; /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less. */ /* On AIX systems, malloc() is limited by RLIMIT_DATA. */ #if HAVE_GETRLIMIT && HAVE_SETRLIMIT && defined RLIMIT_DATA { struct rlimit limit; if (getrlimit (RLIMIT_DATA, &limit) >= 0) { if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL) limit.rlim_max = MAX_ALLOC_TOTAL; limit.rlim_cur = limit.rlim_max; (void) setrlimit (RLIMIT_DATA, &limit); } } #endif /* On all systems except AIX and OpenBSD, malloc() is limited by RLIMIT_AS. On some systems, setrlimit of RLIMIT_AS doesn't work but get_rusage_as () does. Allow the address space size to grow by at most MAX_ALLOC_TOTAL. */ initial_rusage_as = get_rusage_as (); #if !defined _AIX if (initial_rusage_as == 0) return 77; #endif arg = atoi (argv[1]); if (arg == 0) { void *memory = malloc (MAX_ALLOC_TOTAL); if (memory == NULL) return 1; memset (memory, 17, MAX_ALLOC_TOTAL); result = 78; } else { /* Perform the test and test whether it triggers a permanent memory allocation of more than MAX_ALLOC_TOTAL bytes. */ int repeat; for (repeat = 0; repeat < NUM_ROUNDS; repeat++) { /* This may produce a temporary memory allocation of 11000 bytes. but should not result in a permanent memory allocation. */ if (fprintf (stdout, "%011000d\n", 17) == -1 && errno == ENOMEM) return 1; } result = 0; } if (get_rusage_as () > initial_rusage_as + MAX_ALLOC_TOTAL) return 1; return result; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-bitrotate.c����������������������������������������������0000664�0000000�0000000�00000036414�12166360012�017146� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <bitrotate.h> substitute. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */ #include <config.h> #include "bitrotate.h" #include "macros.h" int main (void) { ASSERT (rotl8 (42, 0) == 42); ASSERT (rotl8 (42, 1) == 84); ASSERT (rotl8 (42, 2) == 168); ASSERT (rotl8 (42, 3) == 81); ASSERT (rotl8 (42, 4) == 162); ASSERT (rotl8 (42, 5) == 69); ASSERT (rotl8 (42, 6) == 138); ASSERT (rotl8 (42, 7) == 21); ASSERT (rotl8 (42, 8) == 42); ASSERT (rotr8 (42, 0) == 42); ASSERT (rotr8 (42, 1) == 21); ASSERT (rotr8 (42, 2) == 138); ASSERT (rotr8 (42, 3) == 69); ASSERT (rotr8 (42, 4) == 162); ASSERT (rotr8 (42, 5) == 81); ASSERT (rotr8 (42, 6) == 168); ASSERT (rotr8 (42, 7) == 84); ASSERT (rotr8 (42, 8) == 42); ASSERT (rotl16 (43981, 0) == 43981); ASSERT (rotl16 (43981, 1) == 22427); ASSERT (rotl16 (43981, 2) == 44854); ASSERT (rotl16 (43981, 3) == 24173); ASSERT (rotl16 (43981, 4) == 48346); ASSERT (rotl16 (43981, 5) == 31157); ASSERT (rotl16 (43981, 6) == 62314); ASSERT (rotl16 (43981, 7) == 59093); ASSERT (rotl16 (43981, 8) == 52651); ASSERT (rotl16 (43981, 9) == 39767); ASSERT (rotl16 (43981, 10) == 13999); ASSERT (rotl16 (43981, 11) == 27998); ASSERT (rotl16 (43981, 12) == 55996); ASSERT (rotl16 (43981, 13) == 46457); ASSERT (rotl16 (43981, 14) == 27379); ASSERT (rotl16 (43981, 15) == 54758); ASSERT (rotl16 (43981, 16) == 43981); ASSERT (rotr16 (43981, 0) == 43981); ASSERT (rotr16 (43981, 1) == 54758); ASSERT (rotr16 (43981, 2) == 27379); ASSERT (rotr16 (43981, 3) == 46457); ASSERT (rotr16 (43981, 4) == 55996); ASSERT (rotr16 (43981, 5) == 27998); ASSERT (rotr16 (43981, 6) == 13999); ASSERT (rotr16 (43981, 7) == 39767); ASSERT (rotr16 (43981, 8) == 52651); ASSERT (rotr16 (43981, 9) == 59093); ASSERT (rotr16 (43981, 10) == 62314); ASSERT (rotr16 (43981, 11) == 31157); ASSERT (rotr16 (43981, 12) == 48346); ASSERT (rotr16 (43981, 13) == 24173); ASSERT (rotr16 (43981, 14) == 44854); ASSERT (rotr16 (43981, 15) == 22427); ASSERT (rotr16 (43981, 16) == 43981); ASSERT (rotl32 (2309737967U, 1) == 324508639U); ASSERT (rotl32 (2309737967U, 2) == 649017278U); ASSERT (rotl32 (2309737967U, 3) == 1298034556U); ASSERT (rotl32 (2309737967U, 4) == 2596069112U); ASSERT (rotl32 (2309737967U, 5) == 897170929U); ASSERT (rotl32 (2309737967U, 6) == 1794341858U); ASSERT (rotl32 (2309737967U, 7) == 3588683716U); ASSERT (rotl32 (2309737967U, 8) == 2882400137U); ASSERT (rotl32 (2309737967U, 9) == 1469832979U); ASSERT (rotl32 (2309737967U, 10) == 2939665958U); ASSERT (rotl32 (2309737967U, 11) == 1584364621U); ASSERT (rotl32 (2309737967U, 12) == 3168729242U); ASSERT (rotl32 (2309737967U, 13) == 2042491189U); ASSERT (rotl32 (2309737967U, 14) == 4084982378U); ASSERT (rotl32 (2309737967U, 15) == 3874997461U); ASSERT (rotl32 (2309737967U, 16) == 3455027627U); ASSERT (rotl32 (2309737967U, 17) == 2615087959U); ASSERT (rotl32 (2309737967U, 18) == 935208623U); ASSERT (rotl32 (2309737967U, 19) == 1870417246U); ASSERT (rotl32 (2309737967U, 20) == 3740834492U); ASSERT (rotl32 (2309737967U, 21) == 3186701689U); ASSERT (rotl32 (2309737967U, 22) == 2078436083U); ASSERT (rotl32 (2309737967U, 23) == 4156872166U); ASSERT (rotl32 (2309737967U, 24) == 4018777037U); ASSERT (rotl32 (2309737967U, 25) == 3742586779U); ASSERT (rotl32 (2309737967U, 26) == 3190206263U); ASSERT (rotl32 (2309737967U, 27) == 2085445231U); ASSERT (rotl32 (2309737967U, 28) == 4170890462U); ASSERT (rotl32 (2309737967U, 29) == 4046813629U); ASSERT (rotl32 (2309737967U, 30) == 3798659963U); ASSERT (rotl32 (2309737967U, 31) == 3302352631U); ASSERT (rotr32 (2309737967U, 1) == 3302352631lU); ASSERT (rotr32 (2309737967U, 2) == 3798659963lU); ASSERT (rotr32 (2309737967U, 3) == 4046813629lU); ASSERT (rotr32 (2309737967U, 4) == 4170890462lU); ASSERT (rotr32 (2309737967U, 5) == 2085445231lU); ASSERT (rotr32 (2309737967U, 6) == 3190206263lU); ASSERT (rotr32 (2309737967U, 7) == 3742586779lU); ASSERT (rotr32 (2309737967U, 8) == 4018777037lU); ASSERT (rotr32 (2309737967U, 9) == 4156872166lU); ASSERT (rotr32 (2309737967U, 10) == 2078436083lU); ASSERT (rotr32 (2309737967U, 11) == 3186701689lU); ASSERT (rotr32 (2309737967U, 12) == 3740834492lU); ASSERT (rotr32 (2309737967U, 13) == 1870417246lU); ASSERT (rotr32 (2309737967U, 14) == 935208623lU); ASSERT (rotr32 (2309737967U, 15) == 2615087959lU); ASSERT (rotr32 (2309737967U, 16) == 3455027627lU); ASSERT (rotr32 (2309737967U, 17) == 3874997461lU); ASSERT (rotr32 (2309737967U, 18) == 4084982378lU); ASSERT (rotr32 (2309737967U, 19) == 2042491189lU); ASSERT (rotr32 (2309737967U, 20) == 3168729242lU); ASSERT (rotr32 (2309737967U, 21) == 1584364621lU); ASSERT (rotr32 (2309737967U, 22) == 2939665958lU); ASSERT (rotr32 (2309737967U, 23) == 1469832979lU); ASSERT (rotr32 (2309737967U, 24) == 2882400137lU); ASSERT (rotr32 (2309737967U, 25) == 3588683716lU); ASSERT (rotr32 (2309737967U, 26) == 1794341858lU); ASSERT (rotr32 (2309737967U, 27) == 897170929lU); ASSERT (rotr32 (2309737967U, 28) == 2596069112lU); ASSERT (rotr32 (2309737967U, 29) == 1298034556lU); ASSERT (rotr32 (2309737967U, 30) == 649017278lU); ASSERT (rotr32 (2309737967U, 31) == 324508639lU); #ifdef UINT64_MAX ASSERT (rotl64 (16045690984503098046ULL, 1) == 13644637895296644477ULL); ASSERT (rotl64 (16045690984503098046ULL, 2) == 8842531716883737339ULL); ASSERT (rotl64 (16045690984503098046ULL, 3) == 17685063433767474678ULL); ASSERT (rotl64 (16045690984503098046ULL, 4) == 16923382793825397741ULL); ASSERT (rotl64 (16045690984503098046ULL, 5) == 15400021513941243867ULL); ASSERT (rotl64 (16045690984503098046ULL, 6) == 12353298954172936119ULL); ASSERT (rotl64 (16045690984503098046ULL, 7) == 6259853834636320623ULL); ASSERT (rotl64 (16045690984503098046ULL, 8) == 12519707669272641246ULL); ASSERT (rotl64 (16045690984503098046ULL, 9) == 6592671264835730877ULL); ASSERT (rotl64 (16045690984503098046ULL, 10) == 13185342529671461754ULL); ASSERT (rotl64 (16045690984503098046ULL, 11) == 7923940985633371893ULL); ASSERT (rotl64 (16045690984503098046ULL, 12) == 15847881971266743786ULL); ASSERT (rotl64 (16045690984503098046ULL, 13) == 13249019868823935957ULL); ASSERT (rotl64 (16045690984503098046ULL, 14) == 8051295663938320299ULL); ASSERT (rotl64 (16045690984503098046ULL, 15) == 16102591327876640598ULL); ASSERT (rotl64 (16045690984503098046ULL, 16) == 13758438582043729581ULL); ASSERT (rotl64 (16045690984503098046ULL, 17) == 9070133090377907547ULL); ASSERT (rotl64 (16045690984503098046ULL, 18) == 18140266180755815094ULL); ASSERT (rotl64 (16045690984503098046ULL, 19) == 17833788287802078573ULL); ASSERT (rotl64 (16045690984503098046ULL, 20) == 17220832501894605531ULL); ASSERT (rotl64 (16045690984503098046ULL, 21) == 15994920930079659447ULL); ASSERT (rotl64 (16045690984503098046ULL, 22) == 13543097786449767279ULL); ASSERT (rotl64 (16045690984503098046ULL, 23) == 8639451499189982943ULL); ASSERT (rotl64 (16045690984503098046ULL, 24) == 17278902998379965886ULL); ASSERT (rotl64 (16045690984503098046ULL, 25) == 16111061923050380157ULL); ASSERT (rotl64 (16045690984503098046ULL, 26) == 13775379772391208699ULL); ASSERT (rotl64 (16045690984503098046ULL, 27) == 9104015471072865783ULL); ASSERT (rotl64 (16045690984503098046ULL, 28) == 18208030942145731566ULL); ASSERT (rotl64 (16045690984503098046ULL, 29) == 17969317810581911517ULL); ASSERT (rotl64 (16045690984503098046ULL, 30) == 17491891547454271419ULL); ASSERT (rotl64 (16045690984503098046ULL, 31) == 16537039021198991223ULL); ASSERT (rotl64 (16045690984503098046ULL, 32) == 14627333968688430831ULL); ASSERT (rotl64 (16045690984503098046ULL, 33) == 10807923863667310047ULL); ASSERT (rotl64 (16045690984503098046ULL, 34) == 3169103653625068479ULL); ASSERT (rotl64 (16045690984503098046ULL, 35) == 6338207307250136958ULL); ASSERT (rotl64 (16045690984503098046ULL, 36) == 12676414614500273916ULL); ASSERT (rotl64 (16045690984503098046ULL, 37) == 6906085155290996217ULL); ASSERT (rotl64 (16045690984503098046ULL, 38) == 13812170310581992434ULL); ASSERT (rotl64 (16045690984503098046ULL, 39) == 9177596547454433253ULL); ASSERT (rotl64 (16045690984503098046ULL, 40) == 18355193094908866506ULL); ASSERT (rotl64 (16045690984503098046ULL, 41) == 18263642116108181397ULL); ASSERT (rotl64 (16045690984503098046ULL, 42) == 18080540158506811179ULL); ASSERT (rotl64 (16045690984503098046ULL, 43) == 17714336243304070743ULL); ASSERT (rotl64 (16045690984503098046ULL, 44) == 16981928412898589871ULL); ASSERT (rotl64 (16045690984503098046ULL, 45) == 15517112752087628127ULL); ASSERT (rotl64 (16045690984503098046ULL, 46) == 12587481430465704639ULL); ASSERT (rotl64 (16045690984503098046ULL, 47) == 6728218787221857663ULL); ASSERT (rotl64 (16045690984503098046ULL, 48) == 13456437574443715326ULL); ASSERT (rotl64 (16045690984503098046ULL, 49) == 8466131075177879037ULL); ASSERT (rotl64 (16045690984503098046ULL, 50) == 16932262150355758074ULL); ASSERT (rotl64 (16045690984503098046ULL, 51) == 15417780227001964533ULL); ASSERT (rotl64 (16045690984503098046ULL, 52) == 12388816380294377451ULL); ASSERT (rotl64 (16045690984503098046ULL, 53) == 6330888686879203287ULL); ASSERT (rotl64 (16045690984503098046ULL, 54) == 12661777373758406574ULL); ASSERT (rotl64 (16045690984503098046ULL, 55) == 6876810673807261533ULL); ASSERT (rotl64 (16045690984503098046ULL, 56) == 13753621347614523066ULL); ASSERT (rotl64 (16045690984503098046ULL, 57) == 9060498621519494517ULL); ASSERT (rotl64 (16045690984503098046ULL, 58) == 18120997243038989034ULL); ASSERT (rotl64 (16045690984503098046ULL, 59) == 17795250412368426453ULL); ASSERT (rotl64 (16045690984503098046ULL, 60) == 17143756751027301291ULL); ASSERT (rotl64 (16045690984503098046ULL, 61) == 15840769428345050967ULL); ASSERT (rotl64 (16045690984503098046ULL, 62) == 13234794782980550319ULL); ASSERT (rotl64 (16045690984503098046ULL, 63) == 8022845492251549023ULL); ASSERT (rotr64 (16045690984503098046ULL, 1) == 8022845492251549023ULL); ASSERT (rotr64 (16045690984503098046ULL, 2) == 13234794782980550319ULL); ASSERT (rotr64 (16045690984503098046ULL, 3) == 15840769428345050967ULL); ASSERT (rotr64 (16045690984503098046ULL, 4) == 17143756751027301291ULL); ASSERT (rotr64 (16045690984503098046ULL, 5) == 17795250412368426453ULL); ASSERT (rotr64 (16045690984503098046ULL, 6) == 18120997243038989034ULL); ASSERT (rotr64 (16045690984503098046ULL, 7) == 9060498621519494517ULL); ASSERT (rotr64 (16045690984503098046ULL, 8) == 13753621347614523066ULL); ASSERT (rotr64 (16045690984503098046ULL, 9) == 6876810673807261533ULL); ASSERT (rotr64 (16045690984503098046ULL, 10) == 12661777373758406574ULL); ASSERT (rotr64 (16045690984503098046ULL, 11) == 6330888686879203287ULL); ASSERT (rotr64 (16045690984503098046ULL, 12) == 12388816380294377451ULL); ASSERT (rotr64 (16045690984503098046ULL, 13) == 15417780227001964533ULL); ASSERT (rotr64 (16045690984503098046ULL, 14) == 16932262150355758074ULL); ASSERT (rotr64 (16045690984503098046ULL, 15) == 8466131075177879037ULL); ASSERT (rotr64 (16045690984503098046ULL, 16) == 13456437574443715326ULL); ASSERT (rotr64 (16045690984503098046ULL, 17) == 6728218787221857663ULL); ASSERT (rotr64 (16045690984503098046ULL, 18) == 12587481430465704639ULL); ASSERT (rotr64 (16045690984503098046ULL, 19) == 15517112752087628127ULL); ASSERT (rotr64 (16045690984503098046ULL, 20) == 16981928412898589871ULL); ASSERT (rotr64 (16045690984503098046ULL, 21) == 17714336243304070743ULL); ASSERT (rotr64 (16045690984503098046ULL, 22) == 18080540158506811179ULL); ASSERT (rotr64 (16045690984503098046ULL, 23) == 18263642116108181397ULL); ASSERT (rotr64 (16045690984503098046ULL, 24) == 18355193094908866506ULL); ASSERT (rotr64 (16045690984503098046ULL, 25) == 9177596547454433253ULL); ASSERT (rotr64 (16045690984503098046ULL, 26) == 13812170310581992434ULL); ASSERT (rotr64 (16045690984503098046ULL, 27) == 6906085155290996217ULL); ASSERT (rotr64 (16045690984503098046ULL, 28) == 12676414614500273916ULL); ASSERT (rotr64 (16045690984503098046ULL, 29) == 6338207307250136958ULL); ASSERT (rotr64 (16045690984503098046ULL, 30) == 3169103653625068479ULL); ASSERT (rotr64 (16045690984503098046ULL, 31) == 10807923863667310047ULL); ASSERT (rotr64 (16045690984503098046ULL, 32) == 14627333968688430831ULL); ASSERT (rotr64 (16045690984503098046ULL, 33) == 16537039021198991223ULL); ASSERT (rotr64 (16045690984503098046ULL, 34) == 17491891547454271419ULL); ASSERT (rotr64 (16045690984503098046ULL, 35) == 17969317810581911517ULL); ASSERT (rotr64 (16045690984503098046ULL, 36) == 18208030942145731566ULL); ASSERT (rotr64 (16045690984503098046ULL, 37) == 9104015471072865783ULL); ASSERT (rotr64 (16045690984503098046ULL, 38) == 13775379772391208699ULL); ASSERT (rotr64 (16045690984503098046ULL, 39) == 16111061923050380157ULL); ASSERT (rotr64 (16045690984503098046ULL, 40) == 17278902998379965886ULL); ASSERT (rotr64 (16045690984503098046ULL, 41) == 8639451499189982943ULL); ASSERT (rotr64 (16045690984503098046ULL, 42) == 13543097786449767279ULL); ASSERT (rotr64 (16045690984503098046ULL, 43) == 15994920930079659447ULL); ASSERT (rotr64 (16045690984503098046ULL, 44) == 17220832501894605531ULL); ASSERT (rotr64 (16045690984503098046ULL, 45) == 17833788287802078573ULL); ASSERT (rotr64 (16045690984503098046ULL, 46) == 18140266180755815094ULL); ASSERT (rotr64 (16045690984503098046ULL, 47) == 9070133090377907547ULL); ASSERT (rotr64 (16045690984503098046ULL, 48) == 13758438582043729581ULL); ASSERT (rotr64 (16045690984503098046ULL, 49) == 16102591327876640598ULL); ASSERT (rotr64 (16045690984503098046ULL, 50) == 8051295663938320299ULL); ASSERT (rotr64 (16045690984503098046ULL, 51) == 13249019868823935957ULL); ASSERT (rotr64 (16045690984503098046ULL, 52) == 15847881971266743786ULL); ASSERT (rotr64 (16045690984503098046ULL, 53) == 7923940985633371893ULL); ASSERT (rotr64 (16045690984503098046ULL, 54) == 13185342529671461754ULL); ASSERT (rotr64 (16045690984503098046ULL, 55) == 6592671264835730877ULL); ASSERT (rotr64 (16045690984503098046ULL, 56) == 12519707669272641246ULL); ASSERT (rotr64 (16045690984503098046ULL, 57) == 6259853834636320623ULL); ASSERT (rotr64 (16045690984503098046ULL, 58) == 12353298954172936119ULL); ASSERT (rotr64 (16045690984503098046ULL, 59) == 15400021513941243867ULL); ASSERT (rotr64 (16045690984503098046ULL, 60) == 16923382793825397741ULL); ASSERT (rotr64 (16045690984503098046ULL, 61) == 17685063433767474678ULL); ASSERT (rotr64 (16045690984503098046ULL, 62) == 8842531716883737339ULL); ASSERT (rotr64 (16045690984503098046ULL, 63) == 13644637895296644477ULL); #endif /* UINT64_MAX */ return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-exclude8.sh����������������������������������������������0000775�0000000�0000000�00000002402�12166360012�017053� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Test suite for exclude. # Copyright (C) 2010-2012 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # 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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ . fail=0 # Test escaped metacharacters. cat > in <<'EOT' f\*e b[a\*]r EOT cat > expected <<'EOT' f*e: 1 file: 0 bar: 1 EOT test-exclude -wildcards in -- 'f*e' 'file' 'bar' > out || exit $? # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr # does not understand '\r'. case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac # normalize output LC_ALL=C tr -d "$cr" < out > k && mv k out compare expected out || fail=1 Exit $fail ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbrtowc.c������������������������������������������������0000664�0000000�0000000�00000025103�12166360012�016617� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of conversion of multibyte character to wide character. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t, mbstate_t *)); #include <locale.h> #include <stdio.h> #include <string.h> #include "macros.h" int main (int argc, char *argv[]) { mbstate_t state; wchar_t wc; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Test zero-length input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "x", 0, &state); /* gnulib's implementation returns (size_t)(-2). The AIX 5.1 implementation returns (size_t)(-1). glibc's implementation returns 0. */ ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0); ASSERT (mbsinit (&state)); } /* Test NUL byte input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "", 1, &state); ASSERT (ret == 0); ASSERT (wc == 0); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, "", 1, &state); ASSERT (ret == 0); ASSERT (mbsinit (&state)); } /* Test single-byte input. */ { int c; char buf[1]; memset (&state, '\0', sizeof (mbstate_t)); for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ buf[0] = c; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, buf, 1, &state); ASSERT (ret == 1); ASSERT (wc == c); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, buf, 1, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); break; } } /* Test special calling convention, passing a NULL pointer. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, NULL, 5, &state); ASSERT (ret == 0); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { char input[] = "B\374\337er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\374'); ASSERT (mbsinit (&state)); input[1] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\337'); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; case '2': /* Locale encoding is UTF-8. */ { char input[] = "B\303\274\303\237er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 5, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[2] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 3, 4, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 4, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 6, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; case '3': /* Locale encoding is EUC-JP. */ { char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 4, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[4] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 1, &state); ASSERT (ret == 1); ASSERT (wc == '>'); ASSERT (mbsinit (&state)); } return 0; case '4': /* Locale encoding is GB18030. */ { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 7, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[2] = '\0'; /* Test support of NULL first argument. */ ret = mbrtowc (NULL, input + 3, 6, &state); ASSERT (ret == 4); ASSERT (mbsinit (&state)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 6, &state); ASSERT (ret == 4); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 8, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; } return 1; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-argv-iter.c����������������������������������������������0000664�0000000�0000000�00000005764�12166360012�017055� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test argv iterator Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Jim Meyering. */ #include <config.h> #include "argv-iter.h" #include <stdio.h> #include <string.h> #include "macros.h" #define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) #define STREQ(a, b) (strcmp (a, b) == 0) static FILE * write_nul_delimited_argv (char **argv) { FILE *fp = tmpfile (); ASSERT (fp); while (*argv) { size_t len = strlen (*argv) + 1; ASSERT (fwrite (*argv, len, 1, fp) == 1); argv++; } ASSERT (fflush (fp) == 0); rewind (fp); return fp; } int main (void) { /* set_program_name (argv[0]); placate overzealous "syntax-check" test. */ static char one[] = "1"; static char two[] = "2"; static char three[] = "3"; static char *av[][4] = { {NULL}, {one, NULL}, {one, two, NULL}, {one, two, three, NULL} }; int use_stream; for (use_stream = 0; use_stream < 2; use_stream++) { size_t i; for (i = 0; i < ARRAY_CARDINALITY (av); i++) { FILE *fp; struct argv_iterator *ai; size_t n_found = 0; if (use_stream) { /* Generate an identical list to be read via FP. */ ASSERT ((fp = write_nul_delimited_argv (av[i])) != NULL); ai = argv_iter_init_stream (fp); } else { fp = NULL; ai = argv_iter_init_argv (av[i]); } ASSERT (ai); while (1) { enum argv_iter_err ai_err; char *s = argv_iter (ai, &ai_err); ASSERT ((i == n_found) == (ai_err == AI_ERR_EOF)); ASSERT ((s == NULL) ^ (ai_err == AI_ERR_OK)); ASSERT (ai_err == AI_ERR_OK || ai_err == AI_ERR_EOF); if (ai_err == AI_ERR_OK) ++n_found; if (ai_err == AI_ERR_EOF) break; /* In stream mode, the strings are equal, but in argv mode the actual pointers are equal. */ ASSERT (use_stream ? STREQ (s, av[i][n_found - 1]) : s == av[i][n_found - 1]); } ASSERT (argv_iter_n_args (ai) == i); argv_iter_free (ai); if (fp) ASSERT (fclose (fp) == 0); } } return 0; } ������������id-utils-4.6+git20120811/gnulib-tests/test-vasnprintf.c���������������������������������������������0000664�0000000�0000000�00000004335�12166360012�017340� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of vasnprintf() and asnprintf() functions. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> #include "vasnprintf.h" #include <stdarg.h> #include <stdlib.h> #include <string.h> #include "macros.h" static void test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...)) { char buf[8]; int size; for (size = 0; size <= 8; size++) { size_t length = size; char *result = my_asnprintf (NULL, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); free (result); } for (size = 0; size <= 8; size++) { size_t length; char *result; memcpy (buf, "DEADBEEF", 8); length = size; result = my_asnprintf (buf, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); if (size < 6) ASSERT (result != buf); ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); if (result != buf) free (result); } } static char * my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *ret; va_start (args, format); ret = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return ret; } static void test_vasnprintf () { test_function (my_asnprintf); } static void test_asnprintf () { test_function (asnprintf); } int main (int argc, char *argv[]) { test_vasnprintf (); test_asnprintf (); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-fseeko.c�������������������������������������������������0000664�0000000�0000000�00000004574�12166360012�016427� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of fseeko() function. Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ #include <config.h> /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include <stdio.h> #include "signature.h" SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int)); #include "macros.h" #ifndef FUNC_UNGETC_BROKEN # define FUNC_UNGETC_BROKEN 0 #endif int main (int argc, char **argv _GL_UNUSED) { /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' iff argc > 1. */ int expected = argc > 1 ? 0 : -1; /* Exit with success only if fseek/fseeko agree. */ int r1 = fseeko (stdin, 0, SEEK_CUR); int r2 = fseek (stdin, 0, SEEK_CUR); ASSERT (r1 == r2 && r1 == expected); if (argc > 1) { /* Test that fseek discards previously read ungetc data. */ int ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ungetc (ch, stdin) == ch); ASSERT (fseeko (stdin, 2, SEEK_SET) == 0); ch = fgetc (stdin); ASSERT (ch == '/'); if (2 < argc) { if (FUNC_UNGETC_BROKEN) { fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", stderr); return 77; } /* Test that fseek discards random ungetc data. */ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff)); } ASSERT (fseeko (stdin, 0, SEEK_END) == 0); ASSERT (fgetc (stdin) == EOF); /* Test that fseek resets end-of-file marker. */ ASSERT (feof (stdin)); ASSERT (fseeko (stdin, 0, SEEK_END) == 0); ASSERT (!feof (stdin)); } return 0; } ������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-mbsinit.c������������������������������������������������0000664�0000000�0000000�00000002676�12166360012�016621� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of test for initial conversion state. Copyright (C) 2008-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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */ #include <config.h> #include <wchar.h> #include "signature.h" SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *)); #include <locale.h> #include "macros.h" int main (int argc, char *argv[]) { static mbstate_t state; ASSERT (mbsinit (NULL)); ASSERT (mbsinit (&state)); if (argc > 1) { static const char input[1] = "\303"; wchar_t wc; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (!mbsinit (&state)); } return 0; } ������������������������������������������������������������������id-utils-4.6+git20120811/gnulib-tests/test-stdint.c�������������������������������������������������0000664�0000000�0000000�00000026176�12166360012�016462� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Test of <stdint.h> substitute. 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 <http://www.gnu.org/licenses/>. */ /* Written by Bruno Haible <bruno@clisp.org>, 2006. */ #include <config.h> /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 #include <stdint.h> #include "verify.h" #include "intprops.h" #if __GNUC__ >= 2 && DO_PEDANTIC # define verify_same_types(expr1,expr2) \ extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ extern void _verify_func(__LINE__) (__typeof__ (expr2) *); # define _verify_func(line) _verify_func2(line) # define _verify_func2(line) verify_func_ ## line #else # define verify_same_types(expr1,expr2) extern void verify_func (int) #endif /* 7.18.1.1. Exact-width integer types */ /* 7.18.2.1. Limits of exact-width integer types */ int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; verify (TYPE_MINIMUM (int8_t) == INT8_MIN); verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); verify_same_types (INT8_MIN, (int8_t) 0 + 0); verify_same_types (INT8_MAX, (int8_t) 0 + 0); int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; verify (TYPE_MINIMUM (int16_t) == INT16_MIN); verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); verify_same_types (INT16_MIN, (int16_t) 0 + 0); verify_same_types (INT16_MAX, (int16_t) 0 + 0); int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; verify (TYPE_MINIMUM (int32_t) == INT32_MIN); verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); verify_same_types (INT32_MIN, (int32_t) 0 + 0); verify_same_types (INT32_MAX, (int32_t) 0 + 0); #ifdef INT64_MAX int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; verify (TYPE_MINIMUM (int64_t) == INT64_MIN); verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); verify_same_types (INT64_MIN, (int64_t) 0 + 0); verify_same_types (INT64_MAX, (int64_t) 0 + 0); #endif uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); #ifdef UINT64_MAX uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); #endif #if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX /* ok */ #else err or; #endif #if UINT8_MAX && UINT16_MAX && UINT32_MAX /* ok */ #else err or; #endif /* 7.18.1.2. Minimum-width integer types */ /* 7.18.2.2. Limits of minimum-width integer types */ int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); #ifdef INT_LEAST64_MAX int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); #endif uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); #ifdef UINT_LEAST64_MAX uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); #endif #if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX /* ok */ #else err or; #endif #if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* 7.18.2.3. Limits of fastest minimum-width integer types */ int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); #ifdef INT_FAST64_MAX int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); #endif uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); #ifdef UINT_FAST64_MAX uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); #endif #if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX /* ok */ #else err or; #endif #if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.4. Integer types capable of holding object pointers */ /* 7.18.2.4. Limits of integer types capable of holding object pointers */ intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); uintptr_t h[2] = { 17, UINTPTR_MAX }; verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); #if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX /* ok */ #else err or; #endif /* 7.18.1.5. Greatest-width integer types */ /* 7.18.2.5. Limits of greatest-width integer types */ intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); /* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in the preprocessor. */ #if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) #if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX /* ok */ #else err or; #endif #endif /* 7.18.3. Limits of other integer types */ #include <stddef.h> verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); #if PTRDIFF_MIN && PTRDIFF_MAX /* ok */ #else err or; #endif #include <signal.h> verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); #if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX /* ok */ #else err or; #endif verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); verify_same_types (SIZE_MAX, (size_t) 0 + 0); #if SIZE_MAX /* ok */ #else err or; #endif #if HAVE_WCHAR_T verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); # if WCHAR_MIN != 17 && WCHAR_MAX /* ok */ # else err or; # endif #endif #if HAVE_WINT_T # include <wchar.h> verify (TYPE_MINIMUM (wint_t) == WINT_MIN); verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); verify_same_types (WINT_MIN, (wint_t) 0 + 0); verify_same_types (WINT_MAX, (wint_t) 0 + 0); # if WINT_MIN != 17 && WINT_MAX /* ok */ # else err or; # endif #endif /* 7.18.4. Macros for integer constants */ verify (INT8_C (17) == 17); verify_same_types (INT8_C (17), (int_least8_t)0 + 0); verify (UINT8_C (17) == 17); verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); verify (INT16_C (17) == 17); verify_same_types (INT16_C (17), (int_least16_t)0 + 0); verify (UINT16_C (17) == 17); verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); verify (INT32_C (17) == 17); verify_same_types (INT32_C (17), (int_least32_t)0 + 0); verify (UINT32_C (17) == 17); verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); #ifdef INT64_C verify (INT64_C (17) == 17); verify_same_types (INT64_C (17), (int_least64_t)0 + 0); #endif #ifdef UINT64_C verify (UINT64_C (17) == 17); verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); #endif verify (INTMAX_C (17) == 17); verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); verify (UINTMAX_C (17) == 17); verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); int main (void) { return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465164�012151� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/idutils.texi�����������������������������������������������������������0000664�0000000�0000000�00000133741�12210464625�014533� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @comment %**start of header @setfilename idutils.info @settitle ID database utilities @comment %**end of header @include version.texi @c Define new indices for file names and options. @defcodeindex fl @defcodeindex op @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fl cp @syncodeindex fn cp @syncodeindex ky cp @syncodeindex op cp @syncodeindex pg cp @syncodeindex vr cp @dircategory Development @ifinfo @format START-INFO-DIR-ENTRY * ID utilities: (idutils). Indexing and searching utilities. * mkid: (idutils)mkid invocation. Creating an ID database. * lid: (idutils)lid invocation. Matching words and patterns. * fid: (idutils)fid invocation. Listing a file's tokens. * gid: (idutils)gid invocation. Token-based grep. * fnid: (idutils)fnid invocation. Looking up file names. * xtokid: (idutils)xtokid invocation. Testing mkid scanners. END-INFO-DIR-ENTRY @end format @end ifinfo @copying This file documents the @file{idutils} database utilities. Copyright @copyright{} 1996, 1999-2000, 2008-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License'' in the Emacs manual. This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license. @end quotation @end copying @titlepage @title ID database utilities @subtitle Programs for simple, fast, high-capacity cross-referencing @subtitle for version @value{VERSION} @author Greg McGary @author Tom Horsley @end titlepage @c ************* gkm ********************************************************* @node Top @top ID utilities This manual documents version @value{VERSION} of the ID utilities. @menu * Introduction:: Overview of the tools with tutorial. * Quick start:: Quick start procedure. * Common options:: Common command-line options. * mkid invocation:: Creating an ID database. * lid invocation:: Querying an ID database by token. * fid invocation:: Listing a file's tokens. * gid invocation:: Token-based grep * fnid invocation:: Looking up file names. * xtokid invocation:: Testing language scanners. * Past and Future:: History and future directions. * Index:: General index. @end menu @c ************* gkm ********************************************************* @node Introduction @chapter Introduction @cindex overview @cindex introduction @cindex ID database, definition of An @dfn{ID database} is a binary file containing a list of file names, a list of tokens, and a sparse matrix indicating which tokens appear in which files. With this database and some tools to query it (described in this manual), many text-searching tasks become simpler and faster. For example, you can list all files that reference a particular @code{#include} file throughout a huge source hierarchy, search for all the memos containing references to a project, or automatically invoke an editor on all files containing references to some function or variable. Anyone with a large software project to maintain, or a large set of text files to organize, can benefit from the ID utilities. Although the name `ID' is short for `identifier', the ID utilities handle more than just identifiers; they also treat other kinds of tokens, most notably numeric constants, and the contents of certain character strings. Thus, this manual will use the word @dfn{token} as a term that is inclusive of identifiers, numbers and strings. There are several programs in the ID utilities family: @table @file @item mkid scans files for tokens and builds the ID database file. @item lid queries the ID database for tokens, then reports matching file names or matching lines. @item fid lists all tokens recorded in the database for given files, or tokens common to two files. @item fnid matches the file names in the database, rather than the tokens. @item xtokid extracts raw tokens---helps with testing of new @file{mkid} scanners. @end table In addition, the ID utilities have historically provided several query programs which are specializations of @file{lid}: @table @file @item gid (alias for @samp{lid -R grep}) lists all lines containing the requested pattern. @item eid (alias for @samp{lid -R edit}) invokes an editor on all files containing the requested pattern, and if possible, initiates a text search for that pattern. @item aid (alias for @samp{lid -ils}) treats the requested pattern as a case-insensitive literal substring. @end table @cindex bugs, reporting Please report bugs to @samp{bug-idutils@@gnu.org}. Remember to include the version number, machine architecture, input files, and any other information needed to reproduce the bug: your input, what you expected, what you got, and why it is wrong. Diffs are welcome, but please include a description of the problem as well, since this is sometimes difficult to infer. @xref{Bugs, , , gcc, GNU CC}. @c ************* gkm ********************************************************* @node Quick start @chapter Quick Start Procedure @itemize @bullet Unpack the distribution. Type @file{./configure} Type @samp{make} Type @samp{make install} as a user with the appropriate privileges (e.g., @samp{bin} or perhaps even @samp{root}). Type @samp{cd /usr/include; mkid} to build an ID database covering all of the system header files. Type @samp{lid FILE}, then @samp{gid strtok}, then @samp{aid stdout}. @end itemize You have just built, installed and used the most common commands of the GNU ID utilities. If you ever need help remembering which system header files contain a particular declaration, or reference a particular symbol, you'll want to keep the ID file you built in @file{/usr/include} for later use. If your working directory is elsewhere at the time, simply provide the @samp{-f /usr/include} option to @file{lid} (@pxref{Reading options}). @c ************* gkm ********************************************************* @node Common options @chapter Common command-line options @cindex common command-line options Certain options, and regular expression syntax, are shared by various groupings of the ID utilities. We describe these in the sections below, rather than repeating them for each program. @menu * Universal options:: Options common to all programs. * Extraction options:: Options for programs that extract tokens from source files. * Walker options:: Options for programs that walk file and directory trees. * Reading options:: Options for programs that read ID databases. * Writing options:: Options for programs that write ID databases. * File listing options:: Options for programs that list file names. @end menu @c ************* gkm ********************************************************* @node Universal options @section Options Common to All Programs @table @samp @item --help @opindex --help @cindex help, online Print a usage message listing all available options, then exit successfully. @item --version @opindex --version @cindex version number, finding Print the version number, then exit successfully. @end table @c ************* gkm ********************************************************* @node Reading options @section Options for Programs that Read ID Databases @table @samp @item -f @var{filename} @itemx --file=@var{filename} @opindex -f @opindex --file @cindex ID database file name @var{Filename} is the ID database to read when processing queries. At present, only a single @samp{--file} option is processed, but in future releases, more than one ID database may be named on the command line. @item $IDPATH @cindex ID database file name @samp{IDPATH} is an environment variable that contains a colon-separated list of ID database names. If this variable is present, and no @samp{--file} options are presented on the command line, the ID databases named in @samp{IDPATH} are implied.@footnote{At present, this feature isn't fully implemented, since only the first of a list of ID database names is processed.} @end table If no ID databases are specified either on the command line or via the @samp{IDPATH} environment variable, then the ID utilities search for a file named @file{ID} in the current working directory, and then in successive parent directories. @c ************* gkm ********************************************************* @node Writing options @section Options for Programs that Write ID Databases @table @samp @item -o @var{filename} @itemx --output=@var{filename} @opindex -o @opindex --output @cindex ID database file name The @samp{--output} option names the file in which to write a new ID database. If no @samp{--output} (or @samp{--file}) option is present, an output file named @file{ID} is implied. @item -f @var{filename} @itemx --file=@var{filename} @opindex -f @opindex --file @cindex ID database file name This is a synonym for @samp{--output} @end table @c ************* gkm ********************************************************* @node Walker options @section Options for Programs that Walk File and Directory Trees. The programs @file{mkid} and @file{xtokid} accept the names of files and directories on the command line. Files are scanned if there is a scanner available and enabled for the file's source language. Directories are recursively descended, searching for files whose names match the rules listed in the @emph{language map} file (@pxref{Language map}). The following option controls the file tree walker: @table @samp @item -p @var{names} @itemx --prune=@var{names} @opindex -p @opindex --prune @cindex file tree pruning One or more file or directory names may appear in @var{names}. The file tree walker will stop short at these files and directories and their contents will not be scanned. @item --files0-from=@var{FILE} @opindex --files0-from=@var{FILE} Rather than processing files named on the command line, process those named in file @var{FILE}; each name is terminated by a null byte. This is useful when the list of file names is so long that it may exceed a command line length limitation. One way to produce a list of null-byte-terminated file names is with @sc{gnu} @command{find}, using its @option{-print0} predicate. Do not specify any @var{FILE} on the command line when using this option. @end table @c ************* gkm ********************************************************* @node File listing options @section Options for Programs that List File Names The programs @file{lid} and @file{fnid} can print lists of file names as the result of queries. The following option controls how these lists are formatted: @table @samp @item -S @var{style} @itemx --separator=@var{style} @opindex -S @opindex --separator @cindex file name separator @var{Style} may be one of @samp{braces}, @samp{space} or @samp{newline}. The @var{style} of @samp{braces} means that file names with common directory prefix and common suffix are printed using the shell's brace notation in order to compress the output. For example, @file{../src/foo.c ../src/bar.c} can be printed in brace notation as @file{../src/@{foo,bar@}.c}. The @var{style}s of @samp{space} and @samp{newline} mean that file names are separated spaces or by newlines, respectively. If the list of files is being printed on a terminal, brace notation is the default. If not, file names are separated by spaces if the @var{key} is included in the output, and by newlines the @var{key style} is @samp{none} (@pxref{lid invocation}). @end table @c ************* gkm ********************************************************* @node Extraction options @section Options for Programs that Scan Source Files @file{mkid} and @file{xtokid} walk file trees, select source files by name, and extract tokens from source files. They accept the following options: @table @samp @item -m @var{mapfile} @itemx --lang-map=@var{mapfile} @opindex -m @opindex --lang-map @cindex language map file @var{mapfile} contains rules for determining the source languages from file names. @xref{Language map}. @item -i @var{languages} @itemx --include=@var{languages} @opindex -i @opindex --include @cindex include languages The @samp{--include} option names @var{languages} whose source files should be scanned and incorporated into the ID database. By default, all languages known to the ID utilities are enabled. @item -x @var{languages} @itemx --exclude=@var{languages} @opindex -x @opindex --exclude @cindex exclude languages The @samp{--exclude} option names @var{languages} whose source files should @var{not} be scanned. The default list of excluded languages is empty. Note that only one of @samp{--include} or @samp{--exclude} may be specified on the command line for a single run. @item -l @var{language}:@var{options} @itemx --lang-option=@var{language}:@var{options} @opindex -l @opindex --lang-option @cindex language-specific option Language-specific scanners also accept options. @var{Language} denotes the desired scanner, and @var{option} is the command-line option that should be passed through to it. For example, to pass the @var{-x foo --coke-bottle} options to the scanner for the language @var{swizzle}, use one of the next two forms, or a mixture of both: @example $ mkid -l swizzle:"-x foo" -l swizzle:--coke-bottle $ mkid --lang-option=swizzle:"-x foo" --lang-option=swizzle:--coke-bottle @end example Note the use of quotes when passing an option with arguments. Quoting is optional for options without arguments. Use the @samp{--help} option to see the command-line option summary for each language. @end table @cindex scanners To determine which tokens to extract from a file and store in the database, @file{mkid} calls a @dfn{scanner}; we say a scanner @dfn{recognizes} a particular language. Scanners for several languages are built-in to @file{mkid}; you can add your own scanners as well, as explained in @ref{Defining scanners}. The ID utilities determine which scanner to use for a particular file by consulting the language-map file. Scanners for several are already built-in to the ID utilities. You can see which languages have built-in scanners, and examine their language-specific options by invoking @samp{mkid --help} or @samp{xtokid --help}. @menu * Language map:: Mapping file names to source languages. * C Cpp Java scanner:: For the C, C++ and Java programming languages. * Assembler scanner:: For assembly language. * Text scanner:: For documents or other non-source code. * Perl scanner:: For Perl language (experimental). * Lisp scanner:: For the Lisp language (experimental). * Defining scanners:: Defining new scanners in the source code. @end menu @c ************* gkm ********************************************************* @node Language map @subsection Mapping file names to source languages The file @file{id-lang.map}, installed by default in @file{$(prefix)/share/id-lang.map}, contains rules for mapping file names to source languages. Each rule comprises three parts: a shell @var{glob} pattern, a language name, and language-specific scanner options. The special pattern @samp{**} denotes the default source language. This is the language that's assigned to file names that don't match any other pattern. The special pattern @samp{***} should be followed by a file name. The named file should contain more language-map rules and is included at this point. The order in which rules are presented in a language-map file is significant. This order influences the order in which files are displayed as the result of queries. For example, the distributed language-map file places all rules for C @var{.h} files ahead of @var{.c} files, so that in general, declarations will precede definitions in query output. The same thing is done for C++ and its many different source file name extensions. Here is a pared-down version of the @file{id-lang.map} file distributed with the ID utilities: @example # Default language ** IGNORE # Although this is listed first, # the default language pattern is # logically matched last. # Backup files *~ IGNORE *.bak IGNORE *.bk[0-9] IGNORE # SCCS files [sp].* IGNORE # list header files before code files *.h C *.h.in C *.H C++ *.hh C++ *.hpp C++ *.hxx C++ # list C `meta' files next *.l C *.lex C *.y C *.yacc C # list C code files after header files *.c C *.C C++ *.cc C++ *.cpp C++ *.cxx C++ # list assembly language after C *.[sS] asm --comment=; *.asm asm --comment=; # [nt]roff *.[0-9] roff *.ms roff *.me roff *.mm roff # TeX and friends *.tex TeX *.ltx TeX *.texi texinfo *.texinfo texinfo @end example @c ************* gkm ********************************************************* @node C Cpp Java scanner @subsection C Cpp Java Language Scanner @cindex C scanner, predefined The C scanner is the most commonly used. Files that match the glob pattern @file{*.h}, @file{*.c}, as well as @file{yacc} files that match @file{*.y} or @file{*.yacc}, and @file{lex} files that match @file{*.l} or @file{*.lex}, are processed with this scanner. Scanner-specific options (Note, these options are presented @var{without} the required @samp{-l} or @samp{--lang-option=} prefix): @table @samp @item -k @var{character-class} @itemx --keep=@var{character-class} @opindex -k @opindex --keep @opindex -l C:-k @opindex -l C:--keep @opindex --lang-option=C:-k @opindex --lang-option=C:--keep Consider the characters in @var{character-class} as valid constituents of identifier names. For example, if you are indexing C code that contains @samp{$} in some of its identifiers, you can include these by using @samp{--lang-option=C:--keep=$}, or @samp{-l C:"-k $"} (if you don't like to type so much). @item -i @var{character-class} @itemx --ignore=@var{character-class} @opindex -i @opindex --ignore @opindex -l C:-i @opindex -l C:--ignore @opindex --lang-option=C:-i @opindex --lang-option=C:--ignore Consider the characters in @var{character-class} as valid constituents of identifier names, but discard all tokens containing these characters. For example, if some C code has identifiers containing @samp{$}, but you don't want these cluttering up your ID database, use @samp{--lang-option=C:--ignore=$}, or the terser equivalent @samp{-l C:"-i $"}. @item -u @itemx --strip-underscore @opindex -u @opindex --strip-underscore @opindex -l C:-u @opindex -l C:--strip-underscore @opindex --lang-option=C:-u @opindex --lang-option=C:--strip-underscore Strip one leading underscore from C identifiers encapsulated as character strings. This option is useful if you are indexing C code that contains symbol-table name strings for systems that prepend an underscore to external symbols. By default, the leading underscore is retained. @end table @c ************* gkm ********************************************************* @node Assembler scanner @subsection Assembly Language Scanner @cindex assembler scanner @cindex assembly language scanner Assembly languages use a variety of commenting conventions, and allow a variety of special characters to @emph{dirty up} local symbols, preventing name space conflicts with symbols defined by higher-level languages. Also, some compilation systems prepend an underscore to external symbols. The options listed below are designed to address these differences. @table @samp @item -c @var{character-class} @itemx --comment=@var{character-class} @opindex -c @opindex --comment @opindex -l asm:-c @opindex -l asm:--comment @opindex --lang-option=asm:-c @opindex --lang-option=asm:--comment The characters in @var{character-class} are considered left delimiters for comments that extend until the end of the current line. @item -k @var{character-class} @itemx --keep=@var{character-class} @opindex -k @opindex --keep @opindex -l asm:-k @opindex -l asm:--keep @opindex --lang-option=asm:-k @opindex --lang-option=asm:--keep Consider the characters of @var{character-class} as valid constituents of identifier names. For example, if you are indexing assembly code that prepends @samp{.} to assembler directives, and prepends @samp{%} to register names, you can keep these characters in the tokens by specifying @samp{--lang-option=asm:--keep=.%}, or @samp{-l asm:"-k .%"}. @item -i @var{character-class} @itemx --ignore=@var{character-class} @opindex -i @opindex --ignore @opindex -l asm:-i @opindex -l asm:--ignore @opindex --lang-option=asm:-i @opindex --lang-option=asm:--ignore Consider the characters of @var{character-class} as valid constituents of identifier names, but discard all tokens containing these characters. For example, if you don't want to clutter your ID database with assembler directives that begin with a leading @samp{.} or with assembler labels that contain @samp{@@}, use @samp{--lang-option=asm:--ignore=.@@}, or @samp{-l asm:"-i .@@"}. @item -u @itemx --strip-underscore @opindex -u @opindex --strip-underscore @opindex -l asm:-u @opindex -l asm:--strip-underscore @opindex --lang-option=asm:-u @opindex --lang-option=asm:--strip-underscore Strip one leading underscore from identifiers. This option is useful if your compilation system prepends an underscore to external symbols. By stripping the underscore, you can canonicalize such names and bring them into conformance the way they are expressed in the C language. By default, the leading underscore is retained. @item -n @itemx --no-cpp @opindex -n @opindex --no-cpp @opindex -l asm:-n @opindex -l asm:--no-cpp @opindex --lang-option=asm:-n @opindex --lang-option=asm:--no-cpp Do not recognize C preprocessor directives. By default, such lines are handled in the same way as they are by the C language scanner. @end table @c ************* gkm ********************************************************* @node Text scanner @subsection Text Scanner @cindex text scanner The plain text scanner is intended for human-language documents, or as the scanner of last resort for files that have no scanner that is more specific. It is customizable to the extent that character classes can be designated as token constituents or as token delimiters. The default token constituents are the alpha-numerics; all other characters are considered token delimiters. @table @samp @item -i @var{character-class} @itemx --include=@var{character-class} @opindex -i @opindex --include @opindex -l text:-i @opindex -l text:--include @opindex --lang-option=text:-i @opindex --lang-option=text:--include Include characters belonging to @var{character-class} in tokens. @item -x @var{character-class} @itemx --exclude=@var{character-class} @opindex -x @opindex --exclude @opindex -l text:-x @opindex -l text:--exclude @opindex --lang-option=text:-x @opindex --lang-option=text:--exclude Exclude characters belonging to @var{character-class} from tokens, i.e., treat them as token delimiters. @end table @c ************* gkm ********************************************************* @node Perl scanner @subsection Perl Scanner @cindex perl scanner (EXPERIMENTAL) The perl scanner is intended for perl-language documents. Tokens are all words, Perl Keywords are included. Comments & string declarations are ignored, as well as the documentation. It is customizable to the extent that character classes can be designated as token constituents or as token delimiters. The default token constituents are the alpha-numerics; all other characters are considered token delimiters. Perl support has been originally written by Madhu Gogulapati. This scanner is considered experimental; please report any problems you should encounter to @samp{bug-idutils@@gnu.org} . @table @samp @item -i @var{character-class} @itemx --include=@var{character-class} @opindex -i @opindex --include @opindex -l perl:-i @opindex -l perl:--include @opindex --lang-option=perl:-i @opindex --lang-option=perl:--include Include characters belonging to @var{character-class} in tokens. @item -x @var{character-class} @itemx --exclude=@var{character-class} @opindex -x @opindex --exclude @opindex -l perl:-x @opindex -l perl:--exclude @opindex --lang-option=perl:-x @opindex --lang-option=perl:--exclude Exclude characters belonging to @var{character-class} from tokens, i.e., treat them as token delimiters. @item -d @itemx --dtags @opindex -d @opindex --dtags @opindex -l asm:-d @opindex -l asm:--dtags @opindex --lang-option=perl:-d @opindex --lang-option=perl:--dtags Include tokens from the documentation. By default, the tokens in the documentation are ignored. @end table @c ************* gkm ********************************************************* @node Lisp scanner @subsection Lisp Scanner @cindex lisp scanner (EXPERIMENTAL) The lisp scanner has been originally written by Edouard G. Parmelan, and after many years it was posthumously integrated with the main idutils code. It is intended for Lisp and Emacs Lisp files (.lisp, .el, .elc, .scm). No options are currently available for this scanner. This scanner is considered experimental; please report any problems you should encounter to @samp{bug-idutils@@gnu.org} . @c ************* gkm ********************************************************* @node Defining scanners @subsection Defining New Scanners in the Source Code @flindex scanners.c @cindex scanners, defining in source code @vindex languages_0 To add a new scanner in source code, you should add a new section to the file @file{scanners.c}. It might be easiest to clone one of the existing scanners and modify it as necessary. For the hypothetical language @var{foo}, you must define the functions @code{get_token_foo}, @code{parse_args_foo}, @code{help_me_foo}, as well as the tables @code{long_options_foo} and @code{args_foo}. If your scanner is modeled after one of the existing scanners, you'll also need a character-attribute table @code{ctype_foo}. This is not a terribly difficult programming task, but it requires recompiling and installing the new version of @file{mkid} and @file{xtokid}. You should use @file{xtokid} to test the operation of the new scanner. Once these functions and tables are ready, add function prototypes and an entry to the @code{languages_0} table near the beginning of the file. Be warned that the existing scanners are built for speed, not elegance or readability. You might wish to create a new scanner that's easier to read and understand if you don't feel that speed is so important. @c ************* gkm ********************************************************* @node mkid invocation @chapter @samp{mkid}: Creating an ID Database @cindex creating databases @cindex databases, creating @cindex ID file format @cindex architecture-independence @cindex sharing ID files @file{mkid} builds an ID database. It accepts the names of files and/or directories on the command line, selects files that have an enabled scanner, then extracts and stores tokens from those files. The resulting ID database is architecture- and byte-order-independent so it can be shared among all systems. The primary virtues of @file{mkid} are speed and high capacity. The size of the source trees it can index is limited only by available system memory. @file{mkid}'s indexing algorithm is very space-efficient and exhibits excellent locality-of-reference, and so is capable of operating with a working-set size that is only half the size of its virtual address space. A typical @sc{unix}-like operating system with 16 megabytes of system memory should be able to build an ID database covering approximately 12,000-14,000 source files totaling approximately 50--100 Megabytes. A 66 MHz 486 computer can build such a large ID database in approximately 10-15 minutes. @pindex cron In a future release, @file{mkid} will be able to incrementally update an ID database much faster than it can build one from scratch. Until this feature becomes available, it might be a good idea to schedule a @file{cron} job to regularly update large ID databases during off-hours. @file{mkid} writes the ID file, therefore it accepts the @samp{--output} (and @samp{--file}) options as described in @ref{Writing options}. @file{mkid} extracts tokens from source files, therefore it accepts the @samp{--lang-map}, @samp{--include}, @samp{--exclude}, and @samp{--lang-option} options, as well as the language-specific scanner options, all of which are described in @ref{Extraction options}. @file{mkid} walks file trees, therefore it handles file and directory names on its command line and the @samp{--prune} option as described in @ref{Walker options}. In addition, @file{mkid} accepts the following command-line options: @table @samp @item -s @itemx --statistics @opindex -s @opindex --statistics @cindex statistics @file{mkid} reports statistics about resource usage at the end of its run. @item -v @itemx --verbose @opindex -v @opindex --verbose @cindex @file{mkid} progress @file{mkid} reports statistics about each file as it is scanned, and about the resource usage of its indexing algorithm at regular intervals. @end table @c ************* gkm ********************************************************* @node lid invocation @chapter @code{lid}: Querying an ID Database by Token The @file{lid} program accepts @var{patterns} on the command line which it matches against the tokens stored in an ID database. The interpretation of a @var{pattern} is determined by the makeup of the @var{pattern} string itself, or can be overridden by command-line options. If a @var{pattern} contains regular expression meta-characters, it is used to perform a regular-expression substring search. If no such meta-characters are present, @var{pattern} is used to perform a literal word search. (By default, all searches are sensitive to alphabetic case.) If no @var{pattern} is supplied on the command line, @file{lid} lists every entry in the ID database. @file{lid} reads the ID database, therefore it accepts the @samp{--file} option, and consults the @samp{IDPATH} environment variable, as described in @ref{Reading options}. @file{lid} lists file names, therefore it accepts the @samp{--separator} option, as described in @ref{File listing options}. In addition, @code{lid} accepts the following command-line options: @table @samp @item -i @itemx --ignore-case @opindex -i @opindex --ignore-case @cindex alphabetic case, ignoring differences in @cindex ignoring differences in alphabetic case Ignoring differences in alphabetic case between the @var{pattern} and the tokens in the ID database. @item -l @itemx --literal @opindex -l @opindex --literal Match @var{pattern} as a literal string. Use this option if @var{pattern} contains regular-expression meta-characters, but you don't wish to perform a regular-expression search. @item -r @itemx --regexp @opindex -r @opindex --regexp Match @var{pattern} as an @emph{extended} regular expression@footnote{Extended regular expressions are the same as those accepted by @file{egrep}.}. Use this option if no regular-expression expression meta-characters are present in @var{pattern}, but you wish to force a regular-expression search (note: in this case, a @emph{literal substring} search might be faster). @item -w @itemx --word @opindex -w @opindex --word Match @var{pattern} using a word-delimited (non substring) search. This is the default for literal searches. @item -s @itemx --substring @opindex -s @opindex --substring Match @var{pattern} using a substring (non word-delimited) search. This is the default for regular expression searches. @item -k @var{style} @itemx --key=@var{style} @opindex -k @opindex --substring @var{Style} can be one of @samp{token}, @samp{pattern} or @samp{none}. This option controls how the subject of the query is presented. This is best illustrated by example: @example $ lid --key=token '^dest.' destaddr libsys/memcpy.c destination libsys/regex.c destlst libsys/rx.c destpos libsys/rx.c destset libsys/rx.h libsys/rx.c $ lid --key=pattern '^dest.' ^dest. libsys/rx.h libsys/@{memcpy,regex,rx@}.c $ lid --key=none '^dest.' libsys/rx.h libsys/@{memcpy,regex,rx@}.c @end example When @samp{--key} is either @samp{token} or @samp{pattern}, the first column of output is a @var{token} or @var{pattern}, respectively. When @samp{--key} is @samp{none}, neither of these is printed, and the file name list begins immediately. The default is @samp{token}. @item -R @var{style} @itemx --result=@var{style} @opindex -R @opindex --result @var{Style} can be one of @samp{filenames}, @samp{grep}, @samp{edit} or @samp{none}. This option controls how the value associated with the query's @var{key} presented. When @var{style} is @samp{filenames}, a list of file names is printed (this is the default). When @var{style} is @samp{grep}, the lines that match @var{pattern} are printed in the same format as @samp{egrep -n}. When @var{style} is @samp{edit}, the file names are passed to an editor, and if possible @var{pattern} is passed as an initial search string (@pxref{eid invocation}). When @var{style} is @samp{none}, the file names are not processed in any way. This can be useful if you wish to see what tokens match a @var{pattern}, but don't care about where they reside. @item -d @itemx -o @itemx -x @opindex -d @opindex -o @opindex -x @cindex radix of numeric matches, specifying @cindex numeric matches, specifying radix of These options may be used in any combination to specify the radix of numeric matches. @samp{-d} allows matching on decimal numbers, @samp{-o} on octal numbers, and @samp{-x} on hexadecimal numbers. Any combination of these options may be used. The default is to match all three radixes. @item -F @var{range} @itemx --frequency=@var{range} @opindex -F @opindex --frequency @cindex single matches, showing Match tokens whose occurrence count falls in @var{range}. @var{Range} may be expressed as a single number @var{n}, or as a range @var{n@code{..}m}. Either limit of the range may be omitted (e.g., @var{@code{..}m}, or @var{n..@code{..}}). If the lower limit @var{n} is omitted, it defaults to @code{1}. If the upper limit is omitted, it defaults in the present implementation to @code{65535}, the maximum value of an unsigned 16-bit integer. Particularly useful queries are @samp{lid -F1}, which helps locate identifiers that are defined but never used, or are used but never defined. Similarly, @code{lid -F2} can help find functions that possess a prototype declaration and a definition, but are never called. @item -a @var{number} @itemx --ambiguous=@var{number} @opindex -a @opindex --ambiguous @cindex ambiguous identifier names, finding List identifiers (not numbers) that are ambiguous for the first @var{number} characters. This feature might be in useful when porting programs to ancient pea-brained compilers that don't support long identifier names. However, the best long-term option is to set such systems on fire. @end table @menu * lid aliases:: Aliases for specialized lid queries * Emacs gid interface:: GNU Emacs query interface * eid invocation:: Invoking an editor on query results @end menu @c ************* gkm ********************************************************* @node lid aliases @section Aliases for Specialized @file{lid} Queries Historically, the ID utilities have provided several query interfaces which are specializations of @code{lid} (@pxref{lid invocation}). @table @file @item gid (alias for @samp{lid -R grep}) lists all lines containing the requested pattern. @item eid (alias for @samp{lid -R edit}) invokes an editor on all files containing the requested pattern, and optionally initiates a text search for that pattern. @item aid (alias for @samp{lid -ils}) treats the requested pattern as a case-insensitive literal substring. @end table @c *************************************************************************** @node Emacs gid interface @section GNU Emacs query interface @cindex Emacs interface to @code{gid} @flindex idutils.el @r{interface to Emacs} @vindex load-path The @code{idutils} source distribution comes with a file @file{idutils.el}, which defines a GNU Emacs interface to @code{gid}. To install it, put @file{idutils.el} somewhere that Emacs will find it (i.e., in your @code{load-path}) and put @example (autoload 'gid "id-utils" "Id Utilities; get id" t) @end example @noindent in one of Emacs' initialization files, e.g., @file{~/.emacs}. You will then be able to use @kbd{M-x gid} to run the command. @findex gid @r{Emacs function} The @code{gid} function prompts you with the word around point. If you want to search for something else, simply delete the line and type the pattern of interest. @flindex *compilation* @r{Emacs buffer} The function then runs the @code{gid} program in a @samp{*compilation*} buffer, so the normal @code{next-error} function can be used to visit all the places the identifier is found (@pxref{Compilation,,, emacs, The GNU Emacs Manual}). @c ************* gkm ********************************************************* @node eid invocation @section @code{eid}: Invoking an Editor on Query Results @pindex eid @samp{lid -R edit} is an editing interface for the ID utilities that is most commonly used with @file{vi}. Emacs users should use the interface defined in @code{idutils.el} (@pxref{Emacs gid interface}). The ID utilities include an alias called @file{eid}, and for the sake of brevity, we'll use this alias for the remainder of this section. @file{eid} performs a @file{lid}-style, then asks if you wish to edit the files. If your query yields more than one line of output, you will be prompted after each line. This is the prompt you'll see: @example Edit? [y1-9^S/nq] @end example @noindent You may respond with: @table @samp @item y Edit all files listed. @item 1@dots{}9 Edit all files starting at the @math{@var{n} + 1}'st file. @item /@var{string} @r{or} @kbd{CTRL-S}@var{regexp} Search into the file list, and begin editing with the first file name that matches the regular expression @var{regexp}. @item n Don't edit any files. If another line of query output is pending, advance to that line, for which another @samp{Edit?} prompt will appear. @item q Quit---don't edit any files, and don't process any more lines of query output. @end table Here is an example: @example prompt$ eid FILE \^print FILE @{ansi2knr,fid,filenames,idfile,idx,lid,misc,@dots{}@}.c Edit? [y1-9^S/nq] n ^print @{ansi2knr,fid,getopt,getopt1,lid,mkid,regex,scanners@}.c Edit? [y1-9^S/nq] 2 @end example @noindent This will start editing at @file{getopt}.c. @code{eid} invokes the editor defined by the environment variable @samp{VISUAL}. If @samp{VISUAL} is undefined, it uses the environment variable @samp{EDITOR} instead. If @samp{EDITOR} is undefined, it defaults to @file{vi}. It is possible for @file{eid} to pass the editor an initial search pattern so that your cursor will immediately alight on the token of interest. This feature is controlled by the following environment variables: @table @samp @item EIDARG @vindex EIDARG @cindex search for token, initial A printf(3) format string for the editor argument to search for the matching token. For @code{vi}, this should be @samp{+/%s/}. @item EIDLDEL @vindex EIDLDEL @cindex left delimiter editor argument @cindex beginning-of-word editor argument The regular-expression meta-character(s) for delimiting the beginning of a word (the `@file{eid} Left DELimiter'). @code{eid} inserts this in front of the matching token when a word-search is desired. For @file{vi}, this should be @samp{\<}. @item EIDRDEL @vindex EIDRDEL @cindex right delimiter editor argument @cindex end-of-word editor argument The regular-expression meta-character(s) for delimiting the end of a word (the `@file{eid} Right DELimiter'). @code{eid} inserts this in end of the matching token when a word-search is desired. For @file{vi}, this should be @samp{\>}. @end table @c ************* gkm ********************************************************* @node fid invocation @chapter @code{fid}: Listing a file's tokens @pindex fid @cindex tokens in a file @cindex tokens common to two files @file{fid} prints the tokens found in a given file. If two file names are passed on the command line, @file{fid} prints the tokens that are common to both files (i.e., the @emph{set intersection} of the two token sets). @file{fid} reads the ID database, therefore it accepts the @samp{--file} option, and consults the @samp{IDPATH} environment variable, as described in @ref{Reading options}. If the standard output is attached to a terminal, the printed tokens are separated by spaces. Otherwise, the tokens are printed one per line. @c ************* gkm ********************************************************* @node fnid invocation @chapter @code{fnid}: Looking up filenames @pindex fnid @cindex filenames, matching @cindex matching filenames @file{fnid} queries the list of file names stored in the ID database. It accepts shell @emph{wildcard} patterns on the command line. If no pattern is supplied, @file{*} is implied. @file{fnid} prints the file names that match the given patterns. @file{fnid} prints file names, and as such accepts the @samp{--separator} option as described in @ref{File listing options}. For example, the command: @example fnid \*.c @end example @noindent lists all the @file{.c} files in the database. (The @samp{\} here protects the @samp{*} from being expanded by the shell.) @c ************* gkm ********************************************************* @node gid invocation @chapter @code{gid}: Token-based grep @pindex gid @cindex searching files, grep @file{gid} lists each line containing one of the specified tokens. Running @command{gid} is equivalent to @samp{lid -R grep}) For example, the command: @example gid important_variable @end example @noindent lists each line of each file in the database that contains that token. @c ************* gkm ********************************************************* @node xtokid invocation @chapter @file{xtokid}: Testing Language Scanners @file{xtokid} accepts the names of files and/or directories on the command line, then extracts and prints a stream of tokens from those files for which it has a valid, enabled scanner. This is useful primarily for debugging new @file{mkid} scanners (@pxref{Defining scanners}). @file{xtokid} extracts tokens from source files, therefore it accepts the @samp{--lang-map}, @samp{--include}, @samp{--exclude}, and @samp{--lang-option} options, as well as the language-specific scanner options, all of which are described in @ref{Extraction options}. @file{xtokid} walks file trees, therefore it handles file and directory names on its command line and the @samp{--prune} option as described in @ref{Walker options}. The name @samp{xtokid} indicates that it is the ``eXtract TOKens ID utility''. @c ************* gkm ********************************************************* @node Past and Future @chapter Past and Future @cindex history @pindex look @r{and @file{mkid} 1} @cindex McGary, Greg Greg McGary conceived of the ideas behind the ID utilities when he began working on the Unix kernel in 1984. He needed a navigation tool to help him find his way around the expansive, unfamiliar landscape. The first @code{idutils}-like tools were shell scripts, and produced an ASCII database that looks much like the output of @samp{lid ".*"}. It took over an hour on a @sc{vax 11/750} to build a database for a @sc{4.1bsd} derived kernel. The first version of @file{lid} used the @sc{unix} system utility @code{look}, modified to handle very long lines. In 1986, Greg rewrote the shell scripts in C to improve performance. Build times for the ID file were shortened by an order of magnitude. The ID utilities were first posted to @samp{comp.sources.unix} in September 1987 under the name @code{id}. @cindex Horsley, Tom @cindex Scofield, Doug @cindex Leonard, Bill @cindex Berry, Karl Over the next few years, several versions diverged from the original source. Tom Horsley at Harris Computer Systems Division stepped forward to take over maintenance and integrated some of the fixes from divergent versions. A first release of the renamed @file{mkid} @w{version 2} was posted to @file{alt.sources} near the end of 1990. At that time, Tom wrote a Texinfo manual with the encouragement of the net community. (Tom especially thanks Doug Scofield and Bill Leonard whom he dragooned into helping proofread and edit---they found several problems in the initial version.) Karl Berry revamped the manual for Texinfo style, indexing, and organization in 1995. In January 1995, Greg McGary reemerged as the primary maintainer and launched development of @file{mkid} version 3, whose primary new feature is an efficient algorithm for building databases that is linear in both time and space over the size of the input text. (The old algorithm was quadratic in space so it was incapable of handling very large source trees.) For the first time, the code was released under the GNU Public License. In June 1996, the package was renamed again to @code{id-utils} and was released for the first time under FSF copyright as part of the GNU system. All programs had their command-line arguments completely revised. The @file{mkid} and @file{xtokid} programs also gained a file-tree walker, so that directory names can be passed on the command line instead of the names of every individual file. Greg reorganized and rewrote most of the Texinfo manual to reflect these changes. In 2006, Claudio Fontana modernized the build system and the code itself, and analyzed and integrated various pending patches. Package name had a minor change from @code{id-utils} to @code{idutils}, to be more consistent with the other GNU package names. @pindex cscope @pindex grep @cindex future Future releases of @code{idutils} might include: @itemize @bullet an optional coupling with GNU @code{grep}, so that @code{grep} can use an ID database for hints a @code{cscope} work-alike query interface incremental update of the ID database. @end itemize @c *************************************************************************** @node Index @unnumbered Index @printindex cp @contents @bye �������������������������������id-utils-4.6+git20120811/doc/version.texi�����������������������������������������������������������0000664�0000000�0000000�00000000136�12166360012�014525� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 1 January 2012 @set UPDATED-MONTH January 2012 @set EDITION 4.6 @set VERSION 4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/idutils.info�����������������������������������������������������������0000664�0000000�0000000�00000156313�12166360012�014510� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is idutils.info, produced by makeinfo version 4.11 from idutils.texi. INFO-DIR-SECTION Development START-INFO-DIR-ENTRY * ID utilities: (idutils). Indexing and searching utilities. * mkid: (idutils)mkid invocation. Creating an ID database. * lid: (idutils)lid invocation. Matching words and patterns. * fid: (idutils)fid invocation. Listing a file's tokens. * gid: (idutils)gid invocation. Token-based grep. * fnid: (idutils)fnid invocation. Looking up file names. * xtokid: (idutils)xtokid invocation. Testing mkid scanners. END-INFO-DIR-ENTRY This file documents the `idutils' database utilities. Copyright (C) 1996, 1999-2000, 2008-2012 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being "A GNU Manual", and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License" in the Emacs manual. (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license.  File: idutils.info, Node: Top, Next: Introduction, Up: (dir) ID utilities ************ This manual documents version 4.6 of the ID utilities. * Menu: * Introduction:: Overview of the tools with tutorial. * Quick start:: Quick start procedure. * Common options:: Common command-line options. * mkid invocation:: Creating an ID database. * lid invocation:: Querying an ID database by token. * fid invocation:: Listing a file's tokens. * gid invocation:: Token-based grep * fnid invocation:: Looking up file names. * xtokid invocation:: Testing language scanners. * Past and Future:: History and future directions. * Index:: General index.  File: idutils.info, Node: Introduction, Next: Quick start, Prev: Top, Up: Top 1 Introduction ************** An "ID database" is a binary file containing a list of file names, a list of tokens, and a sparse matrix indicating which tokens appear in which files. With this database and some tools to query it (described in this manual), many text-searching tasks become simpler and faster. For example, you can list all files that reference a particular `#include' file throughout a huge source hierarchy, search for all the memos containing references to a project, or automatically invoke an editor on all files containing references to some function or variable. Anyone with a large software project to maintain, or a large set of text files to organize, can benefit from the ID utilities. Although the name `ID' is short for `identifier', the ID utilities handle more than just identifiers; they also treat other kinds of tokens, most notably numeric constants, and the contents of certain character strings. Thus, this manual will use the word "token" as a term that is inclusive of identifiers, numbers and strings. There are several programs in the ID utilities family: `mkid' scans files for tokens and builds the ID database file. `lid' queries the ID database for tokens, then reports matching file names or matching lines. `fid' lists all tokens recorded in the database for given files, or tokens common to two files. `fnid' matches the file names in the database, rather than the tokens. `xtokid' extracts raw tokens--helps with testing of new `mkid' scanners. In addition, the ID utilities have historically provided several query programs which are specializations of `lid': `gid' (alias for `lid -R grep') lists all lines containing the requested pattern. `eid' (alias for `lid -R edit') invokes an editor on all files containing the requested pattern, and if possible, initiates a text search for that pattern. `aid' (alias for `lid -ils') treats the requested pattern as a case-insensitive literal substring. Please report bugs to `bug-idutils@gnu.org'. Remember to include the version number, machine architecture, input files, and any other information needed to reproduce the bug: your input, what you expected, what you got, and why it is wrong. Diffs are welcome, but please include a description of the problem as well, since this is sometimes difficult to infer. *Note Bugs: (gcc)Bugs.  File: idutils.info, Node: Quick start, Next: Common options, Prev: Introduction, Up: Top 2 Quick Start Procedure *********************** Unpack the distribution. Type `./configure' Type `make' Type `make install' as a user with the appropriate privileges (e.g., `bin' or perhaps even `root'). Type `cd /usr/include; mkid' to build an ID database covering all of the system header files. Type `lid FILE', then `gid strtok', then `aid stdout'. You have just built, installed and used the most common commands of the GNU ID utilities. If you ever need help remembering which system header files contain a particular declaration, or reference a particular symbol, you'll want to keep the ID file you built in `/usr/include' for later use. If your working directory is elsewhere at the time, simply provide the `-f /usr/include' option to `lid' (*note Reading options::).  File: idutils.info, Node: Common options, Next: mkid invocation, Prev: Quick start, Up: Top 3 Common command-line options ***************************** Certain options, and regular expression syntax, are shared by various groupings of the ID utilities. We describe these in the sections below, rather than repeating them for each program. * Menu: * Universal options:: Options common to all programs. * Extraction options:: Options for programs that extract tokens from source files. * Walker options:: Options for programs that walk file and directory trees. * Reading options:: Options for programs that read ID databases. * Writing options:: Options for programs that write ID databases. * File listing options:: Options for programs that list file names.  File: idutils.info, Node: Universal options, Next: Extraction options, Up: Common options 3.1 Options Common to All Programs ================================== `--help' Print a usage message listing all available options, then exit successfully. `--version' Print the version number, then exit successfully.  File: idutils.info, Node: Reading options, Next: Writing options, Prev: Walker options, Up: Common options 3.2 Options for Programs that Read ID Databases =============================================== `-f FILENAME' `--file=FILENAME' FILENAME is the ID database to read when processing queries. At present, only a single `--file' option is processed, but in future releases, more than one ID database may be named on the command line. `$IDPATH' `IDPATH' is an environment variable that contains a colon-separated list of ID database names. If this variable is present, and no `--file' options are presented on the command line, the ID databases named in `IDPATH' are implied.(1) If no ID databases are specified either on the command line or via the `IDPATH' environment variable, then the ID utilities search for a file named `ID' in the current working directory, and then in successive parent directories. ---------- Footnotes ---------- (1) At present, this feature isn't fully implemented, since only the first of a list of ID database names is processed.  File: idutils.info, Node: Writing options, Next: File listing options, Prev: Reading options, Up: Common options 3.3 Options for Programs that Write ID Databases ================================================ `-o FILENAME' `--output=FILENAME' The `--output' option names the file in which to write a new ID database. If no `--output' (or `--file') option is present, an output file named `ID' is implied. `-f FILENAME' `--file=FILENAME' This is a synonym for `--output'  File: idutils.info, Node: Walker options, Next: Reading options, Prev: Extraction options, Up: Common options 3.4 Options for Programs that Walk File and Directory Trees. ============================================================ The programs `mkid' and `xtokid' accept the names of files and directories on the command line. Files are scanned if there is a scanner available and enabled for the file's source language. Directories are recursively descended, searching for files whose names match the rules listed in the _language map_ file (*note Language map::). The following option controls the file tree walker: `-p NAMES' `--prune=NAMES' One or more file or directory names may appear in NAMES. The file tree walker will stop short at these files and directories and their contents will not be scanned. `--files0-from=FILE' Rather than processing files named on the command line, process those named in file FILE; each name is terminated by a null byte. This is useful when the list of file names is so long that it may exceed a command line length limitation. One way to produce a list of null-byte-terminated file names is with GNU `find', using its `-print0' predicate. Do not specify any FILE on the command line when using this option.  File: idutils.info, Node: File listing options, Prev: Writing options, Up: Common options 3.5 Options for Programs that List File Names ============================================= The programs `lid' and `fnid' can print lists of file names as the result of queries. The following option controls how these lists are formatted: `-S STYLE' `--separator=STYLE' STYLE may be one of `braces', `space' or `newline'. The STYLE of `braces' means that file names with common directory prefix and common suffix are printed using the shell's brace notation in order to compress the output. For example, `../src/foo.c ../src/bar.c' can be printed in brace notation as `../src/{foo,bar}.c'. The STYLEs of `space' and `newline' mean that file names are separated spaces or by newlines, respectively. If the list of files is being printed on a terminal, brace notation is the default. If not, file names are separated by spaces if the KEY is included in the output, and by newlines the KEY STYLE is `none' (*note lid invocation::).  File: idutils.info, Node: Extraction options, Next: Walker options, Prev: Universal options, Up: Common options 3.6 Options for Programs that Scan Source Files =============================================== `mkid' and `xtokid' walk file trees, select source files by name, and extract tokens from source files. They accept the following options: `-m MAPFILE' `--lang-map=MAPFILE' MAPFILE contains rules for determining the source languages from file names *Note Language map::. `-i LANGUAGES' `--include=LANGUAGES' The `--include' option names LANGUAGES whose source files should be scanned and incorporated into the ID database. By default, all languages known to the ID utilities are enabled. `-x LANGUAGES' `--exclude=LANGUAGES' The `--exclude' option names LANGUAGES whose source files should NOT be scanned. The default list of excluded languages is empty. Note that only one of `--include' or `--exclude' may be specified on the command line for a single run. `-l LANGUAGE:OPTIONS' `--lang-option=LANGUAGE:OPTIONS' Language-specific scanners also accept options. LANGUAGE denotes the desired scanner, and OPTION is the command-line option that should be passed through to it. For example, to pass the -X FOO -COKE-BOTTLE options to the scanner for the language SWIZZLE, use one of the next two forms, or a mixture of both: $ mkid -l swizzle:"-x foo" -l swizzle:--coke-bottle $ mkid --lang-option=swizzle:"-x foo" --lang-option=swizzle:--coke-bottle Note the use of quotes when passing an option with arguments. Quoting is optional for options without arguments. Use the `--help' option to see the command-line option summary for each language. To determine which tokens to extract from a file and store in the database, `mkid' calls a "scanner"; we say a scanner "recognizes" a particular language. Scanners for several languages are built-in to `mkid'; you can add your own scanners as well, as explained in *note Defining scanners::. The ID utilities determine which scanner to use for a particular file by consulting the language-map file. Scanners for several are already built-in to the ID utilities. You can see which languages have built-in scanners, and examine their language-specific options by invoking `mkid --help' or `xtokid --help'. * Menu: * Language map:: Mapping file names to source languages. * C Cpp Java scanner:: For the C, C++ and Java programming languages. * Assembler scanner:: For assembly language. * Text scanner:: For documents or other non-source code. * Perl scanner:: For Perl language (experimental). * Lisp scanner:: For the Lisp language (experimental). * Defining scanners:: Defining new scanners in the source code.  File: idutils.info, Node: Language map, Next: C Cpp Java scanner, Up: Extraction options 3.6.1 Mapping file names to source languages -------------------------------------------- The file `id-lang.map', installed by default in `$(prefix)/share/id-lang.map', contains rules for mapping file names to source languages. Each rule comprises three parts: a shell GLOB pattern, a language name, and language-specific scanner options. The special pattern `**' denotes the default source language. This is the language that's assigned to file names that don't match any other pattern. The special pattern `***' should be followed by a file name. The named file should contain more language-map rules and is included at this point. The order in which rules are presented in a language-map file is significant. This order influences the order in which files are displayed as the result of queries. For example, the distributed language-map file places all rules for C .H files ahead of .C files, so that in general, declarations will precede definitions in query output. The same thing is done for C++ and its many different source file name extensions. Here is a pared-down version of the `id-lang.map' file distributed with the ID utilities: # Default language ** IGNORE # Although this is listed first, # the default language pattern is # logically matched last. # Backup files *~ IGNORE *.bak IGNORE *.bk[0-9] IGNORE # SCCS files [sp].* IGNORE # list header files before code files *.h C *.h.in C *.H C++ *.hh C++ *.hpp C++ *.hxx C++ # list C `meta' files next *.l C *.lex C *.y C *.yacc C # list C code files after header files *.c C *.C C++ *.cc C++ *.cpp C++ *.cxx C++ # list assembly language after C *.[sS] asm --comment=; *.asm asm --comment=; # [nt]roff *.[0-9] roff *.ms roff *.me roff *.mm roff # TeX and friends *.tex TeX *.ltx TeX *.texi texinfo *.texinfo texinfo  File: idutils.info, Node: C Cpp Java scanner, Next: Assembler scanner, Prev: Language map, Up: Extraction options 3.6.2 C Cpp Java Language Scanner --------------------------------- The C scanner is the most commonly used. Files that match the glob pattern `*.h', `*.c', as well as `yacc' files that match `*.y' or `*.yacc', and `lex' files that match `*.l' or `*.lex', are processed with this scanner. Scanner-specific options (Note, these options are presented WITHOUT the required `-l' or `--lang-option=' prefix): `-k CHARACTER-CLASS' `--keep=CHARACTER-CLASS' Consider the characters in CHARACTER-CLASS as valid constituents of identifier names. For example, if you are indexing C code that contains `$' in some of its identifiers, you can include these by using `--lang-option=C:--keep=$', or `-l C:"-k $"' (if you don't like to type so much). `-i CHARACTER-CLASS' `--ignore=CHARACTER-CLASS' Consider the characters in CHARACTER-CLASS as valid constituents of identifier names, but discard all tokens containing these characters. For example, if some C code has identifiers containing `$', but you don't want these cluttering up your ID database, use `--lang-option=C:--ignore=$', or the terser equivalent `-l C:"-i $"'. `-u' `--strip-underscore' Strip one leading underscore from C identifiers encapsulated as character strings. This option is useful if you are indexing C code that contains symbol-table name strings for systems that prepend an underscore to external symbols. By default, the leading underscore is retained.  File: idutils.info, Node: Assembler scanner, Next: Text scanner, Prev: C Cpp Java scanner, Up: Extraction options 3.6.3 Assembly Language Scanner ------------------------------- Assembly languages use a variety of commenting conventions, and allow a variety of special characters to _dirty up_ local symbols, preventing name space conflicts with symbols defined by higher-level languages. Also, some compilation systems prepend an underscore to external symbols. The options listed below are designed to address these differences. `-c CHARACTER-CLASS' `--comment=CHARACTER-CLASS' The characters in CHARACTER-CLASS are considered left delimiters for comments that extend until the end of the current line. `-k CHARACTER-CLASS' `--keep=CHARACTER-CLASS' Consider the characters of CHARACTER-CLASS as valid constituents of identifier names. For example, if you are indexing assembly code that prepends `.' to assembler directives, and prepends `%' to register names, you can keep these characters in the tokens by specifying `--lang-option=asm:--keep=.%', or `-l asm:"-k .%"'. `-i CHARACTER-CLASS' `--ignore=CHARACTER-CLASS' Consider the characters of CHARACTER-CLASS as valid constituents of identifier names, but discard all tokens containing these characters. For example, if you don't want to clutter your ID database with assembler directives that begin with a leading `.' or with assembler labels that contain `@', use `--lang-option=asm:--ignore=.@', or `-l asm:"-i .@"'. `-u' `--strip-underscore' Strip one leading underscore from identifiers. This option is useful if your compilation system prepends an underscore to external symbols. By stripping the underscore, you can canonicalize such names and bring them into conformance the way they are expressed in the C language. By default, the leading underscore is retained. `-n' `--no-cpp' Do not recognize C preprocessor directives. By default, such lines are handled in the same way as they are by the C language scanner.  File: idutils.info, Node: Text scanner, Next: Perl scanner, Prev: Assembler scanner, Up: Extraction options 3.6.4 Text Scanner ------------------ The plain text scanner is intended for human-language documents, or as the scanner of last resort for files that have no scanner that is more specific. It is customizable to the extent that character classes can be designated as token constituents or as token delimiters. The default token constituents are the alpha-numerics; all other characters are considered token delimiters. `-i CHARACTER-CLASS' `--include=CHARACTER-CLASS' Include characters belonging to CHARACTER-CLASS in tokens. `-x CHARACTER-CLASS' `--exclude=CHARACTER-CLASS' Exclude characters belonging to CHARACTER-CLASS from tokens, i.e., treat them as token delimiters.  File: idutils.info, Node: Perl scanner, Next: Lisp scanner, Prev: Text scanner, Up: Extraction options 3.6.5 Perl Scanner ------------------ (EXPERIMENTAL) The perl scanner is intended for perl-language documents. Tokens are all words, Perl Keywords are included. Comments & string declarations are ignored, as well as the documentation. It is customizable to the extent that character classes can be designated as token constituents or as token delimiters. The default token constituents are the alpha-numerics; all other characters are considered token delimiters. Perl support has been originally written by Madhu Gogulapati. This scanner is considered experimental; please report any problems you should encounter to `bug-idutils@gnu.org' . `-i CHARACTER-CLASS' `--include=CHARACTER-CLASS' Include characters belonging to CHARACTER-CLASS in tokens. `-x CHARACTER-CLASS' `--exclude=CHARACTER-CLASS' Exclude characters belonging to CHARACTER-CLASS from tokens, i.e., treat them as token delimiters. `-d' `--dtags' Include tokens from the documentation. By default, the tokens in the documentation are ignored.  File: idutils.info, Node: Lisp scanner, Next: Defining scanners, Prev: Perl scanner, Up: Extraction options 3.6.6 Lisp Scanner ------------------ (EXPERIMENTAL) The lisp scanner has been originally written by Edouard G. Parmelan, and after many years it was posthumously integrated with the main idutils code. It is intended for Lisp and Emacs Lisp files (.lisp, .el, .elc, .scm). No options are currently available for this scanner. This scanner is considered experimental; please report any problems you should encounter to `bug-idutils@gnu.org' .  File: idutils.info, Node: Defining scanners, Prev: Lisp scanner, Up: Extraction options 3.6.7 Defining New Scanners in the Source Code ---------------------------------------------- To add a new scanner in source code, you should add a new section to the file `scanners.c'. It might be easiest to clone one of the existing scanners and modify it as necessary. For the hypothetical language FOO, you must define the functions `get_token_foo', `parse_args_foo', `help_me_foo', as well as the tables `long_options_foo' and `args_foo'. If your scanner is modeled after one of the existing scanners, you'll also need a character-attribute table `ctype_foo'. This is not a terribly difficult programming task, but it requires recompiling and installing the new version of `mkid' and `xtokid'. You should use `xtokid' to test the operation of the new scanner. Once these functions and tables are ready, add function prototypes and an entry to the `languages_0' table near the beginning of the file. Be warned that the existing scanners are built for speed, not elegance or readability. You might wish to create a new scanner that's easier to read and understand if you don't feel that speed is so important.  File: idutils.info, Node: mkid invocation, Next: lid invocation, Prev: Common options, Up: Top 4 `mkid': Creating an ID Database ********************************* `mkid' builds an ID database. It accepts the names of files and/or directories on the command line, selects files that have an enabled scanner, then extracts and stores tokens from those files. The resulting ID database is architecture- and byte-order-independent so it can be shared among all systems. The primary virtues of `mkid' are speed and high capacity. The size of the source trees it can index is limited only by available system memory. `mkid''s indexing algorithm is very space-efficient and exhibits excellent locality-of-reference, and so is capable of operating with a working-set size that is only half the size of its virtual address space. A typical UNIX-like operating system with 16 megabytes of system memory should be able to build an ID database covering approximately 12,000-14,000 source files totaling approximately 50-100 Megabytes. A 66 MHz 486 computer can build such a large ID database in approximately 10-15 minutes. In a future release, `mkid' will be able to incrementally update an ID database much faster than it can build one from scratch. Until this feature becomes available, it might be a good idea to schedule a `cron' job to regularly update large ID databases during off-hours. `mkid' writes the ID file, therefore it accepts the `--output' (and `--file') options as described in *note Writing options::. `mkid' extracts tokens from source files, therefore it accepts the `--lang-map', `--include', `--exclude', and `--lang-option' options, as well as the language-specific scanner options, all of which are described in *note Extraction options::. `mkid' walks file trees, therefore it handles file and directory names on its command line and the `--prune' option as described in *note Walker options::. In addition, `mkid' accepts the following command-line options: `-s' `--statistics' `mkid' reports statistics about resource usage at the end of its run. `-v' `--verbose' `mkid' reports statistics about each file as it is scanned, and about the resource usage of its indexing algorithm at regular intervals.  File: idutils.info, Node: lid invocation, Next: fid invocation, Prev: mkid invocation, Up: Top 5 `lid': Querying an ID Database by Token ***************************************** The `lid' program accepts PATTERNS on the command line which it matches against the tokens stored in an ID database. The interpretation of a PATTERN is determined by the makeup of the PATTERN string itself, or can be overridden by command-line options. If a PATTERN contains regular expression meta-characters, it is used to perform a regular-expression substring search. If no such meta-characters are present, PATTERN is used to perform a literal word search. (By default, all searches are sensitive to alphabetic case.) If no PATTERN is supplied on the command line, `lid' lists every entry in the ID database. `lid' reads the ID database, therefore it accepts the `--file' option, and consults the `IDPATH' environment variable, as described in *note Reading options::. `lid' lists file names, therefore it accepts the `--separator' option, as described in *note File listing options::. In addition, `lid' accepts the following command-line options: `-i' `--ignore-case' Ignoring differences in alphabetic case between the PATTERN and the tokens in the ID database. `-l' `--literal' Match PATTERN as a literal string. Use this option if PATTERN contains regular-expression meta-characters, but you don't wish to perform a regular-expression search. `-r' `--regexp' Match PATTERN as an _extended_ regular expression(1). Use this option if no regular-expression expression meta-characters are present in PATTERN, but you wish to force a regular-expression search (note: in this case, a _literal substring_ search might be faster). `-w' `--word' Match PATTERN using a word-delimited (non substring) search. This is the default for literal searches. `-s' `--substring' Match PATTERN using a substring (non word-delimited) search. This is the default for regular expression searches. `-k STYLE' `--key=STYLE' STYLE can be one of `token', `pattern' or `none'. This option controls how the subject of the query is presented. This is best illustrated by example: $ lid --key=token '^dest.' destaddr libsys/memcpy.c destination libsys/regex.c destlst libsys/rx.c destpos libsys/rx.c destset libsys/rx.h libsys/rx.c $ lid --key=pattern '^dest.' ^dest. libsys/rx.h libsys/{memcpy,regex,rx}.c $ lid --key=none '^dest.' libsys/rx.h libsys/{memcpy,regex,rx}.c When `--key' is either `token' or `pattern', the first column of output is a TOKEN or PATTERN, respectively. When `--key' is `none', neither of these is printed, and the file name list begins immediately. The default is `token'. `-R STYLE' `--result=STYLE' STYLE can be one of `filenames', `grep', `edit' or `none'. This option controls how the value associated with the query's KEY presented. When STYLE is `filenames', a list of file names is printed (this is the default). When STYLE is `grep', the lines that match PATTERN are printed in the same format as `egrep -n'. When STYLE is `edit', the file names are passed to an editor, and if possible PATTERN is passed as an initial search string (*note eid invocation::). When STYLE is `none', the file names are not processed in any way. This can be useful if you wish to see what tokens match a PATTERN, but don't care about where they reside. `-d' `-o' `-x' These options may be used in any combination to specify the radix of numeric matches. `-d' allows matching on decimal numbers, `-o' on octal numbers, and `-x' on hexadecimal numbers. Any combination of these options may be used. The default is to match all three radixes. `-F RANGE' `--frequency=RANGE' Match tokens whose occurrence count falls in RANGE. RANGE may be expressed as a single number N, or as a range N`..'M. Either limit of the range may be omitted (e.g., `..'M, or N..`..'). If the lower limit N is omitted, it defaults to `1'. If the upper limit is omitted, it defaults in the present implementation to `65535', the maximum value of an unsigned 16-bit integer. Particularly useful queries are `lid -F1', which helps locate identifiers that are defined but never used, or are used but never defined. Similarly, `lid -F2' can help find functions that possess a prototype declaration and a definition, but are never called. `-a NUMBER' `--ambiguous=NUMBER' List identifiers (not numbers) that are ambiguous for the first NUMBER characters. This feature might be in useful when porting programs to ancient pea-brained compilers that don't support long identifier names. However, the best long-term option is to set such systems on fire. * Menu: * lid aliases:: Aliases for specialized lid queries * Emacs gid interface:: GNU Emacs query interface * eid invocation:: Invoking an editor on query results ---------- Footnotes ---------- (1) Extended regular expressions are the same as those accepted by `egrep'.  File: idutils.info, Node: lid aliases, Next: Emacs gid interface, Up: lid invocation 5.1 Aliases for Specialized `lid' Queries ========================================= Historically, the ID utilities have provided several query interfaces which are specializations of `lid' (*note lid invocation::). `gid' (alias for `lid -R grep') lists all lines containing the requested pattern. `eid' (alias for `lid -R edit') invokes an editor on all files containing the requested pattern, and optionally initiates a text search for that pattern. `aid' (alias for `lid -ils') treats the requested pattern as a case-insensitive literal substring.  File: idutils.info, Node: Emacs gid interface, Next: eid invocation, Prev: lid aliases, Up: lid invocation 5.2 GNU Emacs query interface ============================= The `idutils' source distribution comes with a file `idutils.el', which defines a GNU Emacs interface to `gid'. To install it, put `idutils.el' somewhere that Emacs will find it (i.e., in your `load-path') and put (autoload 'gid "id-utils" "Id Utilities; get id" t) in one of Emacs' initialization files, e.g., `~/.emacs'. You will then be able to use `M-x gid' to run the command. The `gid' function prompts you with the word around point. If you want to search for something else, simply delete the line and type the pattern of interest. The function then runs the `gid' program in a `*compilation*' buffer, so the normal `next-error' function can be used to visit all the places the identifier is found (*note Compilation: (emacs)Compilation.).  File: idutils.info, Node: eid invocation, Prev: Emacs gid interface, Up: lid invocation 5.3 `eid': Invoking an Editor on Query Results ============================================== `lid -R edit' is an editing interface for the ID utilities that is most commonly used with `vi'. Emacs users should use the interface defined in `idutils.el' (*note Emacs gid interface::). The ID utilities include an alias called `eid', and for the sake of brevity, we'll use this alias for the remainder of this section. `eid' performs a `lid'-style, then asks if you wish to edit the files. If your query yields more than one line of output, you will be prompted after each line. This is the prompt you'll see: Edit? [y1-9^S/nq] You may respond with: `y' Edit all files listed. `1...9' Edit all files starting at the N + 1'st file. `/STRING or CTRL-SREGEXP' Search into the file list, and begin editing with the first file name that matches the regular expression REGEXP. `n' Don't edit any files. If another line of query output is pending, advance to that line, for which another `Edit?' prompt will appear. `q' Quit--don't edit any files, and don't process any more lines of query output. Here is an example: prompt$ eid FILE \^print FILE {ansi2knr,fid,filenames,idfile,idx,lid,misc,...}.c Edit? [y1-9^S/nq] n ^print {ansi2knr,fid,getopt,getopt1,lid,mkid,regex,scanners}.c Edit? [y1-9^S/nq] 2 This will start editing at `getopt'.c. `eid' invokes the editor defined by the environment variable `VISUAL'. If `VISUAL' is undefined, it uses the environment variable `EDITOR' instead. If `EDITOR' is undefined, it defaults to `vi'. It is possible for `eid' to pass the editor an initial search pattern so that your cursor will immediately alight on the token of interest. This feature is controlled by the following environment variables: `EIDARG' A printf(3) format string for the editor argument to search for the matching token. For `vi', this should be `+/%s/'. `EIDLDEL' The regular-expression meta-character(s) for delimiting the beginning of a word (the ``eid' Left DELimiter'). `eid' inserts this in front of the matching token when a word-search is desired. For `vi', this should be `\<'. `EIDRDEL' The regular-expression meta-character(s) for delimiting the end of a word (the ``eid' Right DELimiter'). `eid' inserts this in end of the matching token when a word-search is desired. For `vi', this should be `\>'.  File: idutils.info, Node: fid invocation, Next: gid invocation, Prev: lid invocation, Up: Top 6 `fid': Listing a file's tokens ******************************** `fid' prints the tokens found in a given file. If two file names are passed on the command line, `fid' prints the tokens that are common to both files (i.e., the _set intersection_ of the two token sets). `fid' reads the ID database, therefore it accepts the `--file' option, and consults the `IDPATH' environment variable, as described in *note Reading options::. If the standard output is attached to a terminal, the printed tokens are separated by spaces. Otherwise, the tokens are printed one per line.  File: idutils.info, Node: fnid invocation, Next: xtokid invocation, Prev: gid invocation, Up: Top 7 `fnid': Looking up filenames ****************************** `fnid' queries the list of file names stored in the ID database. It accepts shell _wildcard_ patterns on the command line. If no pattern is supplied, `*' is implied. `fnid' prints the file names that match the given patterns. `fnid' prints file names, and as such accepts the `--separator' option as described in *note File listing options::. For example, the command: fnid \*.c lists all the `.c' files in the database. (The `\' here protects the `*' from being expanded by the shell.)  File: idutils.info, Node: gid invocation, Next: fnid invocation, Prev: fid invocation, Up: Top 8 `gid': Token-based grep ************************* `gid' lists each line containing one of the specified tokens. Running `gid' is equivalent to `lid -R grep') For example, the command: gid important_variable lists each line of each file in the database that contains that token.  File: idutils.info, Node: xtokid invocation, Next: Past and Future, Prev: fnid invocation, Up: Top 9 `xtokid': Testing Language Scanners ************************************* `xtokid' accepts the names of files and/or directories on the command line, then extracts and prints a stream of tokens from those files for which it has a valid, enabled scanner. This is useful primarily for debugging new `mkid' scanners (*note Defining scanners::). `xtokid' extracts tokens from source files, therefore it accepts the `--lang-map', `--include', `--exclude', and `--lang-option' options, as well as the language-specific scanner options, all of which are described in *note Extraction options::. `xtokid' walks file trees, therefore it handles file and directory names on its command line and the `--prune' option as described in *note Walker options::. The name `xtokid' indicates that it is the "eXtract TOKens ID utility".  File: idutils.info, Node: Past and Future, Next: Index, Prev: xtokid invocation, Up: Top 10 Past and Future ****************** Greg McGary conceived of the ideas behind the ID utilities when he began working on the Unix kernel in 1984. He needed a navigation tool to help him find his way around the expansive, unfamiliar landscape. The first `idutils'-like tools were shell scripts, and produced an ASCII database that looks much like the output of `lid ".*"'. It took over an hour on a VAX 11/750 to build a database for a 4.1BSD derived kernel. The first version of `lid' used the UNIX system utility `look', modified to handle very long lines. In 1986, Greg rewrote the shell scripts in C to improve performance. Build times for the ID file were shortened by an order of magnitude. The ID utilities were first posted to `comp.sources.unix' in September 1987 under the name `id'. Over the next few years, several versions diverged from the original source. Tom Horsley at Harris Computer Systems Division stepped forward to take over maintenance and integrated some of the fixes from divergent versions. A first release of the renamed `mkid' version 2 was posted to `alt.sources' near the end of 1990. At that time, Tom wrote a Texinfo manual with the encouragement of the net community. (Tom especially thanks Doug Scofield and Bill Leonard whom he dragooned into helping proofread and edit--they found several problems in the initial version.) Karl Berry revamped the manual for Texinfo style, indexing, and organization in 1995. In January 1995, Greg McGary reemerged as the primary maintainer and launched development of `mkid' version 3, whose primary new feature is an efficient algorithm for building databases that is linear in both time and space over the size of the input text. (The old algorithm was quadratic in space so it was incapable of handling very large source trees.) For the first time, the code was released under the GNU Public License. In June 1996, the package was renamed again to `id-utils' and was released for the first time under FSF copyright as part of the GNU system. All programs had their command-line arguments completely revised. The `mkid' and `xtokid' programs also gained a file-tree walker, so that directory names can be passed on the command line instead of the names of every individual file. Greg reorganized and rewrote most of the Texinfo manual to reflect these changes. In 2006, Claudio Fontana modernized the build system and the code itself, and analyzed and integrated various pending patches. Package name had a minor change from `id-utils' to `idutils', to be more consistent with the other GNU package names. Future releases of `idutils' might include: an optional coupling with GNU `grep', so that `grep' can use an ID database for hints a `cscope' work-alike query interface incremental update of the ID database.  File: idutils.info, Node: Index, Prev: Past and Future, Up: Top Index ***** �[index�] * Menu: * *compilation* Emacs buffer: Emacs gid interface. (line 20) * --ambiguous: lid invocation. (line 115) * --comment: Assembler scanner. (line 15) * --dtags: Perl scanner. (line 30) * --exclude <1>: Perl scanner. (line 25) * --exclude <2>: Text scanner. (line 19) * --exclude: Extraction options. (line 22) * --file <1>: Writing options. (line 14) * --file: Reading options. (line 8) * --files0-from=FILE: Walker options. (line 22) * --frequency: lid invocation. (line 101) * --help: Universal options. (line 7) * --ignore <1>: Assembler scanner. (line 28) * --ignore: C Cpp Java scanner. (line 24) * --ignore-case: lid invocation. (line 26) * --include <1>: Perl scanner. (line 21) * --include <2>: Text scanner. (line 15) * --include: Extraction options. (line 16) * --keep <1>: Assembler scanner. (line 20) * --keep: C Cpp Java scanner. (line 16) * --lang-map: Extraction options. (line 11) * --lang-option: Extraction options. (line 29) * --lang-option=asm:--comment: Assembler scanner. (line 15) * --lang-option=asm:--ignore: Assembler scanner. (line 28) * --lang-option=asm:--keep: Assembler scanner. (line 20) * --lang-option=asm:--no-cpp: Assembler scanner. (line 46) * --lang-option=asm:--strip-underscore: Assembler scanner. (line 37) * --lang-option=asm:-c: Assembler scanner. (line 15) * --lang-option=asm:-i: Assembler scanner. (line 28) * --lang-option=asm:-k: Assembler scanner. (line 20) * --lang-option=asm:-n: Assembler scanner. (line 46) * --lang-option=asm:-u: Assembler scanner. (line 37) * --lang-option=C:--ignore: C Cpp Java scanner. (line 24) * --lang-option=C:--keep: C Cpp Java scanner. (line 16) * --lang-option=C:--strip-underscore: C Cpp Java scanner. (line 33) * --lang-option=C:-i: C Cpp Java scanner. (line 24) * --lang-option=C:-k: C Cpp Java scanner. (line 16) * --lang-option=C:-u: C Cpp Java scanner. (line 33) * --lang-option=perl:--dtags: Perl scanner. (line 30) * --lang-option=perl:--exclude: Perl scanner. (line 25) * --lang-option=perl:--include: Perl scanner. (line 21) * --lang-option=perl:-d: Perl scanner. (line 30) * --lang-option=perl:-i: Perl scanner. (line 21) * --lang-option=perl:-x: Perl scanner. (line 25) * --lang-option=text:--exclude: Text scanner. (line 19) * --lang-option=text:--include: Text scanner. (line 15) * --lang-option=text:-i: Text scanner. (line 15) * --lang-option=text:-x: Text scanner. (line 19) * --literal: lid invocation. (line 31) * --no-cpp: Assembler scanner. (line 46) * --output: Writing options. (line 8) * --prune: Walker options. (line 17) * --regexp: lid invocation. (line 37) * --result: lid invocation. (line 79) * --separator: File listing options. (line 12) * --statistics: mkid invocation. (line 41) * --strip-underscore <1>: Assembler scanner. (line 37) * --strip-underscore: C Cpp Java scanner. (line 33) * --substring: lid invocation. (line 50) * --verbose: mkid invocation. (line 46) * --version: Universal options. (line 11) * --word: lid invocation. (line 45) * -a: lid invocation. (line 115) * -c: Assembler scanner. (line 15) * -d <1>: lid invocation. (line 93) * -d: Perl scanner. (line 30) * -F: lid invocation. (line 101) * -f <1>: Writing options. (line 14) * -f: Reading options. (line 8) * -i <1>: lid invocation. (line 26) * -i <2>: Perl scanner. (line 21) * -i <3>: Text scanner. (line 15) * -i <4>: Assembler scanner. (line 28) * -i <5>: C Cpp Java scanner. (line 24) * -i: Extraction options. (line 16) * -k <1>: lid invocation. (line 55) * -k <2>: Assembler scanner. (line 20) * -k: C Cpp Java scanner. (line 16) * -l <1>: lid invocation. (line 31) * -l: Extraction options. (line 29) * -l asm:--comment: Assembler scanner. (line 15) * -l asm:--dtags: Perl scanner. (line 30) * -l asm:--ignore: Assembler scanner. (line 28) * -l asm:--keep: Assembler scanner. (line 20) * -l asm:--no-cpp: Assembler scanner. (line 46) * -l asm:--strip-underscore: Assembler scanner. (line 37) * -l asm:-c: Assembler scanner. (line 15) * -l asm:-d: Perl scanner. (line 30) * -l asm:-i: Assembler scanner. (line 28) * -l asm:-k: Assembler scanner. (line 20) * -l asm:-n: Assembler scanner. (line 46) * -l asm:-u: Assembler scanner. (line 37) * -l C:--ignore: C Cpp Java scanner. (line 24) * -l C:--keep: C Cpp Java scanner. (line 16) * -l C:--strip-underscore: C Cpp Java scanner. (line 33) * -l C:-i: C Cpp Java scanner. (line 24) * -l C:-k: C Cpp Java scanner. (line 16) * -l C:-u: C Cpp Java scanner. (line 33) * -l perl:--exclude: Perl scanner. (line 25) * -l perl:--include: Perl scanner. (line 21) * -l perl:-i: Perl scanner. (line 21) * -l perl:-x: Perl scanner. (line 25) * -l text:--exclude: Text scanner. (line 19) * -l text:--include: Text scanner. (line 15) * -l text:-i: Text scanner. (line 15) * -l text:-x: Text scanner. (line 19) * -m: Extraction options. (line 11) * -n: Assembler scanner. (line 46) * -o <1>: lid invocation. (line 93) * -o: Writing options. (line 8) * -p: Walker options. (line 17) * -R: lid invocation. (line 79) * -r: lid invocation. (line 37) * -s <1>: lid invocation. (line 50) * -s: mkid invocation. (line 41) * -S: File listing options. (line 12) * -u <1>: Assembler scanner. (line 37) * -u: C Cpp Java scanner. (line 33) * -v: mkid invocation. (line 46) * -w: lid invocation. (line 45) * -x <1>: lid invocation. (line 93) * -x <2>: Perl scanner. (line 25) * -x <3>: Text scanner. (line 19) * -x: Extraction options. (line 22) * alphabetic case, ignoring differences in: lid invocation. (line 26) * ambiguous identifier names, finding: lid invocation. (line 115) * architecture-independence: mkid invocation. (line 6) * assembler scanner: Assembler scanner. (line 6) * assembly language scanner: Assembler scanner. (line 6) * beginning-of-word editor argument: eid invocation. (line 60) * Berry, Karl: Past and Future. (line 20) * bugs, reporting: Introduction. (line 62) * C scanner, predefined: C Cpp Java scanner. (line 6) * common command-line options: Common options. (line 6) * creating databases: mkid invocation. (line 6) * cron: mkid invocation. (line 23) * cscope: Past and Future. (line 52) * databases, creating: mkid invocation. (line 6) * eid: eid invocation. (line 6) * EIDARG: eid invocation. (line 56) * EIDLDEL: eid invocation. (line 60) * EIDRDEL: eid invocation. (line 66) * Emacs interface to gid: Emacs gid interface. (line 6) * end-of-word editor argument: eid invocation. (line 66) * exclude languages: Extraction options. (line 22) * fid: fid invocation. (line 6) * file name separator: File listing options. (line 12) * file tree pruning: Walker options. (line 17) * filenames, matching: fnid invocation. (line 6) * fnid: fnid invocation. (line 6) * future: Past and Future. (line 52) * gid: gid invocation. (line 6) * gid Emacs function: Emacs gid interface. (line 16) * grep: Past and Future. (line 52) * help, online: Universal options. (line 7) * history: Past and Future. (line 6) * Horsley, Tom: Past and Future. (line 20) * ID database file name <1>: Writing options. (line 8) * ID database file name: Reading options. (line 8) * ID database, definition of: Introduction. (line 6) * ID file format: mkid invocation. (line 6) * idutils.el interface to Emacs: Emacs gid interface. (line 6) * ignoring differences in alphabetic case: lid invocation. (line 26) * include languages: Extraction options. (line 16) * introduction: Introduction. (line 6) * language map file: Extraction options. (line 11) * language-specific option: Extraction options. (line 29) * languages_0: Defining scanners. (line 6) * left delimiter editor argument: eid invocation. (line 60) * Leonard, Bill: Past and Future. (line 20) * lisp scanner: Lisp scanner. (line 6) * load-path: Emacs gid interface. (line 6) * look and mkid 1: Past and Future. (line 6) * matching filenames: fnid invocation. (line 6) * McGary, Greg: Past and Future. (line 6) * mkid progress: mkid invocation. (line 46) * numeric matches, specifying radix of: lid invocation. (line 93) * overview: Introduction. (line 6) * perl scanner: Perl scanner. (line 6) * radix of numeric matches, specifying: lid invocation. (line 93) * right delimiter editor argument: eid invocation. (line 66) * scanners: Extraction options. (line 45) * scanners, defining in source code: Defining scanners. (line 6) * scanners.c: Defining scanners. (line 6) * Scofield, Doug: Past and Future. (line 20) * search for token, initial: eid invocation. (line 56) * searching files, grep: gid invocation. (line 6) * sharing ID files: mkid invocation. (line 6) * single matches, showing: lid invocation. (line 101) * statistics: mkid invocation. (line 41) * text scanner: Text scanner. (line 6) * tokens common to two files: fid invocation. (line 6) * tokens in a file: fid invocation. (line 6) * version number, finding: Universal options. (line 11)  Tag Table: Node: Top1707 Node: Introduction2505 Node: Quick start5027 Node: Common options5955 Node: Universal options6753 Node: Reading options7086 Ref: Reading options-Footnote-18089 Node: Writing options8213 Node: Walker options8717 Node: File listing options10035 Node: Extraction options11130 Node: Language map14026 Node: C Cpp Java scanner16205 Node: Assembler scanner17839 Node: Text scanner19949 Node: Perl scanner20761 Node: Lisp scanner21923 Node: Defining scanners22491 Node: mkid invocation23716 Node: lid invocation25997 Ref: lid invocation-Footnote-131282 Node: lid aliases31362 Node: Emacs gid interface32044 Node: eid invocation32986 Node: fid invocation35572 Node: fnid invocation36258 Node: gid invocation36933 Node: xtokid invocation37332 Node: Past and Future38270 Node: Index41215  End Tag Table ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/Makefile.am������������������������������������������������������������0000664�0000000�0000000�00000000165�11434330764�014213� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in info_TEXINFOS = idutils.texi DISTCLEANFILES = idutils.fl �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/stamp-vti��������������������������������������������������������������0000664�0000000�0000000�00000000136�12166360012�014014� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 1 January 2012 @set UPDATED-MONTH January 2012 @set EDITION 4.6 @set VERSION 4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/doc/Makefile.in������������������������������������������������������������0000664�0000000�0000000�00000164076�12166360012�014230� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/stamp-vti $(srcdir)/version.texi \ $(top_srcdir)/build-aux/mdate-sh \ $(top_srcdir)/build-aux/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) am__v_INFOHTML_0 = @echo " INFOHTML" $@; AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; AM_V_texinfo = $(am__v_texinfo_@AM_V@) am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) am__v_texinfo_0 = -q AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) am__v_texidevnull_0 = > /dev/null INFO_DEPS = $(srcdir)/idutils.info TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux DVIS = idutils.dvi PDFS = idutils.pdf PSS = idutils.ps HTMLS = idutils.html TEXINFOS = idutils.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = idutils.texi DISTCLEANFILES = idutils.fl all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): .texi.info: $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $(AM_V_texinfo) $< $(AM_V_texidevnull) .texi.pdf: $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $(AM_V_texinfo) $< $(AM_V_texidevnull) .texi.html: $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/idutils.info: idutils.texi $(srcdir)/version.texi idutils.dvi: idutils.texi $(srcdir)/version.texi idutils.pdf: idutils.texi $(srcdir)/version.texi idutils.html: idutils.texi $(srcdir)/version.texi $(srcdir)/version.texi: $(srcdir)/stamp-vti $(srcdir)/stamp-vti: idutils.texi $(top_srcdir)/configure @(dir=.; test -f ./idutils.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/idutils.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version.texi \ || (echo "Updating $(srcdir)/version.texi"; \ cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf idutils.aux idutils.cp idutils.cps idutils.fl idutils.fn idutils.ky \ idutils.log idutils.op idutils.pg idutils.tmp idutils.toc \ idutils.tp idutils.tps idutils.vr clean-aminfo: -test -z "idutils.dvi idutils.pdf idutils.ps idutils.html" \ || rm -rf idutils.dvi idutils.pdf idutils.ps idutils.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @am__run_installinfo=yes; \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) am__run_installinfo=no;; \ *) (install-info --version) >/dev/null 2>&1 \ || am__run_installinfo=no;; \ esac; \ if test $$am__run_installinfo = yes; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ dist-info distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-pdf-am uninstall-ps-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/COPYING��������������������������������������������������������������������0000664�0000000�0000000�00000104513�11434330764�012447� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/configure.ac���������������������������������������������������������������0000664�0000000�0000000�00000010354�12204226501�013666� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([idutils], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-idutils@gnu.org]) AC_CONFIG_AUX_DIR(build-aux) AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz color-tests parallel-tests std-options]) AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_CONFIG_SRCDIR([src/mkid.c]) AC_CONFIG_HEADERS([lib/config.h:lib/config.hin]) # Checks for programs. AM_MISSING_PROG(HELP2MAN, help2man) AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_LN_S gl_EARLY gl_INIT AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], [turn on lots of GCC warnings (for developers)])], [case $enableval in yes|no) ;; *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; esac gl_gcc_warnings=$enableval], [if test -d "$srcdir"/.git; then gl_gcc_warnings=yes else gl_gcc_warnings=no fi] ) if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) AC_SUBST([WERROR_CFLAGS]) # Add many warnings, except some... nw="$nw -Wdeclaration-after-statement" # too useful to forbid nw="$nw -Waggregate-return" # anachronistic nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often nw="$nw -Wcast-qual" # Too many warnings for now nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Wsign-conversion" # Too many warnings for now nw="$nw -Wtraditional-conversion" # Too many warnings for now nw="$nw -Wunreachable-code" # Too many warnings for now nw="$nw -Wpadded" # Our structs are not padded nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat nw="$nw -Wlogical-op" # any use of fwrite provokes this nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses nw="$nw -Wvla" # warnings in gettext.h nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now nw="$nw -Winline" # things I might fix soon: nw="$nw -Wstrict-overflow" # fid.c nw="$nw -Wunsafe-loop-optimizations" # mkid.c gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) for w in $ws; do gl_WARN_ADD([$w]) done gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now gl_WARN_ADD([-fdiagnostics-show-option]) gl_WARN_ADD([-Wno-format-nonliteral]) AC_SUBST([WARN_CFLAGS]) AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) AC_DEFINE([_FORTIFY_SOURCE], [2], [enable compile-time and run-time bounds-checking, and some warnings]) AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) fi AC_PROG_INSTALL AC_PROG_RANLIB # check functions # if HAVE_LINK, then in the code we look for file aliases # if HAVE_SBRK, then we can generate statistics on memory usage AC_CHECK_FUNCS([link sbrk lstat]) AM_PATH_LISPDIR # Checks for header files. AC_CHECK_HEADERS([termios.h sys/ioctl.h termio.h sgtty.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_CHECK_TYPES(ptrdiff_t) AM_GNU_GETTEXT([external], [need-ngettext]) AM_GNU_GETTEXT_VERSION([0.18]) AC_CONFIG_FILES([ po/Makefile.in doc/Makefile man/Makefile lib/Makefile libidu/Makefile lisp/Makefile testsuite/Makefile gnulib-tests/Makefile src/Makefile Makefile ]) AC_OUTPUT ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/bootstrap.conf�������������������������������������������������������������0000664�0000000�0000000�00000006616�12204226501�014272� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Bootstrap configuration. # 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 <http://www.gnu.org/licenses/>. # We don't need these modules, even though gnulib-tool mistakenly # includes them because of gettext and fchdir dependencies. avoided_gnulib_modules=' --avoid=canonicalize-lgpl ' gnulib_name=libgnu # gnulib modules used by this package. gnulib_modules=" $avoided_gnulib_modules alloca alloca-opt announce-gen argv-iter autobuild calloc closeout dirname do-release-commit-and-tag error exclude exitfail extensions fflush fnmatch fnmatch-gnu fopen freopen fpending fprintf-posix getcwd getopt-gnu gettext-h git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update gnumakefile gnupload havelib ignore-value inttostr lstat malloc maintainer-makefile manywarnings mbchar mbuiter mempcpy obstack pathmax perl posix-shell printf-posix progname quote quotearg readme-release realloc regex stat-macros stdbool sprintf-posix strcase strcasestr strsep strnlen1 strsep sys_ioctl update-copyright useless-if-before-free vc-list-files warnings xalloc xalloc-die xgetcwd " # Other locale categories that need message catalogs. EXTRA_LOCALE_CATEGORIES= # Additional xgettext options to use. Use "\\\newline" to break lines. XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ --from-code=UTF-8\\\ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ --flag=wrapf:1:c-format\\\ ' # If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" # appears in configure.ac, exclude some unnecessary files. # Without grep's -E option (not portable enough, pre-configure), # the following test is ugly. Also, this depends on the existence # of configure.ac, not the obsolescent-named configure.in. But if # you're using this infrastructure, you should care about such things. gettext_external=0 grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && gettext_external=1 grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && gettext_external=1 if test $gettext_external = 1; then # Gettext supplies these files, but we don't need them since # we don't have an intl subdirectory. excluded_files=' m4/glibc2.m4 m4/intdiv0.m4 m4/lcmessage.m4 m4/uintmax_t.m4 m4/ulonglong.m4 m4/visibility.m4 ' fi gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\ --makefile-name=gnulib.mk " # Build prerequisites buildreq="\ autoconf 2.61 automake 1.11 autopoint - bison - gettext 0.18 git 1.4.4 gperf - gzip - makeinfo - perl 5.5 rsync - tar - " # Automake requires that ChangeLog exist. touch ChangeLog || exit 1 bootstrap_epilogue() { perl -pi -e "s/\@PACKAGE\@/$package/g" README-release } ������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465165�012160� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/fid.1������������������������������������������������������������������0000664�0000000�0000000�00000001627�12166360012�013005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH FID "1" "February 2012" "fid - 4.6" "User Commands" .SH NAME fid \- List identifiers in F1; if F2 is also given, list those common to both .SH SYNOPSIS .B fid [\fIOPTION\fR] \fIFILENAME \fR[\fIFILENAME2\fR] .SH DESCRIPTION .\" Add any additional description here .PP List identifiers that occur in FILENAME, or if FILENAME2 is also given list the identifiers that occur in both files. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B fid is maintained as a Texinfo manual. If the .B info and .B fid programs are properly installed at your site, the command .IP .B info fid .PP should give you access to the complete manual. ���������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/lid.x������������������������������������������������������������������0000664�0000000�0000000�00000000152�11433657032�013121� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] lid \- Query ID database and report results. [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/eid.x������������������������������������������������������������������0000664�0000000�0000000�00000000152�11433657032�013112� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] eid \- Query ID database and report results. [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/aid.x������������������������������������������������������������������0000664�0000000�0000000�00000000152�11433657032�013106� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] aid \- Query ID database and report results. [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/Makefile.am������������������������������������������������������������0000664�0000000�0000000�00000004044�12166360012�014211� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in -*-Makefile-*- dist_man1_MANS = mkid.1 lid.1 fid.1 fnid.1 xtokid.1 eid.1 aid.1 gid.1 defid.1 man_aux = $(dist_man1_MANS:.1=.x) EXTRA_DIST = $(man_aux) MAINTAINERCLEANFILES = $(dist_man1_MANS) # Depend on .version to get version number changes. common_dep = ../.version mkid.1: $(common_dep) $(srcdir)/mkid.x ../src/mkid.c lid.1: $(common_dep) $(srcdir)/lid.x ../src/lid.c fid.1: $(common_dep) $(srcdir)/fid.x ../src/fid.c fnid.1: $(common_dep) $(srcdir)/fnid.x ../src/fnid.c xtokid.1: $(common_dep) $(srcdir)/xtokid.x ../src/xtokid.c aid.1: $(common_dep) $(srcdir)/aid.x ../src/lid.c eid.1: $(common_dep) $(srcdir)/eid.x ../src/lid.c gid.1: $(common_dep) $(srcdir)/gid.x ../src/lid.c defid.1: $(common_dep) $(srcdir)/defid.x ../src/lid.c SUFFIXES = .x .1 .x.1: $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ $(HELP2MAN) \ --include=$(srcdir)/$*.x \ --output=$@ $*$(EXEEXT) check-local: check-x-vs-1 check-programs-vs-x # Sort in traditional ASCII order, regardless of the current locale; # otherwise we may get into trouble with distinct strings that the # current locale considers to be equal. ASSORT = LC_ALL=C sort # Ensure that for each .x file in this directory, there is a # corresponding .1 file in the definition of $(dist_man1_MANS) above. .PHONY: check-x-vs-1 check-x-vs-1: $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ t=ls-files.$$$$; \ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ echo $(dist_man1_MANS) | tr -s ' ' '\012' | sed 's/\.1$$//' \ | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \ rm $$t programs = \ echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \ | MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \ | tr -s ' ' '\012' | $(ASSORT) -u .PHONY: check-programs-vs-x check-programs-vs-x: $(AM_V_GEN)for p in `$(programs)`; do \ test -f $(srcdir)/$$p.x \ || { echo missing $$p.x 1>&2; missing=1; }; \ done; \ test "$$missing" = 1 && exit 1 || : ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/aid.1������������������������������������������������������������������0000664�0000000�0000000�00000004740�12166360012�012777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH AID "1" "February 2012" "aid - 4.6" "User Commands" .SH NAME aid \- Query ID database and report results. .SH SYNOPSIS .B aid [\fIOPTION\fR]... \fIPATTERN\fR... .SH DESCRIPTION .\" Add any additional description here .PP Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-i\fR, \fB\-\-ignore\-case\fR match PATTERN case insensitively .TP \fB\-l\fR, \fB\-\-literal\fR match PATTERN as a literal string .TP \fB\-r\fR, \fB\-\-regexp\fR match PATTERN as a regular expression .TP \fB\-w\fR, \fB\-\-word\fR match PATTERN as a delimited word .TP \fB\-s\fR, \fB\-\-substring\fR match PATTERN as a substring .IP Note: If PATTERN contains extended regular expression metacharacters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. .TP \fB\-k\fR, \fB\-\-key\fR=\fISTYLE\fR STYLE is one of `token', `pattern' or `none' .TP \fB\-R\fR, \fB\-\-result\fR=\fISTYLE\fR STYLE is one of `filenames', `grep', `edit' or `none' .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' and only applies to file names when `\-\-result=filenames' .IP The above STYLE options control how query results are presented. Defaults are \fB\-\-key\fR=\fItoken\fR \fB\-\-result\fR=\fIfilenames\fR \fB\-\-separator\fR=\fIspace\fR .TP \fB\-F\fR, \fB\-\-frequency\fR=\fIFREQ\fR find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT .TP \fB\-a\fR, \fB\-\-ambiguous\fR=\fILEN\fR find tokens whose names are ambiguous for LEN chars .TP \fB\-x\fR, \fB\-\-hex\fR only find numbers expressed as hexadecimal .TP \fB\-d\fR, \fB\-\-decimal\fR only find numbers expressed as decimal .TP \fB\-o\fR, \fB\-\-octal\fR only find numbers expressed as octal .IP By default, searches match numbers of any radix. .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B aid is maintained as a Texinfo manual. If the .B info and .B aid programs are properly installed at your site, the command .IP .B info aid .PP should give you access to the complete manual. ��������������������������������id-utils-4.6+git20120811/man/gid.x������������������������������������������������������������������0000664�0000000�0000000�00000000152�11433657032�013114� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] gid \- Query ID database and report results. [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/fnid.x�����������������������������������������������������������������0000664�0000000�0000000�00000000166�11433657032�013276� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] fnid \- Print constituent file names that match PATTERN, [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/xtokid.x���������������������������������������������������������������0000664�0000000�0000000�00000000160�11433657032�013652� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] xtokid \- Print all tokens found in a source file. [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/xtokid.1���������������������������������������������������������������0000664�0000000�0000000�00000006151�12166360012�013542� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH XTOKID "1" "February 2012" "xtokid - 4.6" "User Commands" .SH NAME xtokid \- Print all tokens found in a source file. .SH SYNOPSIS .B xtokid [\fIOPTION\fR]... [\fIFILE\fR]... .SH DESCRIPTION .\" Add any additional description here .PP Print all tokens found in a source file. .TP \fB\-i\fR, \fB\-\-include\fR=\fILANGS\fR include languages in LANGS (default: "C C++ asm") .TP \fB\-x\fR, \fB\-\-exclude\fR=\fILANGS\fR exclude languages in LANGS .HP \fB\-l\fR, \fB\-\-lang\-option\fR=\fIL\fR:OPT pass OPT as a default for language L (see below) .TP \fB\-m\fR, \fB\-\-lang\-map\fR=\fIMAPFILE\fR use MAPFILE to map file names onto source language .TP \fB\-d\fR, \fB\-\-default\-lang\fR=\fILANG\fR make LANG the default source language .TP \fB\-p\fR, \fB\-\-prune\fR=\fINAMES\fR exclude the named files and/or directories .TP \fB\-\-files0\-from\fR=\fIF\fR tokenize only the files specified by NUL\-terminated names in file F .TP \fB\-\-help\fR display this help and exit \fB\-\-version\fR output version information and exit .PP The following arguments apply to the language\-specific scanners: .SS "C language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "C++ language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "Java language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "Assembly language:" .TP \fB\-c\fR,\-\-comment=CHARS Any of CHARS starts a comment until end\-of\-line .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in tokens, and keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in tokens, and toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from tokens .TP \fB\-n\fR,\-\-no\-cpp Don't handle C pre\-processor directives .SS "Text language:" .TP \fB\-i\fR,\-\-include=CHAR\-CLASS Treat characters of CHAR\-CLASS as token constituents .TP \fB\-x\fR,\-\-exclude=CHAR\-CLASS Treat characters of CHAR\-CLASS as token delimiters .SS "Perl language:" .TP \fB\-i\fR,\-\-include=CHAR\-CLASS Treat characters of CHAR\-CLASS as token constituents .TP \fB\-x\fR,\-\-exclude=CHAR\-CLASS Treat characters of CHAR\-CLASS as token delimiters .TP \fB\-d\fR,\-\-dtags Include documentation tags .PP Lisp language: .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B xtokid is maintained as a Texinfo manual. If the .B info and .B xtokid programs are properly installed at your site, the command .IP .B info xtokid .PP should give you access to the complete manual. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/fnid.1�����������������������������������������������������������������0000664�0000000�0000000�00000001664�12166360012�013164� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH FNID "1" "February 2012" "fnid - 4.6" "User Commands" .SH NAME fnid \- Print constituent file names that match PATTERN, .SH SYNOPSIS .B fnid [\fIOPTION\fR]... [\fIPATTERN\fR]... .SH DESCRIPTION .\" Add any additional description here .PP Print constituent file names that match PATTERN, using shell\-style wildcards. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B fnid is maintained as a Texinfo manual. If the .B info and .B fnid programs are properly installed at your site, the command .IP .B info fnid .PP should give you access to the complete manual. ����������������������������������������������������������������������������id-utils-4.6+git20120811/man/mkid.1�����������������������������������������������������������������0000664�0000000�0000000�00000007057�12166360012�013172� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH MKID "1" "February 2012" "mkid - 4.6" "User Commands" .SH NAME mkid \- build an identifier database .SH SYNOPSIS .B mkid [\fIOPTION\fR]... [\fIFILE\fR]... .SH DESCRIPTION .\" Add any additional description here .PP Build an identifier database. .TP \fB\-o\fR, \fB\-\-output\fR=\fIOUTFILE\fR file name of ID database output .TP \fB\-f\fR, \fB\-\-file\fR=\fIOUTFILE\fR synonym for \fB\-\-output\fR .TP \fB\-i\fR, \fB\-\-include\fR=\fILANGS\fR include languages in LANGS (default: "C C++ asm") .TP \fB\-x\fR, \fB\-\-exclude\fR=\fILANGS\fR exclude languages in LANGS .HP \fB\-l\fR, \fB\-\-lang\-option\fR=\fIL\fR:OPT pass OPT as a default for language L (see below) .TP \fB\-m\fR, \fB\-\-lang\-map\fR=\fIMAPFILE\fR use MAPFILE to map file names onto source language .TP \fB\-d\fR, \fB\-\-default\-lang\fR=\fILANG\fR make LANG the default source language .TP \fB\-p\fR, \fB\-\-prune\fR=\fINAMES\fR exclude the named files and/or directories .TP \fB\-v\fR, \fB\-\-verbose\fR report per file statistics .TP \fB\-s\fR, \fB\-\-statistics\fR report statistics at end of run .TP \fB\-\-files0\-from\fR=\fIF\fR tokenize only the files specified by NUL\-terminated names in file F .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .PP FILE may be a file name, or a directory name to recursively search. If no FILE is given, the current directory is searched by default. Note that the `\-\-include' and `\-\-exclude' options are mutually\-exclusive. .PP The following arguments apply to the language\-specific scanners: .SS "C language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "C++ language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "Java language:" .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in single\-token strings, keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in single\-token strings, toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from single\-token strings .SS "Assembly language:" .TP \fB\-c\fR,\-\-comment=CHARS Any of CHARS starts a comment until end\-of\-line .TP \fB\-k\fR,\-\-keep=CHARS Allow CHARS in tokens, and keep the result .TP \fB\-i\fR,\-\-ignore=CHARS Allow CHARS in tokens, and toss the result .TP \fB\-u\fR,\-\-strip\-underscore Strip a leading underscore from tokens .TP \fB\-n\fR,\-\-no\-cpp Don't handle C pre\-processor directives .SS "Text language:" .TP \fB\-i\fR,\-\-include=CHAR\-CLASS Treat characters of CHAR\-CLASS as token constituents .TP \fB\-x\fR,\-\-exclude=CHAR\-CLASS Treat characters of CHAR\-CLASS as token delimiters .SS "Perl language:" .TP \fB\-i\fR,\-\-include=CHAR\-CLASS Treat characters of CHAR\-CLASS as token constituents .TP \fB\-x\fR,\-\-exclude=CHAR\-CLASS Treat characters of CHAR\-CLASS as token delimiters .TP \fB\-d\fR,\-\-dtags Include documentation tags .PP Lisp language: .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B mkid is maintained as a Texinfo manual. If the .B info and .B mkid programs are properly installed at your site, the command .IP .B info mkid .PP should give you access to the complete manual. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/eid.1������������������������������������������������������������������0000664�0000000�0000000�00000004740�12166360012�013003� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH EID "1" "February 2012" "eid - 4.6" "User Commands" .SH NAME eid \- Query ID database and report results. .SH SYNOPSIS .B eid [\fIOPTION\fR]... \fIPATTERN\fR... .SH DESCRIPTION .\" Add any additional description here .PP Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-i\fR, \fB\-\-ignore\-case\fR match PATTERN case insensitively .TP \fB\-l\fR, \fB\-\-literal\fR match PATTERN as a literal string .TP \fB\-r\fR, \fB\-\-regexp\fR match PATTERN as a regular expression .TP \fB\-w\fR, \fB\-\-word\fR match PATTERN as a delimited word .TP \fB\-s\fR, \fB\-\-substring\fR match PATTERN as a substring .IP Note: If PATTERN contains extended regular expression metacharacters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. .TP \fB\-k\fR, \fB\-\-key\fR=\fISTYLE\fR STYLE is one of `token', `pattern' or `none' .TP \fB\-R\fR, \fB\-\-result\fR=\fISTYLE\fR STYLE is one of `filenames', `grep', `edit' or `none' .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' and only applies to file names when `\-\-result=filenames' .IP The above STYLE options control how query results are presented. Defaults are \fB\-\-key\fR=\fItoken\fR \fB\-\-result\fR=\fIfilenames\fR \fB\-\-separator\fR=\fIspace\fR .TP \fB\-F\fR, \fB\-\-frequency\fR=\fIFREQ\fR find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT .TP \fB\-a\fR, \fB\-\-ambiguous\fR=\fILEN\fR find tokens whose names are ambiguous for LEN chars .TP \fB\-x\fR, \fB\-\-hex\fR only find numbers expressed as hexadecimal .TP \fB\-d\fR, \fB\-\-decimal\fR only find numbers expressed as decimal .TP \fB\-o\fR, \fB\-\-octal\fR only find numbers expressed as octal .IP By default, searches match numbers of any radix. .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B eid is maintained as a Texinfo manual. If the .B info and .B eid programs are properly installed at your site, the command .IP .B info eid .PP should give you access to the complete manual. ��������������������������������id-utils-4.6+git20120811/man/defid.1����������������������������������������������������������������0000664�0000000�0000000�00000004720�12166360012�013313� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH DEFID "1" "February 2012" "defid - 4.6" "User Commands" .SH NAME defid \- [DESCRIPTION] .\" Add any additional description here .SH SYNOPSIS .B gid [\fIOPTION\fR]... \fIPATTERN\fR... .SH DESCRIPTION Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-i\fR, \fB\-\-ignore\-case\fR match PATTERN case insensitively .TP \fB\-l\fR, \fB\-\-literal\fR match PATTERN as a literal string .TP \fB\-r\fR, \fB\-\-regexp\fR match PATTERN as a regular expression .TP \fB\-w\fR, \fB\-\-word\fR match PATTERN as a delimited word .TP \fB\-s\fR, \fB\-\-substring\fR match PATTERN as a substring .IP Note: If PATTERN contains extended regular expression metacharacters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. .TP \fB\-k\fR, \fB\-\-key\fR=\fISTYLE\fR STYLE is one of `token', `pattern' or `none' .TP \fB\-R\fR, \fB\-\-result\fR=\fISTYLE\fR STYLE is one of `filenames', `grep', `edit' or `none' .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' and only applies to file names when `\-\-result=filenames' .IP The above STYLE options control how query results are presented. Defaults are \fB\-\-key\fR=\fItoken\fR \fB\-\-result\fR=\fIfilenames\fR \fB\-\-separator\fR=\fIspace\fR .TP \fB\-F\fR, \fB\-\-frequency\fR=\fIFREQ\fR find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT .TP \fB\-a\fR, \fB\-\-ambiguous\fR=\fILEN\fR find tokens whose names are ambiguous for LEN chars .TP \fB\-x\fR, \fB\-\-hex\fR only find numbers expressed as hexadecimal .TP \fB\-d\fR, \fB\-\-decimal\fR only find numbers expressed as decimal .TP \fB\-o\fR, \fB\-\-octal\fR only find numbers expressed as octal .IP By default, searches match numbers of any radix. .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B defid is maintained as a Texinfo manual. If the .B info and .B defid programs are properly installed at your site, the command .IP .B info defid .PP should give you access to the complete manual. ������������������������������������������������id-utils-4.6+git20120811/man/Makefile.in������������������������������������������������������������0000664�0000000�0000000�00000146116�12166360012�014231� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man1_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man1_MANS = mkid.1 lid.1 fid.1 fnid.1 xtokid.1 eid.1 aid.1 gid.1 defid.1 man_aux = $(dist_man1_MANS:.1=.x) EXTRA_DIST = $(man_aux) MAINTAINERCLEANFILES = $(dist_man1_MANS) # Depend on .version to get version number changes. common_dep = ../.version SUFFIXES = .x .1 # Sort in traditional ASCII order, regardless of the current locale; # otherwise we may get into trouble with distinct strings that the # current locale considers to be equal. ASSORT = LC_ALL=C sort programs = \ echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \ | MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \ | tr -s ' ' '\012' | $(ASSORT) -u all: all-am .SUFFIXES: .SUFFIXES: .x .1 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-man1: $(dist_man1_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-man uninstall-man1 mkid.1: $(common_dep) $(srcdir)/mkid.x ../src/mkid.c lid.1: $(common_dep) $(srcdir)/lid.x ../src/lid.c fid.1: $(common_dep) $(srcdir)/fid.x ../src/fid.c fnid.1: $(common_dep) $(srcdir)/fnid.x ../src/fnid.c xtokid.1: $(common_dep) $(srcdir)/xtokid.x ../src/xtokid.c aid.1: $(common_dep) $(srcdir)/aid.x ../src/lid.c eid.1: $(common_dep) $(srcdir)/eid.x ../src/lid.c gid.1: $(common_dep) $(srcdir)/gid.x ../src/lid.c defid.1: $(common_dep) $(srcdir)/defid.x ../src/lid.c .x.1: $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ $(HELP2MAN) \ --include=$(srcdir)/$*.x \ --output=$@ $*$(EXEEXT) check-local: check-x-vs-1 check-programs-vs-x # Ensure that for each .x file in this directory, there is a # corresponding .1 file in the definition of $(dist_man1_MANS) above. .PHONY: check-x-vs-1 check-x-vs-1: $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ t=ls-files.$$$$; \ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ echo $(dist_man1_MANS) | tr -s ' ' '\012' | sed 's/\.1$$//' \ | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \ rm $$t .PHONY: check-programs-vs-x check-programs-vs-x: $(AM_V_GEN)for p in `$(programs)`; do \ test -f $(srcdir)/$$p.x \ || { echo missing $$p.x 1>&2; missing=1; }; \ done; \ test "$$missing" = 1 && exit 1 || : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/defid.x����������������������������������������������������������������0000664�0000000�0000000�00000000106�11433657032�013423� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] defid \- [DESCRIPTION] .\" Add any additional description here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/gid.1������������������������������������������������������������������0000664�0000000�0000000�00000004740�12166360012�013005� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH GID "1" "February 2012" "gid - 4.6" "User Commands" .SH NAME gid \- Query ID database and report results. .SH SYNOPSIS .B gid [\fIOPTION\fR]... \fIPATTERN\fR... .SH DESCRIPTION .\" Add any additional description here .PP Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-i\fR, \fB\-\-ignore\-case\fR match PATTERN case insensitively .TP \fB\-l\fR, \fB\-\-literal\fR match PATTERN as a literal string .TP \fB\-r\fR, \fB\-\-regexp\fR match PATTERN as a regular expression .TP \fB\-w\fR, \fB\-\-word\fR match PATTERN as a delimited word .TP \fB\-s\fR, \fB\-\-substring\fR match PATTERN as a substring .IP Note: If PATTERN contains extended regular expression metacharacters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. .TP \fB\-k\fR, \fB\-\-key\fR=\fISTYLE\fR STYLE is one of `token', `pattern' or `none' .TP \fB\-R\fR, \fB\-\-result\fR=\fISTYLE\fR STYLE is one of `filenames', `grep', `edit' or `none' .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' and only applies to file names when `\-\-result=filenames' .IP The above STYLE options control how query results are presented. Defaults are \fB\-\-key\fR=\fItoken\fR \fB\-\-result\fR=\fIfilenames\fR \fB\-\-separator\fR=\fIspace\fR .TP \fB\-F\fR, \fB\-\-frequency\fR=\fIFREQ\fR find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT .TP \fB\-a\fR, \fB\-\-ambiguous\fR=\fILEN\fR find tokens whose names are ambiguous for LEN chars .TP \fB\-x\fR, \fB\-\-hex\fR only find numbers expressed as hexadecimal .TP \fB\-d\fR, \fB\-\-decimal\fR only find numbers expressed as decimal .TP \fB\-o\fR, \fB\-\-octal\fR only find numbers expressed as octal .IP By default, searches match numbers of any radix. .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B gid is maintained as a Texinfo manual. If the .B info and .B gid programs are properly installed at your site, the command .IP .B info gid .PP should give you access to the complete manual. ��������������������������������id-utils-4.6+git20120811/man/lid.1������������������������������������������������������������������0000664�0000000�0000000�00000004740�12166360012�013012� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH LID "1" "February 2012" "lid - 4.6" "User Commands" .SH NAME lid \- Query ID database and report results. .SH SYNOPSIS .B lid [\fIOPTION\fR]... \fIPATTERN\fR... .SH DESCRIPTION .\" Add any additional description here .PP Query ID database and report results. By default, output consists of multiple lines, each line containing the matched identifier followed by the list of file names in which it occurs. .TP \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR file name of ID database .TP \fB\-i\fR, \fB\-\-ignore\-case\fR match PATTERN case insensitively .TP \fB\-l\fR, \fB\-\-literal\fR match PATTERN as a literal string .TP \fB\-r\fR, \fB\-\-regexp\fR match PATTERN as a regular expression .TP \fB\-w\fR, \fB\-\-word\fR match PATTERN as a delimited word .TP \fB\-s\fR, \fB\-\-substring\fR match PATTERN as a substring .IP Note: If PATTERN contains extended regular expression metacharacters, it is interpreted as a regular expression substring. Otherwise, PATTERN is interpreted as a literal word. .TP \fB\-k\fR, \fB\-\-key\fR=\fISTYLE\fR STYLE is one of `token', `pattern' or `none' .TP \fB\-R\fR, \fB\-\-result\fR=\fISTYLE\fR STYLE is one of `filenames', `grep', `edit' or `none' .TP \fB\-S\fR, \fB\-\-separator\fR=\fISTYLE\fR STYLE is one of `braces', `space' or `newline' and only applies to file names when `\-\-result=filenames' .IP The above STYLE options control how query results are presented. Defaults are \fB\-\-key\fR=\fItoken\fR \fB\-\-result\fR=\fIfilenames\fR \fB\-\-separator\fR=\fIspace\fR .TP \fB\-F\fR, \fB\-\-frequency\fR=\fIFREQ\fR find tokens that occur FREQ times, where FREQ is a range expressed as `N..M'. If N is omitted, it defaults to 1, if M is omitted it defaults to MAX_USHRT .TP \fB\-a\fR, \fB\-\-ambiguous\fR=\fILEN\fR find tokens whose names are ambiguous for LEN chars .TP \fB\-x\fR, \fB\-\-hex\fR only find numbers expressed as hexadecimal .TP \fB\-d\fR, \fB\-\-decimal\fR only find numbers expressed as decimal .TP \fB\-o\fR, \fB\-\-octal\fR only find numbers expressed as octal .IP By default, searches match numbers of any radix. .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH "REPORTING BUGS" Report bugs to bug\-idutils@gnu.org .SH "SEE ALSO" The full documentation for .B lid is maintained as a Texinfo manual. If the .B info and .B lid programs are properly installed at your site, the command .IP .B info lid .PP should give you access to the complete manual. ��������������������������������id-utils-4.6+git20120811/man/mkid.x�����������������������������������������������������������������0000664�0000000�0000000�00000000142�11433657032�013274� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] mkid \- build an identifier database [DESCRIPTION] .\" Add any additional description here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/man/fid.x������������������������������������������������������������������0000664�0000000�0000000�00000000213�11433657032�013111� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[NAME] fid \- List identifiers in F1; if F2 is also given, list those common to both [DESCRIPTION] .\" Add any additional description here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/Makefile.am����������������������������������������������������������������0000664�0000000�0000000�00000002310�12204226501�013425� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib libidu src lisp doc man gnulib-tests testsuite po EXTRA_DIST = \ .prev-version \ .version \ cfg.mk \ dist-check.mk \ idutils.spec \ idutils.spec.in \ maint.mk \ bootstrap \ bootstrap.conf \ build-aux/vc-list-files gen_start_date = 2008-01-01 .PHONY: gen-ChangeLog gen-ChangeLog: if test -d .git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog \ --since=$(gen_start_date) > $(distdir)/cl-t; \ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi idutils.spec: idutils.spec.in .version sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-t mv $@-t $@ MAINTAINERCLEANFILES = idutils.spec BUILT_SOURCES = .version .version: echo $(VERSION) > $@-t && mv $@-t $@ # Arrange so that .tarball-version appears only in the distribution # tarball, and never in a checked-out repository. # The perl substitution is to change some key uses of "rm" to "/bin/rm". # See the rm_subst comment for details. dist-hook: gen-ChangeLog echo $(VERSION) > $(distdir)/.tarball-version ALL_RECURSIVE_TARGETS = distcheck-hook distcheck-hook: syntax-check ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/GNUmakefile����������������������������������������������������������������0000664�0000000�0000000�00000011446�12166360012�013460� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Having a separate GNUmakefile lets me 'include' the dynamically # generated rules created via cfg.mk (package-local configuration) # as well as maint.mk (generic maintainer rules). # This makefile is used only if you run GNU Make. # It is necessary if you want to build targets usually of interest # only to the maintainer. # Copyright (C) 2001, 2003, 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 <http://www.gnu.org/licenses/>. # Systems where /bin/sh is not the default shell need this. The $(shell) # command below won't work with e.g. stock DOS/Windows shells. ifeq ($(wildcard /bin/s[h]),/bin/sh) SHELL = /bin/sh else # will be used only with the next shell-test line, then overwritten # by a configured-in value SHELL = sh endif # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. _have-Makefile := $(shell test -f Makefile && echo yes) ifeq ($(_have-Makefile),yes) # Make tar archive easier to reproduce. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner # Allow the user to add to this in the Makefile. ALL_RECURSIVE_TARGETS = include Makefile # Some projects override e.g., _autoreconf here. -include $(srcdir)/cfg.mk # Allow cfg.mk to override these. _build-aux ?= build-aux _autoreconf ?= autoreconf -v include $(srcdir)/maint.mk # Ensure that $(VERSION) is up to date for dist-related targets, but not # for others: rerunning autoreconf and recompiling everything isn't cheap. _have-git-version-gen := \ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) _is-dist-target ?= $(filter-out %clean, \ $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS))) _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS))) ifneq (,$(_is-dist-target)$(_is-install-target)) _curr-ver := $(shell cd $(srcdir) \ && $(_build-aux)/git-version-gen \ .tarball-version \ $(git-version-gen-tag-sed-script)) ifneq ($(_curr-ver),$(VERSION)) ifeq ($(_curr-ver),UNKNOWN) $(info WARNING: unable to verify if $(VERSION) is the correct version) else ifneq (,$(_is-install-target)) # GNU Coding Standards state that 'make install' should not cause # recompilation after 'make all'. But as long as changing the version # string alters config.h, the cost of having 'make all' always have an # up-to-date version is prohibitive. So, as a compromise, we merely # warn when installing a version string that is out of date; the user # should run 'autoreconf' (or something like 'make distcheck') to # fix the version, 'make all' to propagate it, then 'make install'. $(info WARNING: version string $(VERSION) is out of date;) $(info run '$(MAKE) _version' to fix it) else $(info INFO: running autoreconf for new version string: $(_curr-ver)) GNUmakefile: _version touch GNUmakefile endif endif endif endif endif .PHONY: _version _version: cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf) $(MAKE) $(AM_MAKEFLAGS) Makefile else .DEFAULT_GOAL := abort-due-to-no-makefile srcdir = . # The package can override .DEFAULT_GOAL to run actions like autoreconf. -include ./cfg.mk # Allow cfg.mk to override these. _build-aux ?= build-aux _autoreconf ?= autoreconf -v include ./maint.mk ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) $(MAKECMDGOALS): abort-due-to-no-makefile endif abort-due-to-no-makefile: @echo There seems to be no Makefile in this directory. 1>&2 @echo "You must run ./configure before running 'make'." 1>&2 @exit 1 endif # Tell version 3.79 and up of GNU make to not build goals in this # directory in parallel, in case someone tries to build multiple # targets, and one of them can cause a recursive target to be invoked. # Only set this if Automake doesn't provide it. AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) \ dist distcheck tags ctags ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS) ifneq ($(word 2, $(MAKECMDGOALS)), ) ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), ) .NOTPARALLEL: endif endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/cfg.mk���������������������������������������������������������������������0000664�0000000�0000000�00000004041�12204226501�012464� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Customize maint.mk. -*- makefile -*- # Copyright (C) 2003-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 <http://www.gnu.org/licenses/>. # Use the direct link. This is guaranteed to work immediately, while # it can take a while for the faster mirror links to become usable. url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE) # Used in maint.mk's web-manual rule manual_title = GNU idutils: ID database utilities # Tests not to run as part of "make distcheck". local-checks-to-skip = \ sc_bindtextdomain \ sc_changelog \ sc_prohibit_atoi_atof \ sc_prohibit_path_max_allocation old_NEWS_hash = 0d3506ea3896c9f25ac6965df07bc1dd -include $(srcdir)/dist-check.mk update-copyright-env = \ UPDATE_COPYRIGHT_FORCE=1 \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 _hv_file = $(srcdir)/testsuite/help-version exclude_file_name_regexp--sc_cast_of_argument_to_free = ^src/lid\.c$$ exclude_file_name_regexp--sc_program_name = ^testsuite/ exclude_file_name_regexp--sc_prohibit_always_true_header_tests = src/lid\.c$$ exclude_file_name_regexp--sc_prohibit_strcmp = ^libidu/iduglobal\.h$$ config_h_exempt = ^(testsuite/single_file_token_bug\.c|src/lid-[aegl]id\.c)$$ exclude_file_name_regexp--sc_require_config_h = $(config_h_exempt) exclude_file_name_regexp--sc_require_config_h_first = $(config_h_exempt) export _gl_TS_headers = lid.h $(srcdir)/../libidu/*.h export _gl_TS_obj_files = *.$(OBJEXT) ../libidu/*.$(OBJEXT) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/ChangeLog������������������������������������������������������������������0000664�0000000�0000000�00000126723�12166360012�013165� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2012-02-03 Jim Meyering <meyering@redhat.com> version 4.6 * NEWS: Record release date. 2012-01-31 Jim Meyering <meyering@redhat.com> maint: use gnulib's readme-release module * bootstrap.conf (gnulib_modules): Add readme-release. (bootstrap_epilogue): Substitute. * README-release: Remove file. * .gitignore: Update. tests: adapt framework for upcoming automake-1.12 * testsuite/check.mk (LOG_COMPILER): Define. (TESTS_ENVIRONMENT): Adapt to work with the upcoming automake-1.12; use "; 9>&2" at end. Move shell-or-perl to ... * testsuite/shell-or-perl: ... new helper script from coreutils. * testsuite/CuSkip.pm: New file, from coreutils. * testsuite/Makefile.am (EXTRA_DIST): Add CuSkip.pm and shell-or-perl. maint: make copyright statements more consistent; update gnulib * cfg.mk (update-copyright-env): Add UPDATE_COPYRIGHT_FORCE=1 to rejoin some split lines, and UPDATE_COPYRIGHT_USE_INTERVALS=2 to make update-copyright use only one year range. * gnulib: Update. * testsuite/files0-from: Adapt to gnulib's change from `q' to 'q'. build: update bootstrap from gnulib, and adapt * bootstrap: Update from gnulib. * testsuite/init.sh: Update from gnulib. * bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary, snippet that edited gnulib-tests/gnulib.mk. (gnulib_tool_option_extras): Add both --symlink and --makefile-name=gnulib.mk. Remove use of $bt. * lib/Makefile.am: Initialize numerous automake variables so that generated code in gnulib.mk may use += to append to them. build: work around new warning/suggestion to use "pure" * src/mkid.c (check_hits): Change semantics to avoid the warning that this assert-containing function could be declared with the "pure" attribute. Instead, return 0/1, declare "pure" and let the caller perform the assertion. Rename from assert_hits. Add a comment. 2012-01-31 Jim Meyering <meyering@redhat.com> build: add const and pure attributes, per gcc recommendation * src/mkid.c (ceil_log_8, ceil_log_2): Add "const" attribute. (token_hash_1, token_hash_2): Add "pure" attribute. (token_hash_cmp, token_qsort_cmp): Likewise. (count_vec_size, count_buf_size): Likewise. * libidu/idu-hash.c (round_up_2): Add "const" attribute. * libidu/scanners.h (get_language): Add "pure" attribute. * libidu/idfile.h (token_flags): Likewise. (token_count): Likewise. (member_file_qsort_compare): Likewise. (tree8_count_levels): Add "const" attribute. * libidu/walker.c (symlink_ancestry): Add "pure" attribute. (links_depth): Likewise. (file_link_hash_1): Likewise. (vector_length): Likewise. (file_link_hash_compare): Likewise. (string_in_vector): Likewise. * src/lid.c (vector_cardinality, get_radix, dtoi, otoi): Likewise. (is_regexp): Likewise. (vector_length): Remove forward decl and move function definition to precede first use. 2012-01-31 Jim Meyering <meyering@redhat.com> build: turn off two of gcc's warning options * configure.ac: Disable -Winline, at least temporarily due to number of warnings, and low priority, and disable -Wformat-nonliteral, due to inherent false positives. build: fix man-page-building and cross-check rules * man/Makefile.am (defid.1): New dependency. (programs): Use both $(PROGRAMS) and $(SCRIPTS). (check-x-vs-1): Use tr, not fmt, for portability. Use AM_V_GEN. (programs): Likewise. (check-programs-vs-x): Use AM_V_GEN. Remove coreutils-specific code. (t, mapped_name): Remove definitions of unused variables. (.x.1): Remove obsolete comment. Use AM_V_GEN, not echo. 2012-01-28 Jim Meyering <meyering@redhat.com> tests: disable gnulib's get-rusage-as test * bootstrap.conf (avoided_gnulib_modules): Disable the get-rusage-as test: it's failing. 2012-01-01 Jim Meyering <meyering@redhat.com> maint: avoid new syntax-check failure due to #if HAVE_SYS_TYPES_H * libidu/idfile.h: Include <sys/types.h> unconditionally. I.e., drop the now-redundant #if HAVE_SYS_TYPES_H guard. gnulib guarantees the presence of that header. maint: update all copyright year number ranges Run "make update-copyright". 2011-11-29 Jim Meyering <meyering@redhat.com> tests: use "compare exp out", not "compare out exp" Likewise, when an empty file is expected, use "compare /dev/null out", not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 Run these commands: git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,' [here, there were none of the latter] 2011-11-17 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest build: exempt defid from a built-in automake check defid *does* support --help and --version, but only when gid is already in your shell's search path. That is not the case for the first pre-install build. * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Define. maint: stop using gnulib's obsolete "exit" module * bootstrap.conf (gnulib_modules): Remove module. It no longer exists. build: update bootstrap from gnulib * bootstrap: Update. build: stop distributing gzip'd releases; xz is enough * configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip. 2011-08-03 Jim Meyering <meyering@redhat.com> tests: update init.sh from gnulib * testsuite/init.sh: Update from gnulib. 2011-08-02 Jim Meyering <meyering@redhat.com> tests: add a test for the lid radix-handling bug * testsuite/lid-radix: New file. * testsuite/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. 2011-08-02 Shigio YAMAGUCHI <shigio@gnu.org> lid: fix a bug that made it so -o, -x, -d did not work * src/lid.c (radix_flag): Initialize to 0, not radix_all. (main): Map 0 to the default, radix_all. Tiny change. 2011-08-02 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest * cfg.mk (local-checks-to-skip): Add sc_prohibit_path_max_allocation to the list of skipped syntax-check rules. This is temporary. 2011-05-25 Jim Meyering <meyering@redhat.com> maint: update gnulib to latest with accompanying tight-scope tweak * cfg.mk: Include $(srcdir)/dist-check.mk using "-include", to accommodate the new sc_tight_scope rule. * gnulib: Update to latest. 2011-05-24 Jim Meyering <meyering@redhat.com> tests: add tests for the lid -F ..N bug * testsuite/lid-range: New file with tests based on a report by Shigio YAMAGUCHI in http://thread.gmane.org/gmane.comp.gnu.idutils.bugs/137 * testsuite/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention the bug fix. 2011-05-24 Shigio YAMAGUCHI <shigio@gnu.org> lid -F RANGE: fix a bug in handling open-ended ranges * src/lid.c (parse_frequency_arg): lid -F 2.. would mistakenly act like "lid -F 2" and "lid -F ..2" would act like "lid F 1" 2011-05-23 Jim Meyering <meyering@redhat.com> maint: adapt to use gnulib's tight-scope rule; update gnulib to latest * cfg.mk (_gl_TS_headers): Define. (_gl_TS_obj_files): Likewise. * src/Makefile.am (sc_tight_scope): Remove rule. * gnulib: Update to latest. 2011-03-20 Jim Meyering <meyering@redhat.com> maint: stop using .x-sc_* files to list syntax-check exemptions Instead, use the new mechanism with which you merely use a variable (derived from the rule name) defined in cfg.mk to an ERE matching the exempted file names. * gnulib: Update to latest, to get maint.mk that implements this. * .x-sc_cast_of_argument_to_free: Remove file. * .x-sc_program_name: Likewise. * .x-sc_prohibit_always_true_header_tests: Likewise. * .x-sc_require_config_h: Likewise. * .x-sc_require_config_h_first: Likewise. * Makefile.am (EXTRA_DIST): Remove them from here, too. * cfg.mk: Define variables to exempt the same files. maint: remove unused inclusion of <stddef.h> * libidu/scanners.c: As above. * libidu/walker.c: Likewise. * src/mkid.c: Likewise. tests: avoid new compilation failure of a gnulib test program * bootstrap.conf (avoided_gnulib_modules): Do not use --avoid=lock. That would lead to compilation failure of the localenames.c test. maint: avoid new false-positive syntax-check test failures * .x-sc_program_name: Exempt main programs in testsuite/. * .x-sc_prohibit_always_true_header_tests: New file, to exempt src/lid.c from test for uses of cpp conditional, HAVE_TERMIOS_H. It looks like lid.c's uses (of struct termios) cannot be guaranteed to work with gnulib's replacement. maint: remove two empty #if...#endif blocks * src/lid.c: Remove empty #if...#endif blocks. maint: avoid syntax-check failure due to new sc_bindtextdomain rule * cfg.mk (local-checks-to-skip): Add sc_bindtextdomain. Remove references to rules that are no longer in maint.mk. maint: update copyright year ranges to include 2011 Run "make update-copyright". 2011-01-03 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest 2010-11-11 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> mkid, xtokid: fixed conflict checking between include/exclude lang options. * libidu/walker.c: fixed condition. 2010-10-09 Jim Meyering <meyering@redhat.com> maint: describe policy on copyright year number ranges * README: Mention coreutils' long-standing policy on use of M-N ranges in copyright year lists. Requested by Richard Stallman. 2010-09-04 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest build: use gettext-h, not gettext * bootstrap.conf (gnulib_modules): Use gettext-h, not gettext. The latter is overkill for a package that uses AM_GNU_GETTEXT([external]... 2010-06-20 Jim Meyering <meyering@redhat.com> doc: update README * README: Update to reflect that the package is now named "idutils". Add a little to the history. Remove mention of cscope plans. Richard Lloyd reported that README was out of date. 2010-06-19 Jim Meyering <meyering@redhat.com> maint: mention the GPLv3 update in NEWS * NEWS (4.3.92): Note when we switched to GPLv3. * cfg.mk (old_NEWS_hash): Update to reflect addition to old NEWS. Suggested by Karl Berry. 2010-06-18 Jim Meyering <meyering@redhat.com> tests: avoid "make check" failure with Solaris 10's "fmt" * man/Makefile.am (check-x-vs-1): Use "fmt -w 1", not "fmt -w1", since the latter fails on Solaris 10 with "fmt: bad width: 0". Reported by Claudio Fontana. 2010-06-17 Jim Meyering <meyering@redhat.com> maint: update release procedure * README-release: Update. mkid: handle the .xz suffix * libidu/id-lang.map: Teach mkid about the .xz suffix. Tell mkid to use the "xz" program on .lzma files. post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 4.5 * NEWS: Record release date. maint: use gnulib's do-release-commit-and-tag module * bootstrap.conf (gnulib_modules): Add do-release-commit-and-tag. 2010-06-16 Jim Meyering <meyering@redhat.com> tests: fix "make distcheck" failure * testsuite/help-version (mkid_setup): Tell mkid not to access the not-yet-installed id-lang.map file. (xtokid_setup): Likewise. tests: clean up "consistency" and limit the number of files it uses * testsuite/consistency: Use abs_top_srcdir. Perform tests only on files under src, so it doesn't take so long. Stop using "eval" and an explicit $bindir. Don't re-invoke "make". Not needed, now that $abs_top_srcdir is exported from Makefile (via check.mk) to this script. * testsuite/Makefile.am (consistency-real): Remove rule, now that we no longer use it. build: remove now-unnecessary replacement lstat definition * libidu/walker.c [! HAVE_LSTAT] (lstat): Remove definition. Gnulib already handles that. maint: update bootstrap and init.sh from gnulib * bootstrap: Update from gnulib. * testsuite/init.sh: Likewise. build: update gnulib submodule to latest build: require gettext-0.18 * configure.ac: Require it here... * bootstrap.conf (buildreq): ...and here. 2010-05-09 Jim Meyering <meyering@redhat.com> tests: adjust help-version * testsuite/help-version: Use one-line invocation of init.sh. build: avoid new syntax-check failure * libidu/iduglobal.h (FNM_FILE_NAME): Remove definition. Now, it's provided by gnulib. build: update from gnulib * bootstrap: Update from gnulib. * testsuite/init.sh: Update from gnulib. * gnulib: Update to latest. doc: add "gid" to the menus and direntry list * doc/idutils.texi (gid invocation): Add a section on "gid". doc: add @dircategory to Info documentation The Texinfo documentation says that Info files should use @dircategory, and suggests consulting the Free Software Directory to select a category name. The directory places under ""Text creation and manipulation". * doc/idutils.texi: Add "@dircategory Text creation and manipulation". Inspired by a nearly identical patch by Colin Watson for Parted. mkid: use ftello (not ftell) and fail if an offset is 2^32 or larger This is necessary because the internal layout requires that an offset be representable as a 4-byte quantity. * src/mkid.c (write_id_file): Use ftello, not ftell. The latter would fail on files larger than 4GiB. Now, we still fail for such files, but use ftello instead -- and give a diagnostic. 2010-05-01 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest tests: add help-version, from grep * testsuite/help-version: New file. * testsuite/init.sh: New file, from gnulib. * testsuite/Makefile.am (EXTRA_DIST): Add init.sh. (TESTS): Add help-version. * cfg.mk (_hv_file): Define. * testsuite/check.mk (TESTS_ENVIRONMENT): Define VERSION, for help-version's cross check. (built_programs): Adjust to work, and to accommodate $(EXEEXT). maint: accommodate new syntax-check rules * bootstrap.conf (gnulib_modules): Add sys_ioctl * src/lid.c: Include <sys/ioctl.h> unconditionally. * libidu/xnls.h: Don't depend on HAVE_LOCALE_H. <locale.h> is always available. maint: accommodate new empty-line-EOF syntax-check rule * lisp/Makefile.am (dist_lisp_LISP): Remove empty line at EOF doc: update to version 1.3 of the FDL * doc/idutils.texi: Update to FDL 1.3. * NEWS: Likewise. * cfg.mk (old_NEWS_hash): Update to accommodate this change. 2010-04-21 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest 2010-01-03 Jim Meyering <meyering@redhat.com> maint: record update-copyright options for this package * cfg.mk: Next time, just run "make update-copyright". 2010-01-01 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest maint: remove all .cvsignore files maint: update all FSF copyright year lists to include 2010 Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright 2009-12-31 Jim Meyering <meyering@redhat.com> maint: sync dist-check.mk from coreutils * dist-check.mk: Update. maint: newer gnulib; don't hard-code my GPG key ID * cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it. * gnulib: Update to latest. 2009-12-01 Jim Meyering <meyering@redhat.com> build: correct relative name of .version file * man/Makefile.am (common_dep): Use ../.version, not $(top_srcdir)/.version. Reported by Markus Armbruster. 2009-11-20 Jim Meyering <meyering@redhat.com> maint: cfg.mk: remove factored-out ftp host/dir definitions * cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable): (gnu_rel_host, url_dir_list): Remove definitions. The defaults, now provided by maint.mk, are the same. * gnulib: Update for latest, including those maint.mk additions. 2009-11-13 Jim Meyering <meyering@redhat.com> build: require gettext-0.17 * configure.ac: Require gettext-0.17; it was released two years ago. build: correct gettext configure-time support * configure.ac: Use AM_GNU_GETTEXT([external], [need-ngettext]), rather than AM_GNU_GETTEXT([external], [need-formatstring-macros]). Reported by Martin Jacobs in http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3181 2009-11-07 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest 2009-10-31 Jim Meyering <meyering@redhat.com> admin: distribute gnu-web-doc-update * bootstrap.conf (gnulib_modules): Add gnu-web-doc-update. admin: document release procedure (copied from gzip's) * README-release: New file. 2009-10-30 Jim Meyering <meyering@redhat.com> post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 4.4 * NEWS: Record release date. build: accommodate new syntax-check test Use EXIT_FAILURE and EXIT_SUCCESS, not 1 and 0. Apply these commands: perl -pi -e 's/\berror \(1,/error (EXIT_FAILURE,/' \ $(git grep -l '\<error (1,') perl -pi -e 's/\bexit \(1\)/exit (EXIT_FAILURE)/' \ $(git grep -l '\<exit (1)') perl -pi -e 's/\bexit \(0\)/exit (EXIT_SUCCESS)/' \ $(git grep -l '\<exit (0)') * libidu/idread.c (read_id_file, maybe_read_id_file, io_read): * libidu/idu-hash.c (hash_init): * libidu/idwrite.c (io_write): * libidu/scanners.c (parse_language_map, parse_language_map_file): (read_language_map_file): * libidu/walker.c (include_languages, exclude_languages): (get_current_dir_link): * src/fid.c (usage, help_me, main): * src/fnid.c (usage, help_me, main): * src/lid.c (usage, help_me, main, report_grep, report_edit): (query_regexp): * src/mkid.c (main, assert_writeable, write_id_file): * src/xtokid.c (help_me): build: update gnulib submodule to latest 2009-10-19 Jim Meyering <meyering@redhat.com> build: update gnulib submodule to latest 2009-10-18 Jim Meyering <meyering@redhat.com> build: update bootstrap from coreutils * bootstrap: Update from coreutils. * bootstrap.conf: Likewise. build: update gnulib submodule to latest 2009-09-30 Jim Meyering <meyering@redhat.com> maint: use proper distribution upload url * cfg.mk (url_dir_list): Use $(PACKAGE), not coreutils. build: avoid warning exposed by gcc-4.4.1 * src/fid.c (help_me): Declare with noreturn attribute. * src/fnid.c (help_me): Likewise. * src/lid.c (help_me): Likewise. * src/mkid.c (help_me): Likewise. * src/xtokid.c (help_me): Likewise. build: use more gnulib modules for better POSIX compliance * bootstrap.conf (gnulib_modules): Add modules exposed via make CFLAGS=-DGNULIB_POSIXCHECK 2>&1 \ |perl -lne '/.* use gnulib module (\S+).*/ and print $1' \ |sort |uniq -c|sort -nr calloc, fflush, fopen, freopen, fprintf-posix, printf-posix, sprintf-posix 2009-08-31 Jim Meyering <meyering@redhat.com> maint: update gnulib submodule to latest maint: declare usage with "noreturn" attribute, so... * libidu/scanners.c: ...tools like llvm understand flow control better. maint: use better syntax: NULL, not 0, in pointer comparison * libidu/scanners.c (language_save_arg): Compare pointer to NULL, not 0. maint: mkid, xtokid: remove unnecessary initialization * src/xtokid.c (main): Don't set "skip_file" unnecessarily. * src/mkid.c (main): Likewise. build: don't use -Werror in lib/ * lib/Makefile.am (AM_CFLAGS): Don't use $(WERROR_CFLAGS). 2009-08-16 Jim Meyering <meyering@redhat.com> build: enable warning options also in lib/ * lib/Makefile.am (AM_CFLAGS): Fix typo: s/WARNING_CFLAGS/WARN_CFLAGS/ 2009-08-15 Jim Meyering <meyering@redhat.com> maint: configure update-copyright to use intervals * cfg.mk (update-copyright-env): Define. maint: update copyright year lists to include 2009 maint: make @copyright line recognizable to update-copyright * doc/idutils.texi: Remove "(C)" from copyright line. build: avoid "make distcheck" failure and distracting diagnostics * testsuite/check.mk (built_programs): Rewrite so that it works. (TESTS_ENVIRONMENT): Use $$f, not $$tst. The latter included a $(srcdir)/ prefix that was fatal in the non-srcdir build case. rename hash.? to idu-hash.? to avoid conflict with gnulib's hash.h Now that gnulib's exclude module uses gnulib's hash module, which includes a hash.h file, idutils' use of a hash.h file conflicted. Rename the one here in idutils: * libidu/idu-hash.c: Rename from hash.c. * libidu/idu-hash.h: Rename from hash.h. * libidu/idfile.h: Reflect renaming. * libidu/idread.c: Likewise. * libidu/idwrite.c: Likewise. * src/mkid.c: Likewise. * libidu/Makefile.am: Likewise. build: use gnulib's update-copyright module * bootstrap.conf (gnulib_modules): Add update-copyright. build: use gnulib's getopt-gnu module (getopt is now deprecated) * bootstrap.conf (gnulib_modules): Gnulib's getopt module is now deprecated; use the new, preferred name, getopt-gnu. build: update from gnulib * gnulib: Update submodule to latest. build: avoid a legitimate warning exposed by newer gcc * libidu/scanners.c (language_save_arg): Remove decl of unused static local, horizontal_space. tests: run the latest test * testsuite/Makefile.am (EXTRA_DIST): Add mkid-langopt. * NEWS: Tweak wording. * testsuite/mkid-langopt: Add a comment. 2009-08-13 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> mkid: avoid segfault with "-l OPT" * libidu/scanners.c: languages_0[] is not const anymore, since this would make impossible to set lang->lg_argv * libidu/scanners.c: language_save_arg now manages language options with zero or one argument. * doc/idutils.texi: update to reflect the behavior of mkid "-l" option. * testsuite/mkid-langopt: new test program. 2009-07-04 Jim Meyering <meyering@redhat.com> maint: ignore *.1 man pages * .gitignore: Ignore man/*.1. build: require/use newer automake * configure.ac: require automake-1.11. Enable color-tests and parallel-tests options. tests: remove now-unnecessary build-aux/check.mk * build-aux/check.mk: Remove file. * testsuite/check.mk: Don't include build-aux/check.mk. tests: avoid a false-positive failure * testsuite/consistency: Manually remove single_file_token_bug.c from the list of files to be compared, since it would provoke a false positive. tests: update CuTmpdir.pm from coreutils * testsuite/CuTmpdir.pm: Update from coreutils. mkid, xtokid: read and process --files0-from= input a name at a time, rather than by reading the entire input into memory and *then* processing each file name. * src/mkid.c: Include "argv-iter.h", not "readtokens0.h". (main): Rewrite to use argv-iter. * src/xtokid.c: Likewise. Include <assert.h>. * bootstrap.conf (gnulib_modules): Add argv-iter. Remove readtokens0. * libidu/iduglobal.h (STREQ): Define. (bad_cast): Define. remove wc-related code that doesn't apply here * src/mkid.c: Don't handle a file name of "-" specially. * src/xtokid.c: Likewise. * testsuite/files0-from: Don't test for it. tests: add testing framework, and tests for the new option * NEWS (New features): Mention the new option. * src/mkid.c (main): Adjust a diagnostic. * src/xtokid.c (main): Adjust a diagnostic. * bootstrap.conf (gnulib_modules): Add perl and posix_shell * build-aux/check.mk: New file, from coreutils. * testsuite/Coreutils.pm: Likewise. * testsuite/CuTmpdir.pm: Likewise. * testsuite/check.mk: Likewise. * testsuite/envvar-check: Likewise. * testsuite/files0-from: New test, based on one from coreutils. * testsuite/Makefile.am (TESTS): Add files0-from. (TESTS_ENVIRONMENT): Remove definition. Now it's in check.mk. (EXTRA_DIST): Add Coreutils.pm CuTmpdir.pm envvar-check and check.mk. Include $(srcdir)/check.mk. 2009-07-04 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> mkid, xtokid: accept a new option --files0-from=FILE * bootstrap.conf (gnulib_modules): Add quote and readtokens0. * doc/idutils.texi: Document the option. * src/mkid.c (usage, FILES0_FROM_OPTION, long_options, help_me) (main): Implement. * src/xtokid.c (usage, FILES0_FROM_OPTION, long_options, help_me) (main): Likewise. 2009-07-04 Jim Meyering <meyering@redhat.com> gnulib: update to latest, to get argv-iter 2009-06-30 Jim Meyering <meyering@redhat.com> build: update from coreutils * README-hacking: Update from coreutils. * bootstrap.conf: Likewise. * bootstrap: Likewise. * dist-check.mk: Likewise. 2009-06-16 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> Fixed bug #22154: --default-lang does nothing * libidu/scanners.c: set_default_language function implemented. 2009-06-07 Jim Meyering <meyering@redhat.com> maint: add const attribute to a few declarations * libidu/hash.c (hash_print_stats, hash_dump): Add const. * libidu/hash.h: Likewise. * src/mkid.c (scan_files): Likewise. build: avoid warning from newer gcc * configure.ac: Turn off -Wunsafe-loop-optimizations. build: update from gnulib * gnulib: Update submodule to latest. 2009-05-18 Ludovic Courtès <ludo@gnu.org> elisp: use `read-shell-command' in `gid' * lisp/idutils.el (gid): Use `read-shell-command' instead of `read-string', to allow for completion. 2009-05-17 Jim Meyering <meyering@redhat.com> maint: cfg.mk: remove now-unnecessary gnulib_dir definition * cfg.mk (gnulib_dir): Remove definition, now that gnulib's maint.mk provides the default we want. build: update from gnulib, for rename.m4 fix, improved tests, etc. * gnulib: Update submodule to latest. build: adjust warnings * configure.ac: Enable a few warning options that didn't need to be disabled; disable -Wlong-long (for latest gcc snapshot). maint: remove unused file * m4/extra_dist.sh: Remove now-unused file. 2009-04-30 Jim Meyering <meyering@redhat.com> clean-up: use proper types * src/fid.c (get_file_index): Use size_t for lengths, not int. avoid a legitimate -Wstrict-overflow warning * libidu/scanners.h (log_8_member_files): Change type from int to size_t. * libidu/scanners.c: Likewise. build: suppress more warnings * src/fid.c (usage): Declare with __noreturn__ attribute. * src/fnid.c (usage): Likewise. * src/lid.c (usage): Likewise. * src/mkid.c (usage): Likewise. * src/xtokid.c: (usage): Likewise. * src/mkid.c (sum_files): Remove unused macro. build: suppress warnings about ignored return value from fread/fwrite * libidu/idwrite.c: include "ignore-value.h". (io_write): Ignore fwrite return value. * libidu/idread.c: Likewise for fread. * bootstrap.conf (gnulib_modules): Add ignore-value. build: remove unused macros * libidu/scanners.c (ISSPACE, WS): Remove unused macros. build: avoid a warning * libidu/idfile.c (sizeof_idhead): Avoid old-style function definition. build: remove unused macros * libidu/idread.c (TOK_COUNT_ADDR): Remove unused macro. (TOK_HITS_ADDR): Likewise. build: enable new compiler warning options * src/Makefile.am (AM_CFLAGS): Define to $(WARN_CFLAGS) $(WERROR_CFLAGS). * libidu/Makefile.am (AM_CPPFLAGS): Remove bogus -I$(top_builddir)/intl (AM_CFLAGS): Define to $(WARN_CFLAGS) $(WERROR_CFLAGS). * src/Makefile.am (AM_CPPFLAGS): Remove bogus -I.../intl 2009-04-29 Jim Meyering <meyering@redhat.com> build: address automake warning * lib/Makefile.am (AM_CFLAGS): Increment, rather than assigning, so as not to override settings from just-included gnulib.mk. build: accommodate maint.mk, now that it's pulled from gnulib * dist-check.mk: New file, from coreutils. Was part of maint.mk. * cfg.mk (old_NEWS_hash): Include $(srcdir)/dist-check.mk. Remove trailing " -", to align with new check in maint.mk. * Makefile.am (EXTRA_DIST): Add dist-check.mk. maint: enable many gcc warnings * bootstrap.conf (gnulib_modules): Add warnings and manywarnings. * configure.ac: Use gl_MANYWARN_ALL_GCC, and exclude options I don't want or that provoke too many warnings. (WARN_CFLAGS, WERROR_CFLAGS): Define. (lint, GNULIB_PORTCHECK): Define. (_FORTIFY_SOURCE): Define to 2. * .cvsignore: Remove now-unused file. build: use maint.mk from gnulib * maint.mk: Remove file. Now it's generated. * .gitignore: Ignore it. * bootstrap.conf (gnulib_modules): Add maintainer-makefile. Remove obsolete modules. maint: use a git submodule for gnulib * .gitmodules: New file, to track gnulib. * gnulib: New file, created by running this: git submodule add git://git.sv.gnu.org/gnulib.git gnulib * configure.ac (AM_INIT_AUTOMAKE): Require automake-1.10b or newer. 2009-04-27 Jim Meyering <meyering@redhat.com> build: make automake's silent-rules option the default * configure.ac (AM_SILENT_RULES): Use this, with it's "yes" argument. Those who want verbose build output may configure with --disable-silent-rules or use "make V=1". 2009-03-21 Jim Meyering <meyering@redhat.com> * maint.mk: sync from coreutils 2009-03-18 Jim Meyering <meyering@redhat.com> maint.mk: update from coreutils * maint.mk: Sync. * cfg.mk (manual_title): Define. 2009-03-02 Jim Meyering <meyering@redhat.com> * cfg.mk (old_NEWS_hash): Update. maint.mk: update from coreutils * maint.mk: Modernize (sc_tight_scope): Move this rule to... * idutils/cfg.mk (sc_tight_scope): ...here. * .x-sc_require_config_h_first: New file. * doc/idutils.texi: Update copyright year. * configure.ac: Use dist-xz rather than dist-lzma. 2009-03-02 Ludovic Courtès <ludo@gnu.org> recognize `.org' files as text * libidu/id-lang.map: Add `.org' extension, for Emacs Org-Mode files. 2008-11-30 Jim Meyering <meyering@redhat.com> * src/lid.c: Remove duplicate inclusion of <termios.h>. * src/fnid.c: Remove duplicate inclusion of <errno.h>. 2008-10-26 Jim Meyering <meyering@redhat.com> recognize a few more file types * libidu/id-lang.map: Recognize .rb, .in.h, .PL, configure.in, and GNUmakefile. avoid a start-up leak * libidu/walker.c (get_current_dir_link): Don't leak cwd_0. 2008-10-22 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> accommodate gnulib header removals * libidu/idfile.c: Include <sys/stat.h>, not "lstat.h". * libidu/scanners.c: Likewise. * libidu/walker.c: Likewise. * src/mkid.c: Likewise. 2008-10-18 Jim Meyering <meyering@redhat.com> post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. * NEWS: Record release date; add copyright at bottom. sync from coreutils * maint.mk: Sync from coreutils. * bootstrap: Likewise. * README-hacking: Likewise. * bootstrap.conf: Standardize copyright comments. (gnulib_modules): Add announce-gen and strcasestr. add idutils.spec.in * idutils.spec.in: New file, mostly from from Markus Armbruster. * Makefile.am (idutils.spec): New rule. (EXTRA_DIST): Add idutils.spec.in and idutils.spec. * .gitignore: Add idutils.spec. 2008-09-13 Jim Meyering <meyering@redhat.com> set coding system to utf8 in THANKS * THANKS: and adjust François' name accordingly. 2008-09-12 Jim Meyering <meyering@redhat.com> * lisp/idutils.el: Update suggested autoload syntax in comment. use dist_man1_MANS rather than dist_man_MANS: efficiency * man/Makefile.am: Use dist_man1_MANS rather than dist_man_MANS. Recommended in automake documentation, for more efficient install. 2008-08-30 Jim Meyering <meyering@redhat.com> tests: adjust failure diagnostic to match reality * testsuite/consistency: Correct suffix, s/xtokid/xti/ in diagnostics. Also fix a double temp-file naming bug: s/fid/lid/g. * bootstrap: Update from coreutils. 2008-06-24 Jim Meyering <meyering@redhat.com> avoid warnings, adjust for const-correctness * libidu/scanners.c (long_options_c, long_options_asm) (long_options_text, long_options_perl): Add initializers. * src/fid.c (long_options): Add initializers. * src/fnid.c (long_options): Add initializers. * src/lid.c (ATTRIBUTE_UNUSED): Define. (long_options): Add initializers. (report_nothing): Mark parameter as unused. (get_editor_argv, report_edit): Adjust for const-correctness. * src/mkid.c (long_options): Add initializers. (report_statistics): Don't subtract "void*" pointers. Cast to "char*". * src/xtokid.c (long_options): Add initializers. remove redundant "const" in declarations * libidu/scanners.c (languages_0, long_options_c): Likewise. (long_options_asm, long_options_text, long_options_perl): Likewise. * src/fid.c (long_options): Likewise. * src/fnid.c (long_options): Likewise. * src/lid.c (long_options): Likewise. * src/mkid.c (long_options): Likewise. * src/xtokid.c (long_options): Likewise. * maint.mk: sync from coreutils 2008-06-14 Jim Meyering <meyering@redhat.com> sync maint.mk from coreutils, and adjust to conform * libidu/scanners.c (long_options_c, long_options_asm): Add "const". (long_options_text, long_options_perl): Likewise. * src/fnid.c (long_options): Likewise. * src/lid.c (long_options): Likewise. * src/xtokid.c (long_options): Likewise. 2008-06-04 Jim Meyering <meyering@redhat.com> exempt the four new src/lid-?id.c files from config.h test * .x-sc_require_config_h: Add the regexp. use gnulib's progname module * bootstrap.conf (gnulib_modules): Add progname. * src/mkid.c: Include "progname.h". (program_name): Remove declaration. (main): Call set_program_name rather than setting program_name. * src/fid.c: Likewise. * src/fnid.c: Likewise. * src/lid.c: Likewise. * src/xtokid.c: Likewise. * maint.mk: sync from coreutils 2008-05-30 Jim Meyering <meyering@redhat.com> * bootstrap.conf (gnulib_modules): Add autobuild. 2008-05-28 Jim Meyering <meyering@redhat.com> * maint.mk: Merge from coreutils. build aid, eid, and gid as binaries (were scripts) * src/lid.c: Include "lid.h". (main): Set defaults based on new global, lid_mode. * src/Makefile.am (bin_PROGRAMS): Add aid, eid, gid. (dist_bin_SCRIPTS): Remove them from this list. (noinst_HEADERS, aid_SOURCES, eid_SOURCES): Define. (gid_SOURCES, lid_SOURCES): Define. * src/aid, src/eid, src/gid: Remove scripts. * src/lid-aid.c, src/lid-eid.c, src/lid-gid.c, src/lid-lid.c: * src/lid.h: New files. * man/Makefile.am (aid.1, eid.1, gid.1): Adjust dependencies. * .gitignore: Add src/aid, src/eid, src/gid. 2008-05-27 Jim Meyering <meyering@redhat.com> enforce --help and --version compliance * configure.ac (AM_INIT_AUTOMAKE): Add std-options. perform gnulib tests first * Makefile.am (SUBDIRS): Make gnulib-tests precede testsuite. 2008-05-22 Jim Meyering <meyering@redhat.com> don't ignore pre-fclose ID-file write error * src/mkid.c (write_id_file): Test ferror, too. 2008-05-20 Jim Meyering <meyering@redhat.com> detect write error on stdout * src/fid.c: Include "closeout.h". (main): Use it via atexit. * src/fnid.c (main): Likewise. * src/lid.c (main): Likewise. * src/mkid.c (main): Likewise. * src/xtokid.c (main): Likewise. * NEWS: Mention the bug fixes. 2008-05-19 Jim Meyering <meyering@redhat.com> recognize more suffixes: .mk, .ac, .bz2, .lzma. * libidu/id-lang.map: Add .mk -> make, .ac -> m4. Handle .bz2 and .lzma, too. * NEWS: Mention this. Add a few more news items. 2008-05-17 Jim Meyering <meyering@redhat.com> tighten scope in libidu/, too Mark with "extern" the symbols that belong that way. Make the others static. * libidu/dynvec.h (dv_fill): * libidu/fnprint.c (cw_dlink): * libidu/hash.h (qsort_cmp_t): * libidu/idfile.h (io_func_t): * libidu/scanners.c (lang_args_obstack, languages_0, languages_N): (language_help_me, language_getopt, get_language): (lang_args_index): * libidu/walker.c (largest_member_file): * maint.mk (extract_char, today): * src/fid.c (long_options): * src/fnid.c (cw_dlink): * src/lid.c (cw_dlink): * src/xtokid.c (cw_dlink): * src/Makefile.am (sc_tight_scope): Improve. make more functions static declare many global variable to be "static" Remove the few that were thus exposed as being unused. Remove some unused prototypes. tests: make scope check work when $(noinst_HEADERS) is empty * src/Makefile.am (sc_tight_scope): Add /dev/null as an argument to the sed-based variable filter, in case $(noinst_HEADERS) is empty. Remove unused functions. * src/lid.c (linetty): Remove unused function. (file_name_wildcard): Likewise. * src/lid.c (strcasestr): Remove function. make functions static tests: enable scoping check * cfg.mk (local-checks-to-skip): Don't skip sc_tight_scope anymore. * src/Makefile.am (sc_tight_scope): New rule. From coreutils. * bootstrap: Sync from coreutils. Generate man pages, update from coreutils. * configure.ac (AC_CONFIG_FILES): Add man/Makefile. Check for help2man. * man/Makefile.am: New file. * .gitignore: Add .version and .tarball-version. * Makefile.am (SUBDIRS): Add man. * cfg.mk: Update from coreutils. * maint.mk: Likewise. * man/aid.x: New file. * man/defid.x: Likewise. * man/eid.x: Likewise. * man/fid.x: Likewise. * man/fnid.x: Likewise. * man/gid.x: Likewise. * man/lid.x: Likewise. * man/mkid.x: Likewise. * man/xtokid.x: Likewise. 2008-05-10 Jim Meyering <meyering@redhat.com> * src/defid: Handle --help and --version. * configure.ac (AM_INIT_AUTOMAKE): Add dist-lzma. Use new gnulib gnumakefile module. * bootstrap.conf (gnulib_modules): Pull in new module. * GNUmakefile: Remove from version control. * .gitignore: Update. * configure.ac (AC_CONFIG_LINKS): Delete; rely on gnulib to do this now. * Makefile.am (EXTRA_DIST): Remove GNUmakefile. 2008-03-21 Jim Meyering <meyering@redhat.com> Sync GNUmakefile with gnulib. * GNUmakefile (Makefile.cfg): Rename... (cfg.mk): ...to this, and make optional. (GNUmakefile.cfg): Delete, redundant with cfg.mk. (Makefile.maint): Rename... (maint.mk): ...to this. (all) [!_have-Makefile]: Rename... (abort-due-to-no-makefile): ...to this, and invoke via .DEFAULT_GOAL to pick up all targets. * Makefile.cfg: Rename... * cfg.mk: ...to this. * Makefile.maint: Rename... * maint.mk ...to this. (ME): Reflect rename. (makefile-check, m4-check, author_mark_check, msg): Use $(ME) rather than hard-coded name. 2008-03-18 Jim Meyering <meyering@redhat.com> * bootstrap.conf (gnulib_modules): Add useless-if-before-free. Update from coreutils. * GNUmakefile: Likewise. * Makefile.maint: Likewise. * configure.ac: Likewise. 2008-03-03 Jim Meyering <meyering@redhat.com> Update .tarball-version-related rules from coreutils. * GNUmakefile: Support VPATH "make dist". Namespace clean-up. Remove .version-creating rules. * configure.ac (AC_INIT): Use .tarball-version, not .version * bootstrap: Update from coreutils. * bootstrap.conf (obsolete_gnulib_modules): Remove free. * Makefile.am: Emit .tarball-version into tarball. 2008-02-27 Jim Meyering <meyering@redhat.com> * testsuite/Makefile.am (TESTS_ENVIRONMENT): Remove abs_top_builddir setting. Not needed. 2008-02-14 Bob Proulx <bob@proulx.com> Fix testsuite PATH for VPATH builds. * testsuite/Makefile.am (PATH): Prepend $(abs_top_builddir). Add version report for aid program test dependency. * testsuite/infloop-kawa-el [VERBOSE]: Print aid version. 2008-02-14 Jim Meyering <meyering@redhat.com> aid, eid, gid: Make these scripts executable in srcdir. This fixes a test failure that would occur when "aid" is not already installed anywhere in your search PATH. * src/aid: chmod a+x. * src/eid: Likewise. * src/gid: Likewise. Reported by Bob Proulx. 2008-02-09 Jim Meyering <meyering@redhat.com> * lisp/idutils.el (gid): Use read-string, not deprecated read-input. Remove version comment from idutils.el. * lisp/idutils.el: Remove version string comment. * Makefile.am (distcheck-hook): Remove rule. * Makefile.am (dist-hook): Write ChangeLog only if .git/ exists. Modify bootstrap.conf, not bootstrap (for ChangeLog-generation). * bootstrap.conf: touch ChangeLog here, ... * bootstrap: ...not here. Generate ChangeLog at "make dist" time. * Makefile.am (dist-hook): New rule. * bootstrap.conf (gnulib_modules): Add gitlog-to-changelog. Pull vc-list-files from gnulib. * bootstrap.conf (gnulib_modules): Add vc-list-files. * build-aux/vc-list-files: Remove from version-control. Makefile.maint: Update from coreutils. 2008-01-30 Jim Meyering <meyering@redhat.com> Remove unnecessary test before "free". * libidu/walker.c (get_current_dir_link): Remove "if (xcwd)" just before "free (xcwd);". Remove more files that are now in build-aux/. * config.rpath: Remove file. * mkinstalldirs: Remove file. Avoid printf-format-vs-arg type mismatch warnings. * src/mkid.c (report_statistics): Cast ptrdiff_t to unsigned long long. Remove trailing blanks. * README-alpha: * TODO: * doc/idutils.texi: * libidu/scanners.c (set_uchar_ctype, ARGS, get_token_lisp): * src/Makefile.am: * src/fid.c (main): * src/lid.c (report_edit): * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank, thus enabling that check. Remove useless multiply-by-1. Avoid sizeof TYPE: use equivalent sizeof *VAR. * libidu/dynvec.c (make_dynvec): * libidu/scanners.c (parse_language_map_file, parse_args_c) (parse_args_asm, parse_args_text): Allocate safely. * libidu/dynvec.c (make_dynvec, dynvec_freeze, dynvec_append): Use xnmalloc, not xmalloc (n * sizeof T). Use xnrealloc, not xrealloc (p, n * sizeof T). * libidu/walker.c (append_strings_to_vector, vectorize_string): Likewise. * libidu/scanners.c (tokenize_args_string): Likewise. Use xstrdup, not strdup. * src/lid.c (get_editor_argv): Use xstrdup, not strdup. * libidu/walker.c (get_current_dir_link): Likewise. * libidu/idfile.c: Include "xalloc.h". (locate_id_file_name): Handle failed strdup. * libidu/scanners.c (parse_args_text, parse_args_perl): Likewise. (parse_args_c, parse_args_asm): Likewise. 2008-01-14 Jim Meyering <meyering@redhat.com> fid: avoid buffer overrun. * libidu/idread.c (deserialize_file_links): Fix typo (or think-o). Here's what valgrind reported: Invalid write of size 4 at 0x804A15A: deserialize_file_links (idread.c:132) by 0x8049DEE: maybe_read_id_file (idread.c:74) by 0x8049C64: read_id_file (idread.c:46) by 0x80492FB: main (fid.c:170) Address 0x41EB944 is 628 bytes inside a block of size 629 alloc'd at 0x4022765: malloc (vg_replace_malloc.c:149) by 0x80516BC: xnmalloc_inline (xmalloc.c:49) by 0x80516EE: xmalloc (xmalloc.c:65) by 0x8049E2F: deserialize_file_links (idread.c:87) by 0x8049DEE: maybe_read_id_file (idread.c:74) by 0x8049C64: read_id_file (idread.c:46) by 0x80492FB: main (fid.c:170) 2008-01-14 Jim Meyering <meyering@redhat.com> Replace uses of xrealloc with uses of safer variants. * src/mkid.c (write_id_file): Avoid risk of overflow. (make_sibling_summary, add_token_to_summary): Likewise. src/mkid.c: Remove now-unused declaration of dirname. lisp/idutils.el: Restore "Version: ..." comment. Ensure that a ChangeLog file exists before running automake. Add ChangeLog to .gitignore. Convert to coreutils-flavored gnulib. ChangeLog-2007: Rename from ChangeLog. distribute.sh: Remove now-unused file. * distribute.sh: Remove file. Now, use "make alpha", "make stable", etc. and follow resulting instructions that tell how to invoke build-aux/gnupload. Update copyright year. Avoid a test failure. * testsuite/infloop-kawa-el: Invoke mkid with -m, since id-lang.map may not be installed yet. * testsuite/Makefile.am (TESTS_ENVIRONMENT): Set abs_top_srcdir. Mark diagnostics for translation. * src/mkid.c (main): Mark with _(...). * libidu/walker.c (exclude_languages, include_languages): Likewise. * src/lid.c (report_grep): Likewise. Put at least two spaces between an option and its description. help2man requires this. * src/lid.c: Add another space before the description. * src/mkid.c: Likewise. * src/xtokid.c: Likewise. Adjust indentation in ChangeLog to use only TABs. Avoid SPACE-TAB. * testsuite/consistency: Use TAB-SPACE, instead. * src/defid: Likewise. Don't cast x*alloc return value. * libidu/hash.c (hash_rehash): Remove cast. (hash_init): Likewise. 2008-01-04 Jim Meyering <meyering@redhat.com> Don't include <strsep.h>. Now it's guaranteed to be in <string.h>. * libidu/walker.c: Don't include <strsep.h>. * libidu/idfile.c: Likewise. * libidu/scanners.c: Likewise. Remove files now pulled from gnulib. Also remove all intl/ files. ���������������������������������������������id-utils-4.6+git20120811/.prev-version��������������������������������������������������������������0000664�0000000�0000000�00000000004�12204226501�014027� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/.tarball-version�����������������������������������������������������������0000664�0000000�0000000�00000000004�12166360012�014477� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������4.6 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/�����������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465166�013437� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/lid-radix��������������������������������������������������������0000775�0000000�0000000�00000002604�12166360012�015236� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Demonstrate how lid's -o, -d and -x options work # Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src echo 255 > d.txt || framework_failure_ echo 0255 >d2.txt || framework_failure_ echo 0377 > o.txt || framework_failure_ echo 377 > o2.txt || framework_failure_ echo 0xff > x.txt || framework_failure_ echo ff > x2.txt || framework_failure_ echo '*.txt text' > map || framework_failure_ mkid -m map || framework_failure_ cat <<EOF > exp.all d.txt o.txt x.txt EOF for i in d o x; do echo $i.txt > exp.$i || framework_failure_ done lid --key=none 0xff > out || fail=1 compare exp.all out || fail=1 for i in d o x; do lid --key=none -$i 0xff > out || fail=1 compare exp.$i out || fail=1 done Exit $fail ����������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/help-version�����������������������������������������������������0000775�0000000�0000000�00000020463�12166360012�015777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Make sure all these programs work properly # when invoked with --help or --version. # Copyright (C) 2000-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 <http://www.gnu.org/licenses/>. # Ensure that $SHELL is set to *some* value and exported. # This is required for dircolors, which would fail e.g., when # invoked via debuild (which removes SHELL from the environment). test "x$SHELL" = x && SHELL=/bin/sh export SHELL . "${srcdir=.}/init.sh"; path_prepend_ ../src expected_failure_status_chroot=125 expected_failure_status_env=125 expected_failure_status_nice=125 expected_failure_status_nohup=125 expected_failure_status_stdbuf=125 expected_failure_status_su=125 expected_failure_status_timeout=125 expected_failure_status_printenv=2 expected_failure_status_tty=3 expected_failure_status_sort=2 expected_failure_status_expr=3 expected_failure_status_lbracket=2 expected_failure_status_dir=2 expected_failure_status_ls=2 expected_failure_status_vdir=2 expected_failure_status_cmp=2 expected_failure_status_zcmp=2 expected_failure_status_sdiff=2 expected_failure_status_diff3=2 expected_failure_status_diff=2 expected_failure_status_zdiff=2 expected_failure_status_zgrep=2 expected_failure_status_zegrep=2 expected_failure_status_zfgrep=2 expected_failure_status_grep=2 expected_failure_status_egrep=2 expected_failure_status_fgrep=2 test "$built_programs" \ || fail_ "built_programs not specified!?!" test "$VERSION" \ || fail_ "set envvar VERSION; it is required for a PATH sanity-check" # Extract version from --version output of the first program for i in $built_programs; do v=$(env $i --version | sed -n '1s/.* //p;q') break done # Ensure that it matches $VERSION. test "x$v" = "x$VERSION" \ || fail_ "--version-\$VERSION mismatch" for lang in C fr da; do for i in $built_programs; do # Skip `test'; it doesn't accept --help or --version. test $i = test && continue; # false fails even when invoked with --help or --version. if test $i = false; then env LC_MESSAGES=$lang $i --help >/dev/null && fail=1 env LC_MESSAGES=$lang $i --version >/dev/null && fail=1 continue fi # The just-built install executable is always named `ginstall'. test $i = install && i=ginstall # Make sure they exit successfully, under normal conditions. env $i --help > h-$i || fail=1 env $i --version >/dev/null || fail=1 # Make sure they mention the bug-reporting address in --help output. grep "$PACKAGE_BUGREPORT" h-$i > /dev/null || fail=1 rm -f h-$i # Make sure they fail upon `disk full' error. if test -w /dev/full && test -c /dev/full; then env $i --help >/dev/full 2>/dev/null && fail=1 env $i --version >/dev/full 2>/dev/null && fail=1 status=$? test $i = [ && prog=lbracket || prog=$i eval "expected=\$expected_failure_status_$prog" test x$expected = x && expected=1 if test $status = $expected; then : # ok else fail=1 echo "*** $i: bad exit status \`$status' (expected $expected)," 1>&2 echo " with --help or --version output redirected to /dev/full" 1>&2 fi fi done done bigZ_in=bigZ-in.Z zin=zin.gz zin2=zin2.gz tmp=tmp-$$ tmp_in=in-$$ tmp_in2=in2-$$ tmp_dir=dir-$$ tmp_out=out-$$ mkdir $tmp || fail=1 cd $tmp || fail=1 comm_setup () { args="$tmp_in $tmp_in"; } csplit_setup () { args="$tmp_in //"; } cut_setup () { args='-f 1'; } join_setup () { args="$tmp_in $tmp_in"; } tr_setup () { args='a a'; } chmod_setup () { args="a+x $tmp_in"; } # Punt on these. chgrp_setup () { args=--version; } chown_setup () { args=--version; } mkfifo_setup () { args=--version; } mknod_setup () { args=--version; } # Punt on uptime, since it fails (e.g., failing to get boot time) # on some systems, and we shouldn't let that stop `make check'. uptime_setup () { args=--version; } # Create a file in the current directory, not in $TMPDIR. mktemp_setup () { args=mktemp.XXXX; } cmp_setup () { args="$tmp_in $tmp_in2"; } # Tell dd not to print the line with transfer rate and total. # The transfer rate would vary between runs. dd_setup () { args=status=noxfer; } zdiff_setup () { args="$zin $zin2"; } zcmp_setup () { args="$zin $zin2"; } zcat_setup () { args=$zin; } gunzip_setup () { args=$zin; } zmore_setup () { args=$zin; } zless_setup () { args=$zin; } znew_setup () { args=$bigZ_in; } zforce_setup () { args=$zin; } zgrep_setup () { args="z $zin"; } zegrep_setup () { args="z $zin"; } zfgrep_setup () { args="z $zin"; } gzexe_setup () { args=$tmp_in; } # We know that $tmp_in contains a "0" grep_setup () { args="0 $tmp_in"; } egrep_setup () { args="0 $tmp_in"; } fgrep_setup () { args="0 $tmp_in"; } diff_setup () { args="$tmp_in $tmp_in2"; } sdiff_setup () { args="$tmp_in $tmp_in2"; } diff3_setup () { args="$tmp_in $tmp_in2 $tmp_in2"; } cp_setup () { args="$tmp_in $tmp_in2"; } ln_setup () { args="$tmp_in ln-target"; } ginstall_setup () { args="$tmp_in $tmp_in2"; } mv_setup () { args="$tmp_in $tmp_in2"; } mkdir_setup () { args=$tmp_dir/subdir; } rmdir_setup () { args=$tmp_dir; } rm_setup () { args=$tmp_in; } shred_setup () { args=$tmp_in; } touch_setup () { args=$tmp_in2; } truncate_setup () { args="--reference=$tmp_in $tmp_in2"; } # Specify a map, so mkid doesn't try to use the not-yet-installed id-lang.map. mkid_setup () { printf 'f(){}\ntypedef int t;\n' > f.c; echo '*.c C' > m; args='-m m .' ; } lid_setup () { args=; } fid_setup () { args=f.c; } fnid_setup () { args=; } xtokid_setup () { args='-m m'; } aid_setup () { args=f; } eid_setup () { args=--version; } gid_setup () { args=f; } defid_setup () { args=t; } basename_setup () { args=$tmp_in; } dirname_setup () { args=$tmp_in; } expr_setup () { args=foo; } # Punt, in case GNU `id' hasn't been installed yet. groups_setup () { args=--version; } pathchk_setup () { args=$tmp_in; } yes_setup () { args=--version; } logname_setup () { args=--version; } nohup_setup () { args=--version; } printf_setup () { args=foo; } seq_setup () { args=10; } sleep_setup () { args=0; } su_setup () { args=--version; } stdbuf_setup () { args="-oL true"; } timeout_setup () { args=--version; } # I'd rather not run sync, since it spins up disks that I've # deliberately caused to spin down (but not unmounted). sync_setup () { args=--version; } test_setup () { args=foo; } # This is necessary in the unusual event that there is # no valid entry in /etc/mtab. df_setup () { args=/; } # This is necessary in the unusual event that getpwuid (getuid ()) fails. id_setup () { args=-u; } # Use env to avoid invoking built-in sleep of Solaris 11's /bin/sh. kill_setup () { env sleep 10m & args=$! } link_setup () { args="$tmp_in link-target"; } unlink_setup () { args=$tmp_in; } readlink_setup () { ln -s . slink args=slink; } stat_setup () { args=$tmp_in; } unlink_setup () { args=$tmp_in; } lbracket_setup () { args=": ]"; } # Ensure that each program "works" (exits successfully) when doing # something more than --help or --version. for i in $built_programs; do # Skip these. case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2 echo z |gzip > $zin cp $zin $zin2 cp $zin $bigZ_in # This is sort of kludgey: use numbers so this is valid input for factor, # and two tokens so it's valid input for tsort. echo 2147483647 0 > $tmp_in # Make $tmp_in2 identical. Then, using $tmp_in and $tmp_in2 as arguments # to the likes of cmp and diff makes them exit successfully. cp $tmp_in $tmp_in2 mkdir $tmp_dir # echo ================== $i test $i = [ && prog=lbracket || prog=$i if type ${prog}_setup > /dev/null 2>&1; then ${prog}_setup else args= fi if env $i $args < $tmp_in > $tmp_out; then : # ok else echo FAIL: $i fail=1 fi rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir done Exit $fail �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/CuTmpdir.pm������������������������������������������������������0000664�0000000�0000000�00000004727�12166360012�015530� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package CuTmpdir; # create, then chdir into a temporary sub-directory # Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. use strict; use warnings; use File::Temp; use File::Find; our $ME = $0 || "<???>"; my $dir; sub skip_test($) { warn "$ME: skipping test: unsafe working directory name: `$_[0]'\n"; exit 77; } sub chmod_1 { my $name = $_; # Skip symlinks and non-directories. -l $name || !-d _ and return; chmod 0700, $name; } sub chmod_tree { # When tempdir fails, it croaks, which leaves $dir undefined. defined $dir or return; # Perform the equivalent of find "$dir" -type d -print0|xargs -0 chmod -R 700. my $options = {untaint => 1, wanted => \&chmod_1}; find ($options, $dir); } sub import { my $prefix = $_[1]; $ME eq '-' && defined $prefix and $ME = $prefix; if ($prefix !~ /^\//) { eval 'use Cwd'; my $cwd = $@ ? '.' : Cwd::getcwd(); $prefix = "$cwd/$prefix"; } # Untaint for the upcoming mkdir. $prefix =~ m!^([-+\@\w./]+)$! or skip_test $prefix; $prefix = $1; my $original_pid = $$; my $on_sig_remove_tmpdir = sub { my ($sig) = @_; if ($$ == $original_pid and defined $dir) { chmod_tree; # Older versions of File::Temp lack this method. exists &File::Temp::cleanup and &File::Temp::cleanup; } $SIG{$sig} = 'DEFAULT'; kill $sig, $$; }; foreach my $sig (qw (INT TERM HUP)) { $SIG{$sig} = $on_sig_remove_tmpdir; } $dir = File::Temp::tempdir("$prefix.tmp-XXXX", CLEANUP => 1 ); chdir $dir or warn "$ME: failed to chdir to $dir: $!\n"; } END { # Move cwd out of the directory we're about to remove. # This is required on some systems, and by some versions of File::Temp. chdir '..' or warn "$ME: failed to chdir to .. from $dir: $!\n"; my $saved_errno = $?; chmod_tree; $? = $saved_errno; } 1; �����������������������������������������id-utils-4.6+git20120811/testsuite/infloop-kawa-el��������������������������������������������������0000775�0000000�0000000�00000003272�12166360012�016350� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # This would provoke an infloop with source from 4.2+ (cvs as of 2007-01-19). # Copyright (C) 2007, 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 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 <http://www.gnu.org/licenses/>. if test "$VERBOSE" = yes; then set -x mkid --version aid --version fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 echo 'boo[! bar[]' > f.el || framework_failure=1 # FIXME: The expected output should probably be these two lines: # bar # boo[] # but the code to handle that (now-disabled) did a double-ungetc. cat <<EOF > exp || framework_failure=1 # expect no output bar boo EOF if test $framework_failure = 1; then echo "$0: failure in testing framework" 1>&2 (exit 1); exit 1 fi fail=0 lang_map="$abs_top_srcdir/libidu/id-lang.map" mkid -m "$lang_map" f.el > out || fail=1 aid -R none b >> out || fail=1 cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null (exit $fail); exit $fail ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/single_file_token_bug.c������������������������������������������0000664�0000000�0000000�00000000062�10623104751�020112� 0����������������������������������������������������������������������������������������������������ustar �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� int main(int argc, char* argv[]) { return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/files0-from������������������������������������������������������0000775�0000000�0000000�00000006120�12166360012�015501� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl # Exercise the --files0-from option. # FIXME: keep this file in sync with coreutils/tests/du/files0-from. # 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 <http://www.gnu.org/licenses/>. use strict; (my $program_name = $0) =~ s|.*/||; my $prog = 'mkid'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; my $nothing_to_do = "$prog: nothing to do\n"; my @Tests = ( # invalid extra command line argument ['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>1}, {ERR => "$prog: extra operand 'no-such'\n" . "file operands cannot be combined with --files0-from\n" . "Try `$prog --help' for more information.\n"} ], # missing input file ['missing', '--files0-from=missing', {EXIT=>1}, {ERR => "$prog: cannot open 'missing' for reading: " . "No such file or directory\n"}], # empty input, regular file ['empty', '--files0-from=@AUX@', {AUX=>''}, {ERR => $nothing_to_do}], # empty input, from non-regular file ['empty-nonreg', '--files0-from=/dev/null', {ERR => $nothing_to_do}], # one NUL ['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>1}, {ERR => "$prog: -:1: invalid zero-length file name\n" . $nothing_to_do}], # two NULs ['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>1}, {ERR => "$prog: -:1: invalid zero-length file name\n" . "$prog: -:2: invalid zero-length file name\n" . $nothing_to_do }], # one file name, no NUL ['1', '--files0-from=-', '<', {IN=>{f=>"g"}}, {AUX=>{g=>''}}, {ERR => $nothing_to_do}], # one file name, with NUL ['1a', '--files0-from=-', '<', {IN=>{f=>"g\0"}}, {AUX=>{g=>''}}, {ERR => $nothing_to_do}], # two file names, no final NUL ['2', '--files0-from=-', '<', {IN=>{f=>"g\0g"}}, {AUX=>{g=>''}}, {ERR => $nothing_to_do}], # two file names, with final NUL ['2a', '--files0-from=-', '<', {IN=>{f=>"g\0g\0"}}, {AUX=>{g=>''}}, {ERR => $nothing_to_do}], # Ensure that $prog processes FILEs following a zero-length name. ['zero-len', '--files0-from=-', '<', {IN=>{f=>"\0g\0"}}, {AUX=>{g=>''}}, {ERR => "$prog: -:1: invalid zero-length file name\n" . $nothing_to_do}, {EXIT=>1} ], ); # Insert '--lang-map=/dev/null' after each test name. my $t; foreach $t (@Tests) { splice @$t, 1, 0, '--lang-map=/dev/null'; } my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); exit $fail; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/consistency������������������������������������������������������0000775�0000000�0000000�00000003721�12166360012�015723� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. export LANG; LANG=C lang_map="$abs_top_srcdir/libidu/id-lang.map" errors= if mkid -m "$lang_map" $abs_top_srcdir/src; then files="`fnid | grep -v single_file_token_bug`" if xtokid -m "$lang_map" $files |sort -u >ID.xti && lid |sed -e 's/[ ].*//' |sort -u >ID.lid && cmp -s ID.xti ID.lid then rm -f ID.xti ID.lid echo "Good. xtokid and lid agree." else mv ID.xti ID.bad-xti mv ID.lid ID.bad-lid 1>&2 echo "Oops! xtokid and lid disagree--look in ID.bad-{xti,lid}" errors=t fi xtokid_file=$$.xti fid_file=$$.fid for file in $files do if fid $file >$fid_file && xtokid -m "$lang_map" $file |sort -u >$xtokid_file && cmp -s $xtokid_file $fid_file; then echo "Good. xtokid and fid agree for $file" else 1>&2 echo "Oops! xtokid and fid disagree for $file--look in $file.bad-{xti,fid}" mv $xtokid_file $file.bad-xti mv $fid_file $file.bad-fid errors=t fi done rm -f $xtokid_file $fid_file else 1>&2 echo "Oops! mkid failed." errors=t fi if mkid -m "$lang_map"; then echo "Good. No crash when dealing with single file" else 1>&2 echo "Oops! mkid failed." errors=t fi case x$errors in xt) echo "Some checks failed." exit 1;; *) echo "All checks successful." exit 0;; esac �����������������������������������������������id-utils-4.6+git20120811/testsuite/shell-or-perl����������������������������������������������������0000664�0000000�0000000�00000006274�12166360012�016052� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Run a test script of the coreutils test scripts, picking up the right # interpreter (i.e., perl or the shell) and the right flags for it (e.g., # perl '-T' flag for perl scripts that must run in tainted mode). # # Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. # # ---------------------------------- # # Readonly variables and functions # # ---------------------------------- # # Help to avoid typo-related bugs. set -u me=shell-or-perl fatal_ () { echo "$me: $*" >&2 # Exit with status '99' to inform the testsuite harness that an # hard error occurred. exit 99 } print_help_ () { cat <<EOH Usage: $me [--help] [--srcdir DIR] [--shell SHELL-CMD] [--perl PERL-CMD] [--test-name NAME-WITHOUT-VPATH] TEST-SCRIPT [ARGS..] EOH } # ---------------- # # Option parsing # # ---------------- # assign_optarg_to_var=' test $# -gt 1 || fatal_ "option '\''$1'\'' requires an argument" eval "$var=\$2" shift' srcdir=${srcdir-.} cu_PERL=${PERL-perl} cu_SHELL=/bin/sh # Getting $SHELL from the environment is dangerous. test_name= while test $# -gt 0; do var= case $1 in --help) print_help_; exit $?;; --shell) var=cu_SHELL;; --perl) var=cu_PERL;; --srcdir) var=srcdir;; --test-name) var=test_name;; --) shift; break;; -*) fatal_ "unknown option '$1'";; *) break;; esac test -z "$var" || eval "$assign_optarg_to_var" shift done unset assign_optarg_to_var var case $# in 0) fatal_ "missing argument";; *) test_script=$1; shift;; esac test -z "$test_name" && test_name=$test_script # --------------------- # # Run the test script # # --------------------- # test -f "$test_script" && test -r "$test_script" \ || fatal_ "test script '$test_script' does not exist, or isn't readable" read shebang_line < "$test_script" \ || fatal_ "cannot read from the test script '$test_script'" case $shebang_line in '#!/usr/bin/perl'*) # The test is a perl script. if $cu_PERL -e 'use warnings' > /dev/null 2>&1; then # Perl is available, see if we must run the test with taint # mode on or not. case $shebang_line in *\ -T*) T_=T;; *) T_=;; esac # Now run it. exec $cu_PERL -w$T_ -I"$srcdir" -MCoreutils -MCuSkip \ -M"CuTmpdir qw($test_name)" \ -- "$test_script" ${1+"$@"} else # Perl is not available, skip the test. echo "$test_name: skip: no usable version of Perl found" exit 77 fi ;; *) # Assume the test is a shell script. exec $cu_SHELL "$test_script" ${1+"$@"} esac # ------------- # # Not reached # # ------------- # fatal_ "dead code reached" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/Makefile.am������������������������������������������������������0000664�0000000�0000000�00000000664�12166360012�015473� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to create Makefile.in TESTS = \ consistency \ files0-from \ help-version \ infloop-kawa-el \ lid-radix \ lid-range EXTRA_DIST = \ $(TESTS) \ Coreutils.pm \ CuSkip.pm \ CuTmpdir.pm \ check.mk \ envvar-check \ init.sh \ mkid-langopt \ shell-or-perl \ single_file_token_bug.c DISTCLEANFILES = ID AUTOMAKE_OPTIONS = include $(srcdir)/check.mk ����������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/CuSkip.pm��������������������������������������������������������0000664�0000000�0000000�00000002270�12166360012�015166� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package CuSkip; # Skip a test: emit diag to log and to stderr, and exit 77 # Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. use strict; use warnings; our $ME = $0 || "<???>"; # Emit a diagnostic both to stderr and to $stderr_fileno_. # FIXME: don't hard-code that value (9), since it's already defined in init.cfg. sub skip ($) { my ($msg) = @_; my $stderr_fileno_ = 9; warn $msg; open FH, ">&$stderr_fileno_" or warn "$ME: failed to dup stderr\n"; print FH $msg; close FH or warn "$ME: failed to close FD $stderr_fileno_\n"; exit 77; } 1; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/lid-range��������������������������������������������������������0000775�0000000�0000000�00000002412�12166360012�015220� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Demonstrate how lid's open-ended ranges work # Copyright (C) 2011-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 <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src cat <<\EOF > in.txt || framework_failure_ one two two three three three four four four four EOF echo '*.txt text' > map || framework_failure_ mkid -m map || framework_failure_ cat <<\EOF > exp || framework_failure_ one in.txt two in.txt EOF lid -F ..2 > out || fail=1 compare exp out || fail=1 cat <<\EOF > exp || framework_failure_ four in.txt three in.txt two in.txt EOF lid -F 2.. > out || fail=1 compare exp out || fail=1 Exit $fail ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/init.sh����������������������������������������������������������0000664�0000000�0000000�00000045255�12204226501�014740� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# source this file; set up for tests # Copyright (C) 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 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 <http://www.gnu.org/licenses/>. # Using this file in a test # ========================= # # The typical skeleton of a test looks like this: # # #!/bin/sh # . "${srcdir=.}/init.sh"; path_prepend_ . # Execute some commands. # Note that these commands are executed in a subdirectory, therefore you # need to prepend "../" to relative filenames in the build directory. # Note that the "path_prepend_ ." is useful only if the body of your # test invokes programs residing in the initial directory. # For example, if the programs you want to test are in src/, and this test # script is named tests/test-1, then you would use "path_prepend_ ../src", # or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" # to all tests via automake's TESTS_ENVIRONMENT. # Set the exit code 0 for success, 77 for skipped, or 1 or other for failure. # Use the skip_ and fail_ functions to print a diagnostic and then exit # with the corresponding exit code. # Exit $? # Executing a test that uses this file # ==================================== # # Running a single test: # $ make check TESTS=test-foo.sh # # Running a single test, with verbose output: # $ make check TESTS=test-foo.sh VERBOSE=yes # # Running a single test, with single-stepping: # 1. Go into a sub-shell: # $ bash # 2. Set relevant environment variables from TESTS_ENVIRONMENT in the # Makefile: # $ export srcdir=../../tests # this is an example # 3. Execute the commands from the test, copy&pasting them one by one: # $ . "$srcdir/init.sh"; path_prepend_ . # ... # 4. Finally # $ exit ME_=`expr "./$0" : '.*/\(.*\)$'` # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. # So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. # Turn off errexit here so that we don't trip the bug with OSF1/Tru64 # sh inside this function. Exit () { set +e; (exit $1); exit $1; } # Print warnings (e.g., about skipped and failed tests) to this file number. # Override by defining to say, 9, in init.cfg, and putting say, # export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2 # in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file. # This is useful when using automake's parallel tests mode, to print # the reason for skip/failure to console, rather than to the .log files. : ${stderr_fileno_=2} # Note that correct expansion of "$*" depends on IFS starting with ' '. # Always write the full diagnostic to stderr. # When stderr_fileno_ is not 2, also emit the first line of the # diagnostic to that file descriptor. warn_ () { # If IFS does not start with ' ', set it and emit the warning in a subshell. case $IFS in ' '*) printf '%s\n' "$*" >&2 test $stderr_fileno_ = 2 \ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;; *) (IFS=' '; warn_ "$@");; esac } fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; } skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; } fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; } framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; } # Sanitize this shell to POSIX mode, if possible. DUALCASE=1; export DUALCASE if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # We require $(...) support unconditionally. # We require a few additional shell features only when $EXEEXT is nonempty, # in order to support automatic $EXEEXT emulation: # - hyphen-containing alias names # - we prefer to use ${var#...} substitution, rather than having # to work around lack of support for that feature. # The following code attempts to find a shell with support for these features. # If the current shell passes the test, we're done. Otherwise, test other # shells until we find one that passes. If one is found, re-exec it. # If no acceptable shell is found, skip the current test. # # The "...set -x; P=1 true 2>err..." test is to disqualify any shell that # emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do. # # Use "9" to indicate success (rather than 0), in case some shell acts # like Solaris 10's /bin/sh but exits successfully instead of with status 2. # Eval this code in a subshell to determine a shell's suitability. # 10 - passes all tests; ok to use # 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score # ? - not ok gl_shell_test_script_=' test $(echo y) = y || exit 1 score_=10 if test "$VERBOSE" = yes; then test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 fi test -z "$EXEEXT" && exit $score_ shopt -s expand_aliases alias a-b="echo zoo" v=abx test ${v%x} = ab \ && test ${v#a} = bx \ && test $(a-b) = zoo \ && exit $score_ ' if test "x$1" = "x--no-reexec"; then shift else # Assume a working shell. Export to subshells (setup_ needs this). gl_set_x_corrupts_stderr_=false export gl_set_x_corrupts_stderr_ # Record the first marginally acceptable shell. marginal_= # Search for a shell that meets our requirements. for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \ /bin/sh bash dash zsh pdksh fail do test "$re_shell_" = no_shell && continue # If we've made it all the way to the sentinel, "fail" without # finding even a marginal shell, skip this test. if test "$re_shell_" = fail; then test -z "$marginal_" && skip_ failed to find an adequate shell re_shell_=$marginal_ break fi # When testing the current shell, simply "eval" the test code. # Otherwise, run it via $re_shell_ -c ... if test "$re_shell_" = __current__; then # 'eval'ing this code makes Solaris 10's /bin/sh exit with # $? set to 2. It does not evaluate any of the code after the # "unexpected" first '('. Thus, we must run it in a subshell. ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 else "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null fi st_=$? # $re_shell_ works just fine. Use it. if test $st_ = 10; then gl_set_x_corrupts_stderr_=false break fi # If this is our first marginally acceptable shell, remember it. if test "$st_:$marginal_" = 9: ; then marginal_="$re_shell_" gl_set_x_corrupts_stderr_=true fi done if test "$re_shell_" != __current__; then # Found a usable shell. Preserve -v and -x. case $- in *v*x* | *x*v*) opts_=-vx ;; *v*) opts_=-v ;; *x*) opts_=-x ;; *) opts_= ;; esac exec "$re_shell_" $opts_ "$0" --no-reexec "$@" echo "$ME_: exec failed" 1>&2 exit 127 fi fi # If this is bash, turn off all aliases. test -n "$BASH_VERSION" && unalias -a # Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to # PROG_NAME.exe), we want to support hyphen-containing names like test-acos. # That is part of the shell-selection test above. Why use aliases rather # than functions? Because support for hyphen-containing aliases is more # widespread than that for hyphen-containing function names. test -n "$EXEEXT" && shopt -s expand_aliases # Enable glibc's malloc-perturbing option. # This is useful for exposing code that depends on the fact that # malloc-related functions often return memory that is mostly zeroed. # If you have the time and cycles, use valgrind to do an even better job. : ${MALLOC_PERTURB_=87} export MALLOC_PERTURB_ # This is a stub function that is run upon trap (upon regular exit and # interrupt). Override it with a per-test function, e.g., to unmount # a partition, or to undo any other global state changes. cleanup_ () { :; } # Emit a header similar to that from diff -u; Print the simulated "diff" # command so that the order of arguments is clear. Don't bother with @@ lines. emit_diff_u_header_ () { printf '%s\n' "diff -u $*" \ "--- $1 1970-01-01" \ "+++ $2 1970-01-01" } # Arrange not to let diff or cmp operate on /dev/null, # since on some systems (at least OSF/1 5.1), that doesn't work. # When there are not two arguments, or no argument is /dev/null, return 2. # When one argument is /dev/null and the other is not empty, # cat the nonempty file to stderr and return 1. # Otherwise, return 0. compare_dev_null_ () { test $# = 2 || return 2 if test "x$1" = x/dev/null; then test -s "$2" || return 0 emit_diff_u_header_ "$@"; sed 's/^/+/' "$2" return 1 fi if test "x$2" = x/dev/null; then test -s "$1" || return 0 emit_diff_u_header_ "$@"; sed 's/^/-/' "$1" return 1 fi return 2 } if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \ && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then # diff accepts the -u option and does not (like AIX 7 'diff') produce an # extra space on column 1 of every content line. if test -z "$diff_out_"; then compare_ () { diff -u "$@"; } else compare_ () { if diff -u "$@" > diff.out; then # No differences were found, but Solaris 'diff' produces output # "No differences encountered". Hide this output. rm -f diff.out true else cat diff.out rm -f diff.out false fi } fi elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then if test -z "$diff_out_"; then compare_ () { diff -c "$@"; } else compare_ () { if diff -c "$@" > diff.out; then # No differences were found, but AIX and HP-UX 'diff' produce output # "No differences encountered" or "There are no differences between the # files.". Hide this output. rm -f diff.out true else cat diff.out rm -f diff.out false fi } fi elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; } fi # Usage: compare EXPECTED ACTUAL # # Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more. # Otherwise, propagate $? to caller: any diffs have already been printed. compare () { # This looks like it can be factored to use a simple "case $?" # after unchecked compare_dev_null_ invocation, but that would # fail in a "set -e" environment. if compare_dev_null_ "$@"; then return 0 else case $? in 1) return 1;; *) compare_ "$@";; esac fi } # An arbitrary prefix to help distinguish test directories. testdir_prefix_ () { printf gt; } # Run the user-overridable cleanup_ function, remove the temporary # directory and exit with the incoming value of $?. remove_tmp_ () { __st=$? cleanup_ # cd out of the directory we're about to remove cd "$initial_cwd_" || cd / || cd /tmp chmod -R u+rwx "$test_dir_" # If removal fails and exit status was to be 0, then change it to 1. rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } exit $__st } # Given a directory name, DIR, if every entry in it that matches *.exe # contains only the specified bytes (see the case stmt below), then print # a space-separated list of those names and return 0. Otherwise, don't # print anything and return 1. Naming constraints apply also to DIR. find_exe_basenames_ () { feb_dir_=$1 feb_fail_=0 feb_result_= feb_sp_= for feb_file_ in $feb_dir_/*.exe; do # If there was no *.exe file, or there existed a file named "*.exe" that # was deleted between the above glob expansion and the existence test # below, just skip it. test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \ && continue # Exempt [.exe, since we can't create a function by that name, yet # we can't invoke [ by PATH search anyways due to shell builtins. test "x$feb_file_" = "x$feb_dir_/[.exe" && continue case $feb_file_ in *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;; *) # Remove leading file name components as well as the .exe suffix. feb_file_=${feb_file_##*/} feb_file_=${feb_file_%.exe} feb_result_="$feb_result_$feb_sp_$feb_file_";; esac feb_sp_=' ' done test $feb_fail_ = 0 && printf %s "$feb_result_" return $feb_fail_ } # Consider the files in directory, $1. # For each file name of the form PROG.exe, create an alias named # PROG that simply invokes PROG.exe, then return 0. If any selected # file name or the directory name, $1, contains an unexpected character, # define no alias and return 1. create_exe_shims_ () { case $EXEEXT in '') return 0 ;; .exe) ;; *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;; esac base_names_=`find_exe_basenames_ $1` \ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; } if test -n "$base_names_"; then for base_ in $base_names_; do alias "$base_"="$base_$EXEEXT" done fi return 0 } # Use this function to prepend to PATH an absolute name for each # specified, possibly-$initial_cwd_-relative, directory. path_prepend_ () { while test $# != 0; do path_dir_=$1 case $path_dir_ in '') fail_ "invalid path dir: '$1'";; /*) abs_path_dir_=$path_dir_;; *) abs_path_dir_=$initial_cwd_/$path_dir_;; esac case $abs_path_dir_ in *:*) fail_ "invalid path dir: '$abs_path_dir_'";; esac PATH="$abs_path_dir_:$PATH" # Create an alias, FOO, for each FOO.exe in this directory. create_exe_shims_ "$abs_path_dir_" \ || fail_ "something failed (above): $abs_path_dir_" shift done export PATH } setup_ () { if test "$VERBOSE" = yes; then # Test whether set -x may cause the selected shell to corrupt an # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5. # If enabling verbose output this way would cause trouble, simply # issue a warning and refrain. if $gl_set_x_corrupts_stderr_; then warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr" else set -x fi fi initial_cwd_=$PWD fail=0 pfx_=`testdir_prefix_` test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ || fail_ "failed to create temporary directory in $initial_cwd_" cd "$test_dir_" || fail_ "failed to cd to temporary directory" # As autoconf-generated configure scripts do, ensure that IFS # is defined initially, so that saving and restoring $IFS works. gl_init_sh_nl_=' ' IFS=" "" $gl_init_sh_nl_" # This trap statement, along with a trap on 0 below, ensure that the # temporary directory, $test_dir_, is removed upon exit as well as # upon receipt of any of the listed signals. for sig_ in 1 2 3 13 15; do eval "trap 'Exit $(expr $sig_ + 128)' $sig_" done } # Create a temporary directory, much like mktemp -d does. # Written by Jim Meyering. # # Usage: mktempd_ /tmp phoey.XXXXXXXXXX # # First, try to use the mktemp program. # Failing that, we'll roll our own mktemp-like function: # - try to get random bytes from /dev/urandom # - failing that, generate output from a combination of quickly-varying # sources and gzip. Ignore non-varying gzip header, and extract # "random" bits from there. # - given those bits, map to file-name bytes using tr, and try to create # the desired directory. # - make only $MAX_TRIES_ attempts # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9. rand_bytes_ () { n_=$1 # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first? # But if they have openssl, they probably have mktemp, too. chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 dev_rand_=/dev/urandom if test -r "$dev_rand_"; then # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194. dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ return fi n_plus_50_=`expr $n_ + 50` cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' data_=` (eval "$cmds_") 2>&1 | gzip ` # Ensure that $data_ has length at least 50+$n_ while :; do len_=`echo "$data_"|wc -c` test $n_plus_50_ -le $len_ && break; data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip ` done echo "$data_" \ | dd bs=1 skip=50 count=$n_ 2>/dev/null \ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ } mktempd_ () { case $# in 2);; *) fail_ "Usage: mktempd_ DIR TEMPLATE";; esac destdir_=$1 template_=$2 MAX_TRIES_=4 # Disallow any trailing slash on specified destdir: # it would subvert the post-mktemp "case"-based destdir test. case $destdir_ in /) ;; */) fail_ "invalid destination dir: remove trailing slash(es)";; esac case $template_ in *XXXX) ;; *) fail_ \ "invalid template: $template_ (must have a suffix of at least 4 X's)";; esac # First, try to use mktemp. d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ || fail=1 # The resulting name must be in the specified directory. case $d in "$destdir_"*);; *) fail=1;; esac # It must have created the directory. test -d "$d" || fail=1 # It must have 0700 permissions. Handle sticky "S" bits. perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1 case $perms in drwx------*) ;; *) fail=1;; esac test $fail = 0 && { echo "$d" return } # If we reach this point, we'll have to create a directory manually. # Get a copy of the template without its suffix of X's. base_template_=`echo "$template_"|sed 's/XX*$//'` # Calculate how many X's we've just removed. template_length_=`echo "$template_" | wc -c` nx_=`echo "$base_template_" | wc -c` nx_=`expr $template_length_ - $nx_` err_= i_=1 while :; do X_=`rand_bytes_ $nx_` candidate_dir_="$destdir_/$base_template_$X_" err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ && { echo "$candidate_dir_"; return; } test $MAX_TRIES_ -le $i_ && break; i_=`expr $i_ + 1` done fail_ "$err_" } # If you want to override the testdir_prefix_ function, # or to add more utility functions, use this file. test -f "$srcdir/init.cfg" \ && . "$srcdir/init.cfg" setup_ "$@" # This trap is here, rather than in the setup_ function, because some # shells run the exit trap at shell function exit, rather than script exit. trap remove_tmp_ 0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/envvar-check�����������������������������������������������������0000664�0000000�0000000�00000002571�12166360012�015735� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- sh -*- # Check environment variables for sane values while testing. # Copyright (C) 2000-2001, 2003-2004, 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 <http://www.gnu.org/licenses/>. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi envvar_check_failed=0 vars=' _POSIX2_VERSION BLOCKSIZE BLOCK_SIZE CDPATH COLUMNS DF_BLOCK_SIZE DU_BLOCK_SIZE LS_BLOCK_SIZE LS_COLORS POSIXLY_CORRECT QUOTING_STYLE SIMPLE_BACKUP_SUFFIX TABSIZE TERM TIME_STYLE TMPDIR VERSION_CONTROL ' for var in $vars do $as_unset $var if eval test \"\${$var+set}\" = set; then echo "$0: the $var environment variable is set --" \ ' unset it and rerun this test' >&2 envvar_check_failed=1 fi done test "$envvar_check_fail" = 1 && exit 1 ���������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/Coreutils.pm�����������������������������������������������������0000664�0000000�0000000�00000041151�12166360012�015742� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package Coreutils; # This is a testing framework. # Copyright (C) 1998, 2000-2002, 2004-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 <http://www.gnu.org/licenses/>. use strict; use vars qw($VERSION @ISA @EXPORT); use FileHandle; use File::Compare qw(compare); @ISA = qw(Exporter); ($VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd; @EXPORT = qw (run_tests triple_test); my $debug = $ENV{DEBUG}; my @Types = qw (IN IN_PIPE OUT ERR AUX CMP EXIT PRE POST OUT_SUBST ERR_SUBST ENV ENV_DEL); my %Types = map {$_ => 1} @Types; my %Zero_one_type = map {$_ => 1} qw (OUT ERR EXIT PRE POST OUT_SUBST ERR_SUBST ENV); my $srcdir = $ENV{srcdir}; my $Global_count = 1; # When running in a DJGPP environment, make $ENV{SHELL} point to bash. # Otherwise, a bad shell might be used (e.g. command.com) and many # tests would fail. defined $ENV{DJDIR} and $ENV{SHELL} = "$ENV{DJDIR}/bin/bash.exe"; # A file spec: a scalar or a reference to a single-keyed hash # ================ # 'contents' contents only (file name is derived from test name) # {filename => 'contents'} filename and contents # {filename => undef} filename only -- $(srcdir)/filename must exist # # FIXME: If there is more than one input file, then you can't specify `REDIR'. # PIPE is still ok. # # I/O spec: a hash ref with the following properties # ================ # - one key/value pair # - the key must be one of these strings: IN, OUT, ERR, AUX, CMP, EXIT # - the value must be a file spec # {OUT => 'data'} put data in a temp file and compare it to stdout from cmd # {OUT => {'filename'=>undef}} compare contents of existing filename to # stdout from cmd # {OUT => {'filename'=>[$CTOR, $DTOR]}} $CTOR and $DTOR are references to # functions, each which is passed the single argument `filename'. # $CTOR must create `filename'. # DTOR may be omitted in which case `sub{unlink @_[0]}' is used. # FIXME: implement this # {ERR => ...} # Same as for OUT, but compare with stderr, not stdout. # {OUT_SUBST => 's/variable_output/expected_output/'} # Transform actual standard output before comparing it against expected output. # This is useful e.g. for programs like du that produce output that # varies a lot from system. E.g., an empty file may consume zero file # blocks, or more, depending on the OS and on the file system type. # {ERR_SUBST => 's/variable_output/expected_output/'} # Transform actual stderr output before comparing it against expected. # This is useful when verifying that we get a meaningful diagnostic. # For example, in rm/fail-2eperm, we have to account for three different # diagnostics: Operation not permitted, Not owner, and Permission denied. # {EXIT => N} expect exit status of cmd to be N # {ENV => 'VAR=val ...'} # Prepend 'VAR=val ...' to the command that we execute via `system'. # {ENV_DEL => 'VAR'} # Remove VAR from the environment just before running the corresponding # command, and restore any value just afterwards. # # There may be many input file specs. File names from the input specs # are concatenated in order on the command line. # There may be at most one of the OUT-, ERR-, and EXIT-keyed specs. # If the OUT-(or ERR)-keyed hash ref is omitted, then expect no output # on stdout (or stderr). # If the EXIT-keyed one is omitted, then expect the exit status to be zero. # FIXME: Make sure that no junkfile is also listed as a # non-junkfile (i.e. with undef for contents) sub _shell_quote ($) { my ($string) = @_; $string =~ s/\'/\'\\\'\'/g; return "'$string'"; } sub _create_file ($$$$) { my ($program_name, $test_name, $file_name, $data) = @_; my $file; if (defined $file_name) { $file = $file_name; } else { $file = "$test_name.$Global_count"; ++$Global_count; } warn "creating file `$file' with contents `$data'\n" if $debug; # The test spec gave a string. # Write it to a temp file and return tempfile name. my $fh = new FileHandle "> $file"; die "$program_name: $file: $!\n" if ! $fh; print $fh $data; $fh->close || die "$program_name: $file: $!\n"; return $file; } sub _compare_files ($$$$$) { my ($program_name, $test_name, $in_or_out, $actual, $expected) = @_; my $differ = compare ($expected, $actual); if ($differ) { my $info = (defined $in_or_out ? "std$in_or_out " : ''); warn "$program_name: test $test_name: ${info}mismatch, comparing " . "$actual (actual) and $expected (expected)\n"; # Ignore any failure, discard stderr. system "diff -c $actual $expected 2>/dev/null"; } return $differ; } sub _process_file_spec ($$$$$) { my ($program_name, $test_name, $file_spec, $type, $junk_files) = @_; my ($file_name, $contents); if (!ref $file_spec) { ($file_name, $contents) = (undef, $file_spec); } elsif (ref $file_spec eq 'HASH') { my $n = keys %$file_spec; die "$program_name: $test_name: $type spec has $n elements --" . " expected 1\n" if $n != 1; ($file_name, $contents) = each %$file_spec; # This happens for the AUX hash in an io_spec like this: # {CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]}, defined $contents or return $file_name; } else { die "$program_name: $test_name: invalid RHS in $type-spec\n" } my $is_junk_file = (! defined $file_name || (($type eq 'IN' || $type eq 'AUX' || $type eq 'CMP') && defined $contents)); my $file = _create_file ($program_name, $test_name, $file_name, $contents); if ($is_junk_file) { push @$junk_files, $file } else { # FIXME: put $srcdir in here somewhere warn "$program_name: $test_name: specified file `$file' does" . " not exist\n" if ! -f "$srcdir/$file"; } return $file; } sub _at_replace ($$) { my ($map, $s) = @_; foreach my $eo (qw (AUX OUT ERR)) { my $f = $map->{$eo}; $f and $s =~ /\@$eo\@/ and $s =~ s/\@$eo\@/$f/g; } return $s; } # FIXME: cleanup on interrupt # FIXME: extract `do_1_test' function # FIXME: having to include $program_name here is an expedient kludge. # Library code doesn't `die'. sub run_tests ($$$$$) { my ($program_name, $prog, $t_spec, $save_temps, $verbose) = @_; # To indicate that $prog is a shell built-in, you'd make it a string 'ref'. # E.g., call run_tests ($prog, \$prog, \@Tests, $save_temps, $verbose); # If it's a ref, invoke it via "env": my @prog = ref $prog ? (qw(env --), $$prog) : $prog; # Warn about empty t_spec. # FIXME # Remove all temp files upon interrupt. # FIXME # Verify that test names are distinct. my $bad_test_name = 0; my %seen; my %seen_8dot3; my $t; foreach $t (@$t_spec) { my $test_name = $t->[0]; if ($seen{$test_name}) { warn "$program_name: $test_name: duplicate test name\n"; $bad_test_name = 1; } $seen{$test_name} = 1; if (0) { my $t8 = lc substr $test_name, 0, 8; if ($seen_8dot3{$t8}) { warn "$program_name: 8.3 test name conflict: " . "$test_name, $seen_8dot3{$t8}\n"; $bad_test_name = 1; } $seen_8dot3{$t8} = $test_name; } # The test name may be no longer than 30 bytes. # Yes, this is an arbitrary limit. If it causes trouble, # consider removing it. my $max = 30; if ($max < length $test_name) { warn "$program_name: $test_name: test name is too long (> $max)\n"; $bad_test_name = 1; } } return 1 if $bad_test_name; # FIXME check exit status system (@prog, '--version') if $verbose; my @junk_files; my $fail = 0; foreach my $tt (@$t_spec) { my @post_compare; my @dummy = @$tt; my $t = \@dummy; my $test_name = shift @$t; my $expect = {}; my ($pre, $post); # FIXME: maybe don't reset this. $Global_count = 1; my @args; my $io_spec; my %seen_type; my @env_delete; my $env_prefix = ''; my $input_pipe_cmd; foreach $io_spec (@$t) { if (!ref $io_spec) { push @args, $io_spec; next; } if (ref $io_spec ne 'HASH') { eval 'use Data::Dumper'; die "$program_name: $test_name: invalid entry in test spec; " . "expected HASH-ref,\nbut got this:\n" . Data::Dumper->Dump ([\$io_spec], ['$io_spec']) . "\n"; } my $n = keys %$io_spec; die "$program_name: $test_name: spec has $n elements --" . " expected 1\n" if $n != 1; my ($type, $val) = each %$io_spec; die "$program_name: $test_name: invalid key `$type' in test spec\n" if ! $Types{$type}; # Make sure there's no more than one of OUT, ERR, EXIT, etc. die "$program_name: $test_name: more than one $type spec\n" if $Zero_one_type{$type} and $seen_type{$type}++; if ($type eq 'PRE' or $type eq 'POST') { $expect->{$type} = $val; next; } if ($type eq 'CMP') { my $t = ref $val; $t && $t eq 'ARRAY' or die "$program_name: $test_name: invalid CMP spec\n"; @$val == 2 or die "$program_name: $test_name: invalid CMP list; must have" . " exactly 2 elements\n"; my @cmp_files; foreach my $e (@$val) { my $r = ref $e; $r && $r ne 'HASH' and die "$program_name: $test_name: invalid element ($r)" . " in CMP list; only scalars and hash references " . "are allowed\n"; if ($r && $r eq 'HASH') { my $n = keys %$e; $n == 1 or die "$program_name: $test_name: CMP spec has $n " . "elements -- expected 1\n"; # Replace any `@AUX@' in the key of %$e. my ($ff, $val) = each %$e; my $new_ff = _at_replace $expect, $ff; if ($new_ff ne $ff) { $e->{$new_ff} = $val; delete $e->{$ff}; } } my $cmp_file = _process_file_spec ($program_name, $test_name, $e, $type, \@junk_files); push @cmp_files, $cmp_file; } push @post_compare, [@cmp_files]; $expect->{$type} = $val; next; } if ($type eq 'EXIT') { die "$program_name: $test_name: invalid EXIT code\n" if $val !~ /^\d+$/; # FIXME: make sure $data is numeric $expect->{EXIT} = $val; next; } if ($type =~ /^(OUT|ERR)_SUBST$/) { $expect->{RESULT_SUBST} ||= {}; $expect->{RESULT_SUBST}->{$1} = $val; next; } if ($type eq 'ENV') { $env_prefix = "$val "; next; } if ($type eq 'ENV_DEL') { push @env_delete, $val; next; } my $file = _process_file_spec ($program_name, $test_name, $val, $type, \@junk_files); if ($type eq 'IN' || $type eq 'IN_PIPE') { my $quoted_file = _shell_quote $file; if ($type eq 'IN_PIPE') { defined $input_pipe_cmd and die "$program_name: $test_name: only one input" . " may be specified with IN_PIPE\n"; $input_pipe_cmd = "cat $quoted_file |"; } else { push @args, $quoted_file; } } elsif ($type eq 'AUX' || $type eq 'OUT' || $type eq 'ERR') { $expect->{$type} = $file; } else { die "$program_name: $test_name: invalid type: $type\n" } } # Expect an exit status of zero if it's not specified. $expect->{EXIT} ||= 0; # Allow ERR to be omitted -- in that case, expect no error output. foreach my $eo (qw (OUT ERR)) { if (!exists $expect->{$eo}) { $expect->{$eo} = _create_file ($program_name, $test_name, undef, ''); push @junk_files, $expect->{$eo}; } } # FIXME: Does it ever make sense to specify a filename *and* contents # in OUT or ERR spec? # FIXME: this is really suboptimal... my @new_args; foreach my $a (@args) { $a = _at_replace $expect, $a; push @new_args, $a; } @args = @new_args; warn "$test_name...\n" if $verbose; &{$expect->{PRE}} if $expect->{PRE}; my %actual; $actual{OUT} = "$test_name.O"; $actual{ERR} = "$test_name.E"; push @junk_files, $actual{OUT}, $actual{ERR}; my @cmd = (@prog, @args, "> $actual{OUT}", "2> $actual{ERR}"); $env_prefix and unshift @cmd, $env_prefix; defined $input_pipe_cmd and unshift @cmd, $input_pipe_cmd; my $cmd_str = join (' ', @cmd); # Delete from the environment any symbols specified by syntax # like this: {ENV_DEL => 'TZ'}. my %pushed_env; foreach my $env_sym (@env_delete) { my $val = delete $ENV{$env_sym}; defined $val and $pushed_env{$env_sym} = $val; } warn "Running command: `$cmd_str'\n" if $debug; my $rc = 0xffff & system $cmd_str; # Restore any environment setting we changed via a deletion. foreach my $env_sym (keys %pushed_env) { $ENV{$env_sym} = $pushed_env{$env_sym}; } if ($rc == 0xff00) { warn "$program_name: test $test_name failed: command failed:\n" . " `$cmd_str': $!\n"; $fail = 1; goto cleanup; } $rc >>= 8 if $rc > 0x80; if ($expect->{EXIT} != $rc) { warn "$program_name: test $test_name failed: exit status mismatch:" . " expected $expect->{EXIT}, got $rc\n"; $fail = 1; goto cleanup; } my %actual_data; # Record actual stdout and stderr contents, if POST may need them. if ($expect->{POST}) { foreach my $eo (qw (OUT ERR)) { my $out_file = $actual{$eo}; open IN, $out_file or (warn "$program_name: cannot open $out_file for reading: $!\n"), $fail = 1, next; $actual_data{$eo} = <IN>; close IN or (warn "$program_name: failed to read $out_file: $!\n"), $fail = 1; } } foreach my $eo (qw (OUT ERR)) { my $subst_expr = $expect->{RESULT_SUBST}->{$eo}; if (defined $subst_expr) { my $out = $actual{$eo}; my $orig = "$out.orig"; # Move $out aside (to $orig), then recreate $out # by transforming each line of $orig via $subst_expr. rename $out, $orig or (warn "$program_name: cannot rename $out to $orig: $!\n"), $fail = 1, next; open IN, $orig or (warn "$program_name: cannot open $orig for reading: $!\n"), $fail = 1, (unlink $orig), next; unlink $orig or (warn "$program_name: cannot unlink $orig: $!\n"), $fail = 1; open OUT, ">$out" or (warn "$program_name: cannot open $out for writing: $!\n"), $fail = 1, next; while (defined (my $line = <IN>)) { eval "\$_ = \$line; $subst_expr; \$line = \$_"; print OUT $line; } close IN; close OUT or (warn "$program_name: failed to write $out: $!\n"), $fail = 1, next; } my $eo_lower = lc $eo; _compare_files ($program_name, $test_name, $eo_lower, $actual{$eo}, $expect->{$eo}) and $fail = 1; } foreach my $pair (@post_compare) { my ($expected, $actual) = @$pair; _compare_files $program_name, $test_name, undef, $actual, $expected and $fail = 1; } cleanup: $expect->{POST} and &{$expect->{POST}} ($actual_data{OUT}, $actual_data{ERR}); } # FIXME: maybe unlink files inside the big foreach loop? unlink @junk_files if ! $save_temps; return $fail; } # For each test in @$TESTS, generate two additional tests, # one using stdin, the other using a pipe. I.e., given this one # ['idem-0', {IN=>''}, {OUT=>''}], # generate these: # ['idem-0.r', '<', {IN=>''}, {OUT=>''}], # ['idem-0.p', {IN_PIPE=>''}, {OUT=>''}], # Generate new tests only if there is exactly one input spec. # The returned list of tests contains each input test, followed # by zero or two derived tests. sub triple_test($) { my ($tests) = @_; my @new; foreach my $t (@$tests) { push @new, $t; my @in; my @args; my @list_of_hash; foreach my $e (@$t) { !ref $e and push (@args, $e), next; ref $e && ref $e eq 'HASH' or (warn "$0: $t->[0]: unexpected entry type\n"), next; defined $e->{IN} and (push @in, $e->{IN}), next; push @list_of_hash, $e; } # Add variants IFF there is exactly one input file. @in == 1 or next; shift @args; # discard test name push @new, ["$t->[0].r", @args, '<', {IN => $in[0]}, @list_of_hash]; push @new, ["$t->[0].p", @args, {IN_PIPE => $in[0]}, @list_of_hash]; } return @new; } ## package return 1; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/check.mk���������������������������������������������������������0000664�0000000�0000000�00000005363�12166360012�015046� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Include this file at the end of each tests/*/Makefile.am. # Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. built_programs = \ echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \ | MAKEFLAGS= $(MAKE) -s -C $(top_builddir)/src -f Makefile -f - spy \ | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' ## '$f' is set by the Automake-generated test harness to the path of the ## current test script stripped of VPATH components, and is used by the ## shell-or-perl script to determine the name of the temporary files to be ## used. Note that $f is a shell variable, not a make macro, so the use of ## '$$f' below is correct, and not a typo. LOG_COMPILER = \ $(SHELL) $(srcdir)/shell-or-perl \ --test-name "$$f" --srcdir '$(srcdir)' \ --shell '$(SHELL)' --perl '$(PERL)' -- # Note that the first lines are statements. They ensure that environment # variables that can perturb tests are unset or set to expected values. # The rest are envvar settings that propagate build-related Makefile # variables to test scripts. TESTS_ENVIRONMENT = \ tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \ . $(srcdir)/envvar-check; \ TMPDIR=$$tmp__; export TMPDIR; \ export \ LOCALE_FR='$(LOCALE_FR)' \ LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \ abs_top_builddir='$(abs_top_builddir)' \ abs_top_srcdir='$(abs_top_srcdir)' \ abs_srcdir='$(abs_srcdir)' \ built_programs="`$(built_programs)`" \ host_os=$(host_os) \ host_triplet='$(host_triplet)' \ srcdir='$(srcdir)' \ top_srcdir='$(top_srcdir)' \ CONFIG_HEADER='$(abs_top_builddir)/lib/config.h' \ CU_TEST_NAME=`basename '$(abs_srcdir)'`,$$f \ AWK='$(AWK)' \ EGREP='$(EGREP)' \ EXEEXT='$(EXEEXT)' \ MAKE=$(MAKE) \ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \ PACKAGE_VERSION=$(PACKAGE_VERSION) \ PERL='$(PERL)' \ PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \ REPLACE_GETCWD=$(REPLACE_GETCWD) \ PATH="$(abs_top_builddir)/src$(PATH_SEPARATOR)$(abs_top_srcdir)/src$(PATH_SEPARATOR)$$PATH" \ VERSION=$(VERSION) \ ; 9>&2 TEST_LOGS = $(TESTS:=.log) # Parallel replacement of Automake's check-TESTS target. SUFFIXES = VERBOSE = yes �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/Makefile.in������������������������������������������������������0000664�0000000�0000000�00000172430�12166360012�015505� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Include this file at the end of each tests/*/Makefile.am. # Copyright (C) 2007-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 <http://www.gnu.org/licenses/>. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/check.mk $(top_srcdir)/build-aux/test-driver subdir = testsuite ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no # If stdout is a non-dumb tty, use colors. If test -t is not supported, # then this fails; a conservative approach. Of course do not redirect # stdout here, just stderr. am__tty_colors = \ $(am__tty_colors_dummy); \ test "X$(AM_COLOR_TESTS)" != Xno \ && test "X$$TERM" != Xdumb \ && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ && { \ am__color_tests=yes; \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } # Restructured Text title and section. am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' am__rst_section = sed 'p;s/./=/g;p;g' # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the `.log' extension removed). The result is saved in the shell variable # `$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ consistency \ files0-from \ help-version \ infloop-kawa-el \ lid-radix \ lid-range EXTRA_DIST = \ $(TESTS) \ Coreutils.pm \ CuSkip.pm \ CuTmpdir.pm \ check.mk \ envvar-check \ init.sh \ mkid-langopt \ shell-or-perl \ single_file_token_bug.c DISTCLEANFILES = ID AUTOMAKE_OPTIONS = built_programs = \ echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \ | MAKEFLAGS= $(MAKE) -s -C $(top_builddir)/src -f Makefile -f - spy \ | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' LOG_COMPILER = \ $(SHELL) $(srcdir)/shell-or-perl \ --test-name "$$f" --srcdir '$(srcdir)' \ --shell '$(SHELL)' --perl '$(PERL)' -- # Note that the first lines are statements. They ensure that environment # variables that can perturb tests are unset or set to expected values. # The rest are envvar settings that propagate build-related Makefile # variables to test scripts. TESTS_ENVIRONMENT = \ tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \ . $(srcdir)/envvar-check; \ TMPDIR=$$tmp__; export TMPDIR; \ export \ LOCALE_FR='$(LOCALE_FR)' \ LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \ abs_top_builddir='$(abs_top_builddir)' \ abs_top_srcdir='$(abs_top_srcdir)' \ abs_srcdir='$(abs_srcdir)' \ built_programs="`$(built_programs)`" \ host_os=$(host_os) \ host_triplet='$(host_triplet)' \ srcdir='$(srcdir)' \ top_srcdir='$(top_srcdir)' \ CONFIG_HEADER='$(abs_top_builddir)/lib/config.h' \ CU_TEST_NAME=`basename '$(abs_srcdir)'`,$$f \ AWK='$(AWK)' \ EGREP='$(EGREP)' \ EXEEXT='$(EXEEXT)' \ MAKE=$(MAKE) \ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \ PACKAGE_VERSION=$(PACKAGE_VERSION) \ PERL='$(PERL)' \ PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \ REPLACE_GETCWD=$(REPLACE_GETCWD) \ PATH="$(abs_top_builddir)/src$(PATH_SEPARATOR)$(abs_top_srcdir)/src$(PATH_SEPARATOR)$$PATH" \ VERSION=$(VERSION) \ ; 9>&2 TEST_LOGS = $(TESTS:=.log) # Parallel replacement of Automake's check-TESTS target. SUFFIXES = VERBOSE = yes all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/check.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testsuite/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/check.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: # Recover from deleted `.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run `foo.test', and re-create # both `foo.log' and `foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Helper recipe used by $(TEST_SUITE_LOG) below, to avoid problems with # "make -n". Break this recipe in multiple shell invocations too, to # really work as expected with "make -n". am--redo-logs: @rm -f $$redo_logs @rm -f $$redo_results @if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; @st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs"; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log"; st=1; }; \ done; \ test $$st -eq 0 $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ redo_bases="$$redo_bases" \ redo_logs="$$redo_logs" \ redo_results="$$redo_results" \ $(MAKE) $(AM_MAKEFLAGS) am--redo-logs || exit 1; \ else :; fi; @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for i in $$bases; do \ if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ >/dev/null; then continue; \ fi; \ glob_res=`sed -n -e "s/$$ws*$$//" \ -e "s/^$$ws*:global-test-result:$$ws*//p" \ $$i.trs`; \ test -n "$$glob_res" || glob_res=RUN; \ echo "$$glob_res: $$i" | $(am__rst_section); \ if test ! -r $$i.log; then \ echo "fatal: making $@: $$i.log is unreadable" >&2; \ exit 1; \ fi; \ cat $$i.log; echo; \ done; \ } >$(TEST_SUITE_LOG).tmp; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS recheck: @if test $@ != recheck; then \ list='$(RECHECK_LOGS)'; \ test -z "$$list" || rm -f $$list; \ fi @if test $@ != recheck; then \ list='$(RECHECK_LOGS:.log=.trs)'; \ test -z "$$list" || rm -f $$list; \ fi @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @ws='[ ]'; \ list=''; $(am__set_TESTS_bases); \ for i in $$bases; do \ if test $@ = recheck; then \ test -f $$i.trs || test -f $$i.log || continue; \ grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \ >/dev/null 2>&1 && continue; \ else :; fi; \ if test -z "$$list"; then list=$$i.log; else list="$$list $$i.log"; fi; \ done; \ if test $@ = recheck && test -n "$$list"; then \ { \ echo 'am--clean: am--clean-log am--clean-trs'; \ echo 'am--clean-log: ; rm -f $$(am__logs)'; \ echo 'am--clean-trs: ; rm -f $$(am__logs:.log=.trs)'; \ } | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean am__logs="$$list" \ || exit 1; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" recheck: consistency.log: consistency @p='consistency'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'consistency.log' --trs-file 'consistency.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) files0-from.log: files0-from @p='files0-from'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'files0-from.log' --trs-file 'files0-from.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) help-version.log: help-version @p='help-version'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'help-version.log' --trs-file 'help-version.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) infloop-kawa-el.log: infloop-kawa-el @p='infloop-kawa-el'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'infloop-kawa-el.log' --trs-file 'infloop-kawa-el.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) lid-radix.log: lid-radix @p='lid-radix'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'lid-radix.log' --trs-file 'lid-radix.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) lid-range.log: lid-range @p='lid-range'; $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file 'lid-range.log' --trs-file 'lid-range.trs' \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file '$*.log' --trs-file '$*.trs' \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file '$*.log' --trs-file '$*.trs' \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am am--redo-logs check check-TESTS check-am clean \ clean-generic distclean distclean-generic distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am recheck uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/testsuite/mkid-langopt�����������������������������������������������������0000775�0000000�0000000�00000000164�11434330764�015756� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Before the 2009-aug-11 fix, this would segfault. ../src/mkid --lang-opt=C:'-i $' -l C:'-k f' || exit 1 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/ChangeLog-2007�������������������������������������������������������������0000664�0000000�0000000�00000060246�12204226501�013545� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2007-08-18 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> * License upgrade to "GPL-3 or later". * po/pl.po: new version of this file. 2007-07-11 Jim Meyering <jim@meyering.net> Ensure that idutils.el's "Version:" comment stays up to date. * Makefile.am (distcheck-hook): New rule. 2007-07-10 Tom Tromey <tromey@redhat.com> Adjust idutils.el comments to work with package.el. * lisp/idutils.el: Fix comments. (gid): Add autoload comment. 2007-06-26 Tom Tromey <tromey@redhat.com> Don't treat the last line in the gid buffer as a match. * lisp/idutils.el (gid-mode-font-lock-keywords): Also match "finished". 2007-06-19 Tom Tromey <tromey@redhat.com> * lisp/idutils.el: Require thingatpt. (gid-mode-font-lock-keywords): New variable. (gid-use-search-in-buffer-name): New variable. (gid-mode): New mode. (gid): Use compilation-start, thing-at-point. (word-around-point): Removed. Details in <http://thread.gmane.org/gmane.comp.gnu.idutils.bugs/70>. 2007-02-19 Pedro J. Ruiz Lopez <holzplatten@es.gnu.org> * Upgraded gnulib. * Upgraded gettext. * lib/regex_internal.h: fix warnings about redefined cpp macros. 2007-01-19 Jim Meyering <jim@meyering.net> temporary fix simply to avoid the infloop. * libidu/scanners.c (get_token_lisp): Disable the code that treats '[]' as part of a kawa identifier. It could call ungetc two or three times in a row. One is the maximum. * testsuite/infloop-kawa-el: New file. Test for the above. * testsuite/Makefile.am (TESTS): Add infloop-kawa-el. (TESTS_ENVIRONMENT): Prepend build directory to PATH so that invoking e.g., "mkid" runs the just-built version of the tool. 2006-11-25 Claudio Fontana <claudio@gnu.org> * libidu/scanners.c (get_token_lisp): provide rough support for character constants. 2006-10-19 Claudio Fontana <claudio@gnu.org> * libidu/scanners.c (get_token_lisp): (tiny) fix bug in double quoted string parsing (fix provided by Walter Sosa). 2006-08-22 Claudio Fontana <claudio@gnu.org> * doc/idutils.texi: fix wrong example .emacs entry, where a nonexistent 'gid' lisp is loaded instead of 'idutils'. 2006-08-05 Claudio Fontana <claudio@gnu.org> version 4.2 released. 2006-07-22 Claudio Fontana <claudio@gnu.org> * configure.ac: add header checks for terminal-related stuff. * configure.ac: add check for lstat, bumped to 4.2 * libidu/idfile.c: replace include sys/stat.h with lstat.h. * libidu/scanners.c: likewise. * libidu/walker.c: likewise. * src/mkid.c: likewise. * libidu/walker.c: provide replacement function for lstat in a somewhat convoluted way, using plain stat. 2006-07-22 Claudio Fontana <claudio@gnu.org> * configure.ac: add check for sbrk * src/mkid.c (get_process_heap): new function. Calls sbrk() if available, or NULL if unsupported. * src/mkid.c (report_statistics): (nochange) the reported heap usage is 0+0 if sbrk is not available. 2006-07-22 Claudio Fontana <claudio@gnu.org> upgraded gnulib. 2006-07-22 Claudio Fontana <claudio@gnu.org> removed generated files from CVS * src/lid.c (get_editor_argv): new function that tokenizes EDITOR environment variable. * src/lid.c (report_edit): use get_editor_argv; some cleanup; set using_vi for vim too. 2006-07-06 Claudio Fontana <claudio@gnu.org> * src/Makefile.in: regenerated. * src/mkid.c: remove useless (and wrong) const. 2006-06-26 Claudio Fontana <claudio@gnu.org> * libidu/walker.c (walk_flink): add missing #ifdef HAVE_LINK before calling hard-link specific code (patch #5165). * libidu/scanners.c (get_token_perl): fix problem in perl support with comments and quotation. Patch appended to patch #2775 by Madhu Gogulapati. 2006-03-12 Claudio Fontana <claudio@gnu.org> version 4.1 released. 2006-03-05 Claudio Fontana <claudio@gnu.org> * src/lid.c::isnumber(): fixed bug in pattern recognition. A single 'l' or 'u' does not make a pattern a number. It must come after ciphers. * src/lid.c::help_me(): add bug report string * src/mkid.c: likewise * src/xtokid.c: likewise * src/fid.c: likewise * src/fnid.c: likewise 2006-02-15 Jim Meyering <jim@meyering.net> * lib/verify.h: New file, from gnulib. 2006-02-15 Claudio Fontana <claudio@gnu.org> * libidu/scanners.c: integrated a lisp+java support patch, based on the original work by Edouard G. Parmelan 2006-01-11 Claudio Fontana <claudio@gnu.org> * lib/fnmatch.c, lib/fnmatch_loop.c: included workaround for a possible gcc bug in handling multibyte char sequences. Fix by Paul Eggert <eggert@gnu.org>, problems reported by Nelson H. F. Beebe <beebe@math.utah.edu> * src/mkid.c, src/lid.c: replace dirname() and basename() usage with dir_name() and base_name() to fix a portability problem spotted by Nelson H. F. Beebe <beebe@math.utah.edu> 2006-01-08 Claudio Fontana <claudio@gnu.org> * src/mkid.c: fixed bad offtostr usage (now uses return value) 2006-01-06 Claudio Fontana <claudio@gnu.org> * configure.ac: reverted change to "conditionally add -I ../intl to the CFLAGS to let all subdirs find the included libintl.h" * m4/gettext.m4: offer a more general solution to the above problem, by automatically adding the internal intl directory to the CPPFLAGS when used. * lib/regex_internal.h: apply workaround for buggy pgcc preprocessor handling large unsigned 64 bit values as signed, and thus breaking compilation. Fix by Paul Eggert <eggert@gnu.org>, catch by Nelson H. F. Beebe <beebe@math.utah.edu> * distribute.sh: changed id-utils to idutils * distribute-alpha.sh: likewise * BLURB: likewise * README-alpha: likewise * configure.ac: changed bug report address to bug-idutils@gnu.org * doc/id-utils.texi: renamed to doc/idutils.texi, and fixed content accordingly * doc/Makefile.am: reflect filename change * lisp/id-utils.el: renamed to lisp/idutils.el, and fixed content accordingly * lisp/Makefile.am: reflect filename change * po/*.po: replaced bug-id-utils@gnu.org with bug-idutils@gnu.org 2005-12-27 Claudio Fontana <claudio@gnu.org> * README-alpha: added information about successful builds * configure.ac: fixed unwanted change in bugs mailing list address * configure.ac: moved development to version 4.1 * configure.ac: conditionally add -I ../intl to the CFLAGS, to let all subdirs find the included libintl.h * m4/extra_dist.sh: added script to autogenerate extra dist Makefile.am * src/Makefile.am: pass libgnu to the linker before and after libintl to solve mutual dependencies problems caused by gnulib modules getopt and regex, which include libintl.h * lib/dirname.c, lib/dirname.h [new files]: added dirname module * lib/basename.c [new file]: likewise * lib/stripslash.c [new file]: likewise * lib/Makefile.am: likewise (gnulib-generated) * m4/dirname.m4, m4/dos.m4 [new files]: likewise * libidu/idfile.c: add missing include directive for strsep.h * libidu/scanners.c: likewise * libidu/walker.c: likewise * libidu/scanners.c: add missing include for alloca.h * libidu/walker.c: likewise * src/mkid.c: add include directive for dirname.h * src/lid.c: likewise * src/*.c, libidu/*.c: enforce <> for system includes or their gnulib replacements, and "" for program specific headers 2005-12-24 Claudio Fontana <claudio@gnu.org> version 4.0 released. 2005-12-15 Claudio Fontana <claudio@gnu.org> * src/mkid.c: tweak alloc-ed size of token signature to a minimum of 1 byte. Fixes assertion failure filed as savannah support request sr #104712. * testsuite/consistency: added test case for this bug * testsuite/single_file_token_bug.c [new file]: needed for new test * testsuite/Makefile.am: add new file to distribution 2005-12-11 Claudio Fontana <claudio@gnu.org> * libidu/scanners.c: Fixed signed/unsigned char* assignments by making both 'scanner_buffer' and 'id' unsigned char*. characters from scanner_buffer are first assigned to an int prior to checking with the class-macros; * src/mkid.c, configure.ac, libidu/iduglobal.h: print an off_t value portably by using offtostr (gnulib) * intl/*, po/*: updated to latest version 2005-12-10 Claudio Fontana <claudio@gnu.org> * applied savannah patch 2775: include scanner for the perl language 2005-11-01 Claudio Fontana <claudio@gnu.org> * libidu/scanners.c: applied (with changes) savannah patch 2702: Fix language options handling bugs, and removed redundant C options help. 2005-05-31 Claudio Fontana <sick_soul@users.sourceforge.net> * configure.in: moved to configure.ac * configure.ac (new file): rewritten using gnulib and new macros * Makefile.am: all makefiles revisited * lib/: removed everything and replaced with gnulib imports * m4/: removed everything and replaced with gnulib imports * i18n support updated to gettext 0.14.1 * po/fr.po: fixed broken headers. FRENCH TRANSLATOR MARKED UNKNOWN. * intl/: updated - Did some nasty things to make libintl work in most circumstances * libidu/iduglobal.h (new file): common definitions moved here * *.c, *.h: updated to use gnulib functions, removed redundant definitions and checks * *.c, *.h: reverted __P() macro introduction, and assume prototypes. Times are mature for that, and I follow gnulib in this. 2000-06-06 Jim Meyering <meyering@lucent.com> * po/POTFILES.in: Add libidu/fnprint.c and remove libidu/xnls.h. * mkinstalldirs: Update. * missing: Update. * depcomp: New file. * lib/malloc.c: New file. * lib/realloc.c: New file. * configure.in: Require 2.14a. Check for declaration of strsep. * libidu/idfile.c: Declare strsep if necessary. * libidu/scanners.c: Likewise. * libidu/walker.c: Likewise. 2000-04-26 Greg McGary <gkm@gnu.org> * lid.c (add_regexp_word_delimiters): Rename from maybe_add_word_delimiters--action is now unconditional. (query_literal_word): Call query_literal_substring if ignoring case. (query_literal_prefix): Call query_regexp if ignoring case. (query_regexp): Test delimiter_style before calling add_regexp_word_delimiters. (query_literal_substring): Add local var arg_length. Handle word matches which can happen when ignoring case. Add local var match. 1999-04-10 Greg McGary <gkm@gnu.org> * walker.c (classify_link): Only return 0 for zero-length files. Keep directories, no matter what their size. DOS always returns zero size for directories. [From tbisp@uswest.net] 1999-04-09 Greg McGary <gkm@gnu.org> * po/Makefile.in.in (DISTFILES): Remove ChangeLog. * po/ChangeLog: Remove empty file. 1999-04-08 Greg McGary <gkm@gnu.org> * libidu/idread.c (maybe_read_id_file): Add `b' for binary to fopen mode string. [From tbisp@uswest.net] * src/lid.c (report_grep): Change name of gid_FILE to source_FILE. * src/mkid.c (write_id_file): Complain if fclose fails. [From jbb6@acpub.duke.edu] * src/lid.c (limits.h): Include earlier to avoid RE_DUP_MAX conflict. [From Erick.Branderhorst@asml.nl] (search_flinkv): Bash terminating newline. [From marc@snafu.org] * lisp/elisp-comp: Import more recent version from automake. * libidu/scanners.c (SCAN_CPP_DIRECTIVE): Tolerate leading whitespace before first '#' [From rodneybrown@pmsc.com] (get_token_asm, get_token_c): Move some common leading context into SCAN_CPP_DIRECTIVE. * po/pl.po, po/nl.po: Add files. * configure.in (ALL_LINGUAS): Add pl & nl. 1999-04-06 Greg McGary <gkm@gnu.org> * Version 3.2d released. * libidu/idfile.h (largest_member_file): Add variable decl. (MAX_LARGEST_MEMBER_FILE): Add constant. * libidu/scanners.h (scanner_buffer): Add variable decl. * libidu/scanners.c (scanner_buffer): Rename from id_0. * libidu/walker.c (largest_member_file): Add veriable defn. (walk_flink): Maintain largest_member_file. Call print_member_file. (maybe_get_member_file): Don't call print_member_file. (classify_link): Return 0 if file size is zero. * src/mkid.c (scan_files): Report size of largest file. Cap scanner_buffer size at MAX_LARGEST_MEMBER_FILE. Allocate scanner_buffer. * src/xtokid.c (scan_files): Cap scanner_buffer size at MAX_LARGEST_MEMBER_FILE. Allocate scanner_buffer. 1999-04-04 Greg McGary <gkm@gnu.org> * configure.in: Check for regcomp and compile lib/regex.c if the system doesn't provide it. * lisp/Makefile.am (lisp_LISP): Add variable. Remove all other obsolete contents. * src/lid.c (search_flinkv): Replace `gets' with `fgets'. 1999-04-03 Greg McGary <gkm@gnu.org> * Version 3.2c released. * libidu/id-file.h (walker_verbose_flag): Add extern variable decl. * libidu/scanners.c (SCAN_CPP_DIRECTIVE): Add macro. (get_token_c, get_token_asm): Call SCAN_CPP_DIRECTIVE. * libidu/walker.c (walker_verbose_flag): Add variable defn. (print_member_file): Add function. (maybe_get_member_file): Call print_member_file in verbose mode. * src/mkid.c: Add coments. (ceil_log_2): Add function. (main): Handle 'V' option for extra verbosity. (scan_files): Use MAX (1M, n*lg(n)*64) to estimate initial size of token hash table. (name_tokens, number_tokens, string_tokens, literal_tokens, comment_tokens, occurrences, hits_length, tokens_length, output_length): Change type from size_t to unsigned long. (report_statistics): Fix printf formats. 1999-03-29 Greg McGary <gkm@gnu.org> * Version 3.2b released. * libidu/idfile.h (struct member_file) [mf_index]: Change type to long. * libidu/scanners.h (MAX_LEVELS): Remove constant. (struct token) [tok_hits, tok_name]: Remove members. [tok_hits_name]: Add member. (TOKEN_HITS, TOKEN_NAME, OFFSETOF_TOKEN_NAME): Add macros. * libidu/scanners.c (log_8_member_files): Add variable definition. (get_token_c, get_token_asm, get_token_text): Use OFFSETOF_TOKEN_NAME. * libidu/walker.c (mark_member_file_links) [new_index]: Change variable type to long. * src/idx.c (scan_member_file): Use TOKEN_NAME. * src/mkid.c (ceil_log_8) Add function. (current_hits_signature): Change variable type to (char *). (main) [log_8_member_files]: Initialize new variable. [current_hits_signature] Allocate storage. (scan_member_file): Print member->mf_index as long. (scan_member_file_1, write_id_file, token_hash_1, token_hash_2, token_hash_cmp, token_qsort_cmp, summarize, write_hits): use TOKEN_NAME & TOKEN_HITS. (init_hits_signature, write_hits): Replace MAX_LEVELS with log_8_member_files. * src/xtokid.c (scan_member_file): Use TOKEN_NAME. * libidu/idfile.h (vectorize_string) [delimiter_class]: Declare as pointer to const. * libidu/walker.c (append_strings_to_vector, vectorize_string) [delimiter_class]: Declare as pointer to const. (white_space): Declare as array of const. 1999-03-28 Greg McGary <gkm@gnu.org> * libidu/hash.c (hash_insert): hash_insert_at no longer returns old contents, but rather the new slot address. (hash_insert_at): Return slot address of inserted item. * libidu/walker.c (get_member_file): return member. (get_link_from_dirent, get_link_from_string): Conform to new hash_insert_at API, where return value is slot address of newly inserted item. * Makefile.am (AUTOMAKE_OPTIONS): Add macro. * config.h.in (WITH_REGEX): Remove. * configure.in (AM_WITH_REGEX): Remove. * src/lid.c (rx.h): Remove #include. 1999-02-11 Greg McGary <gkm@gnu.org> * src/lid.c (report_grep): Continue rather than return when fopen fails. 1999-01-31 Jim Meyering <meyering@ascend.com> * doc/Makefile.am (DISTCLEANFILES): Remove id-utils.cm. * doc/id-utils.texi: Remove unused `@defcodeindex cm'. 1999-01-28 Jim Meyering <meyering@ascend.com> * libidu/scanners.c (set_ushort_ctype): Use an unsigned char index. (clear_ushort_ctype): Likewise. (set_uchar_ctype): Likewise. (clear_uchar_ctype): Likewise. (id_0): Add `unsigned' to declaration of this file-scope static var. (get_token_c): Add `unsigned' to declaration of `id'. (get_token_asm): Likewise. (get_token_text): Likewise. * testsuite/Makefile.am (DISTCLEANFILES): Arrange to remove ID. * libidu/Makefile.am (EXTRA_DIST): Arrange to distribute id-lang.map. * lisp/Makefile.am (DISTCLEANFILES): Arrange to remove id-utils.elc. * doc/Makefile.am (DISTCLEANFILES): Arrange to remove id-utils.cm and id-utils.fl. 1999-01-27 Jim Meyering <meyering@ascend.com> (with some changes from gkm) * Makefile.maint: New file. * GNUmakefile: New file. * lib/Makefile.am (AUTOMAKE_OPTIONS): Use ../src/ansi2knr. * libidu/Makefile.am (AUTOMAKE_OPTIONS): Likewise. (ansi2knr.c): Remove rule. * src/ansi2knr.c: Import new version. * src/ansi2knr.1: Likewise. * lib/Makefile.am (EXTRA_DIST): Remove getopt.c and getopt1.c. * configure.in: Require autoconf-2.13. Remove some variables that now come with AM_INIT_AUTOMAKE. Remove deprecated AM_MAINTAINER_MODE. Use AC_PROG_INSTALL, not deprecated AM_PROG_INSTALL. Use AM_FUNC_OBSTACK, not AC_REPLACE_OBSTACK. Use AM_GNU_GETTEXT, not ud_GNU_GETTEXT/AC_LINK_FILES... Define LIBOBJS for ansi2knr filtering rules. (AC_OUTPUT): Add m4/Makefile. * acconfig.h: Remove many #undefs, now that we're using autoconf-2.13's 3-arg form of the AC_DEFINE* macros. * Makefile.am (SUBDIRS): Add m4. (EXTRA_DIST): Add Makefile.maint GNUmakefile @README_ALPHA@. (DISTCLEANFILES): Add intl/libintl.h. (ACLOCAL_AMFLAGS): Define to `-I m4' * m4/: New directory. 1999-01-26 Greg McGary <gkm@gnu.org> * hash.h (struct hash_table) [ht_empty_slots]: Add struct member. * hash.c (hash_init): Initialize ht_empty_slots. Don't halve ht_size. (hash_find_slot) Return deleted slot, if available. (hash_insert_at): Decrement ht_empty_slots if one is consumed. Rehash if emtpy slots become too scarce. (hash_free_items, hash_deleted_item, hash_free): Re-initialize ht_empty_slots. (hash_rehash): Don't double table size if rehashing only because table is clogged with deleted slots. 1998-11-20 Greg McGary <gkm@gnu.org> * libidu/fnprint.c (print_filenames): Move ALLOCA outside loop. * libidu/walker.c (get_lang_args): Ditto. * src/fnid.c (main): Ditto. * src/lid.c (report_grep, search_flinkv): Ditto. * src/mkid.c (scan_member_file): Consolidate two ALLOCA buffers at inner scopes to a single buffer at an outer scope. 1998-11-18 Greg McGary <gkm@gnu.org> * missing: Add file. * configure.in, lib/Makefile.am, libidu/Makefile.am: Conform macro names to automake-1.3 conventions. * libidu/scanners.c (id_0): Increase size and make file static. Tue Aug 6 22:46:16 1996 Greg McGary <gkm@g2> * Version 3.2 released * src/fid.c (get_file_index): rename shadowing local decl of file_name. * src/lid.c (report_edit): post decrement argv when splicing in ed_arg_buffer. * src/xtokid.c, libidu/idfile.h: #include "xstring.h" to avoid redeclaration of basename/dirname error. Wed Jul 17 18:06:18 1996 Greg McGary <gkm@g2> * Version 3.1 released Sun Jun 30 13:06:18 1996 Greg McGary <gkm@g2> * src/lid.c (get_query_func): remove unreachable return stmt. * libidu/hash.h (HASH_VACANT): cast item to (void *) for comparison. * libidu/walker.c (append_strings_to_vector): check length of vector_0, not vector. * libidu/scanners.c (get_token_c, get_token_asm, get_token_text): cast return type of obstack_finish. * src/lid.c (radix, delimiter_style, pattern_style, key_style, result_style, key_style, result_style) libidu/idfile.h (separator_style): remove trailing comma from enum list. * src/xtokid.c: removed include of string.h. * src/lid.c (savetty, restoretty, linetty, chartty): define stub versions if no UNIXy tty control is available. Wed Jun 12 22:15:12 1996 Greg McGary <gkm@g2> * src/lid.c, src/mkid.c, src/fnid.c (main): change default argv variables from char* to char[] Mon Jun 10 15:29:19 1996 Greg McGary <gkm@g2> * src/mkid.c (main): -v implies -s; handle the case where there's nothing to do. * libidu/walker.c (get_lang_args): test lang_args_default before dereference. Sun Jun 9 23:46:53 1996 Greg McGary <gkm@g2> * lid.c (get_radix, otoi, dtoi, xtoi): Test *str before passing it to strchr--fixes query_number bug. Sat Feb 25 16:23:49 1995 Greg McGary <gkm@magilla.cichlid.com> * Version 3.0.8 released. * configure.in, acconfig.h, Makefile.in (TOUCH, PREV_VERSION): Added. (check): Export PATH. (TAGS): Eliminate unnecessary `-t' option to etags. (mostlyclean, clean, distclean, maintainer-clean, install): Bring into conformance with GNU standards. (AWK, OLD_PATCH_LEVEL, PATCH_LEVEL, SIZEOF_LONG, bump-major, bump-minor, bump-patch): Deleted. (ANSI2KNR, ansi2knr): Added. (depend): Fixed to support ansi2knr. * configure.in: Update stamp-h inside AC_OUTPUT. * acconfig.h: Work harder to force #undef of HAVE_TERMIOS_H for NeXT. (__P): Added. * bitops.c, fid.c, filenames.c, idfile.c, idx.c, iid.c, lid.c, misc.c, mkid.c, scanners.c, token.c: Changed "config.h" to <config.h>. * acconfig.h, bitops.c, bitops.h, fid.c, filenames.h, idfile.c, idfile.h, idx.c, iid.c, lid.c, misc.h, mkid.c, scanners.c, scanners.h, token.h: Use __P around function prototype decls. * acconfig.h, idfile.h, idfile.c (intmin32_t, uintmin32_t): Deleted in favor of long and unsigned long. * idtest: Fixed bugs (Thanks to Francois Pinard). * mkid.c (write_idfile): Delete erroneous remnant of old file name indexing scheme (Reported by Dave Wiggins). (assert_hits): Simplified & fixed erroneous assertion. * lid.c (grep_id): Treat '\0' as end-of-line along with '\n'. * strerror.c (strerror): Protoize defn. Mon Feb 20 16:18:47 1995 Greg McGary <gkm@magilla.cichlid.com> * Version 3.0.7 released. * scanners.c (scanners, suffixes, init_scanners, get_scanner, set_scan_args, get_lang_name, get_filter, get_suffix): Fixed boundary conditions. * mkid.c (make_sibling_summary): Don't realloc if kid's sum_tokens is already large enough. (scan_1_file): Ignore blank tokens. Avoid division by 0 (pinard@iro.umontreal.ca). (write_idfile): Moved assertions & qsort to top. Don't check for blank tokens--it can't happen. (rehash): Prefix "Rehashing..." with "\n\t". * idtest: Test fid more rigorously. * idfile.c (init_idfile): Don't increment i for non-file args. * Makefile.in (DEFS, DIST_SHAR, AWK, bump-patch, bump-minor, bump-major, shar): Added. (.PRECIOUS): Added configure, config.h config.h.in. * configure.in (DEPEND): Fixed portability (kazusi-m@is.aist-nara.ac.jp). (AC_CHECK_FUNCS(basename, dirname)): Added. * misc.h, misc.c: Made decl/defn of basename, dirname conditional. Sun Feb 19 19:21:09 1995 Thomas Neumann <tom@smart.ruhr.de> * configure.in: Check for <sgtty.h>, not <sgttyb.h>. * accconfig.h: Disbale HAVE_TERMIOS_H for NeXT, if HAVE_SGTTY_H is present. * lid.c: Depend on HAVE_SGTTY_H, not HAVE_SGTTYB_H. (savetty): ANSI'fy arglist declaration. Sat Feb 18 21:44:39 1995 Greg McGary <gkm@magilla.cichlid.com> * Version 3.0.6 released. * Makefile.in, accconfig.h, mkid.c: Revised & simplified package name & version macros. * Makefile.in (DIST_MISC_FILES): Added version.texi, stamp-vti. (TAGS): Fixed. (config.status): Removed dependency on config.cache. * acconfig.h: Added #ifndef _config_h_ ... #endif around file. (SIZEOF_INT, SIZEOF_CHAR, SIZEOF_SHORT, uint8_t, uint16_t, uint32_t, int32_t): Deleted. (SIZEOF_LONG): Changed typedef name to intmin32_t and uintmin32_t; all uses changed. * configure.in (AC_CHECK_SIZEOF (int, short, char)): Deleted. * idfile.h (struct idhead): Dropped uint8_t, uint16_t, uint32_t, int32_t, added intmin32_t & uintmin32_t. * idfile.c (io_idhead, io_write, io_read): Use constants to express integer sizes for I/O on struct idhead. * idtest, Makefile.in (stamp-vti): Dumbed-down shell code for portability. * lid.c (enum radix): Deleted trailing comma. * scanners.c (ctype_c, ctype_asm, ctype_text): Made unsigned. Thu Feb 16 23:55:44 EST 1995 Greg McGary <gkm@magilla.cichlid.com> * Version 3.0.5 released. * iid.y (main): Eliminate useless Do1 variable. * filenames.c (kshgetwd): Conditionally use getcwd or getwd. * acconfig.h: Added typedefs of uint8_t, uint16_t, uint32_t, int32_t. * idfile.h (struct idhead), idfile.c (io_read, io_write): Use uint8_t, uint16_t, uint32_t, int32_t. * lid.c (savetty, restoretty, linetty, chartty): Handle POSIX termios properly. (HAVE_SYS_IOCTL_H): #include <sys/ioctl.h> if !HAVE_TERMIOS_H. * configure.in (OLD_PATCH_LEVEL, MAJOR_VERSION, MINOR_VERSION, FULL_VERSION, AC_CHECK_SIZEOF(int, long, short, char), AC_CHECK_HEADERS(regex.h), AC_CHECK_FUNCS(regcomp regcmp): Added. * mkdirhier: Added. * Makefile.in (DIST_MISC_FILES): Added ChangeLog. (depend): $(DEPEND) and Makefile are now .PRECIOUS. (dist-dir-links): Added. (check, install, uninstall): Fixed. (install): Use mkdirhier. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/Makefile.in����������������������������������������������������������������0000664�0000000�0000000�00000171534�12166360012�013460� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.rpath \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS TODO \ build-aux/compile build-aux/config.guess \ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ build-aux/elisp-comp build-aux/install-sh build-aux/mdate-sh \ build-aux/missing build-aux/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.xz DIST_TARGETS = dist-xz distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib libidu src lisp doc man gnulib-tests testsuite po EXTRA_DIST = \ .prev-version \ .version \ cfg.mk \ dist-check.mk \ idutils.spec \ idutils.spec.in \ maint.mk \ bootstrap \ bootstrap.conf \ build-aux/vc-list-files gen_start_date = 2008-01-01 MAINTAINERCLEANFILES = idutils.spec BUILT_SOURCES = .version all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist-recursive cscopelist cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ cscopelist-recursive ctags-recursive install install-am \ install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-cscope \ clean-generic cscope cscopelist cscopelist-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am .PHONY: gen-ChangeLog gen-ChangeLog: if test -d .git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog \ --since=$(gen_start_date) > $(distdir)/cl-t; \ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi idutils.spec: idutils.spec.in .version sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-t mv $@-t $@ .version: echo $(VERSION) > $@-t && mv $@-t $@ # Arrange so that .tarball-version appears only in the distribution # tarball, and never in a checked-out repository. # The perl substitution is to change some key uses of "rm" to "/bin/rm". # See the rm_subst comment for details. dist-hook: gen-ChangeLog echo $(VERSION) > $(distdir)/.tarball-version # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/bootstrap������������������������������������������������������������������0000775�0000000�0000000�00000071416�12204226501�013351� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Print a version string. scriptversion=2012-07-19.14; # UTC # Bootstrap this package from checked-out sources. # Copyright (C) 2003-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 <http://www.gnu.org/licenses/>. # Originally written by Paul Eggert. The canonical version of this # script is maintained as build-aux/bootstrap in gnulib, however, to # be useful to your project, you should place a copy of it under # version control in the top-level directory of your project. The # intent is that all customization can be done with a bootstrap.conf # file also maintained in your version control; gnulib comes with a # template build-aux/bootstrap.conf to get you started. # Please report bugs or propose patches to bug-gnulib@gnu.org. nl=' ' # Ensure file names are sorted consistently across platforms. LC_ALL=C export LC_ALL # Ensure that CDPATH is not set. Otherwise, the output from cd # would cause trouble in at least one use below. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH local_gl_dir=gl me=$0 usage() { cat <<EOF Usage: $me [OPTION]... Bootstrap this package from the checked-out sources. Options: --gnulib-srcdir=DIRNAME specify the local directory where gnulib sources reside. Use this if you already have gnulib sources on your machine, and do not want to waste your bandwidth downloading them again. Defaults to \$GNULIB_SRCDIR --bootstrap-sync if this bootstrap script is not identical to the version in the local gnulib sources, update this script, and then restart it with /bin/sh or the shell \$CONFIG_SHELL --no-bootstrap-sync do not check whether bootstrap is out of sync --copy copy files instead of creating symbolic links --force attempt to bootstrap even if the sources seem not to have been checked out --no-git do not use git to update gnulib. Requires that --gnulib-srcdir point to a correct gnulib snapshot --skip-po do not download po files If the file $me.conf exists in the same directory as this script, its contents are read as shell variables to configure the bootstrap. For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR are honored. Running without arguments will suffice in most cases. EOF } # warnf_ FORMAT-STRING ARG1... warnf_ () { warnf_format_=$1 shift nl=' ' case $* in *$nl*) me_=$(printf "$me"|tr "$nl|" '??') printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;; *) printf "$me: $warnf_format_" "$@" ;; esac >&2 } # warn_ WORD1... warn_ () { # If IFS does not start with ' ', set it and emit the warning in a subshell. case $IFS in ' '*) warnf_ '%s\n' "$*";; *) (IFS=' '; warn_ "$@");; esac } # die WORD1... die() { warn_ "$@"; exit 1; } # Configuration. # Name of the Makefile.am gnulib_mk=gnulib.mk # List of gnulib modules needed. gnulib_modules= # Any gnulib files needed that are not in modules. gnulib_files= : ${AUTOPOINT=autopoint} : ${AUTORECONF=autoreconf} # A function to be called right after gnulib-tool is run. # Override it via your own definition in bootstrap.conf. bootstrap_post_import_hook() { :; } # A function to be called after everything else in this script. # Override it via your own definition in bootstrap.conf. bootstrap_epilogue() { :; } # The command to download all .po files for a specified domain into # a specified directory. Fill in the first %s is the domain name, and # the second with the destination directory. Use rsync's -L and -r # options because the latest/%s directory and the .po files within are # all symlinks. po_download_command_format=\ "rsync --delete --exclude '*.s1' -Lrtvz \ 'translationproject.org::tp/latest/%s/' '%s'" # Fallback for downloading .po files (if rsync fails). po_download_command_format2=\ "wget --mirror -nd -q -np -A.po -P '%s' \ http://translationproject.org/latest/%s/" extract_package_name=' /^AC_INIT(/{ /.*,.*,.*, */{ s/// s/[][]//g s/)$// p q } s/AC_INIT(\[*// s/]*,.*// s/^GNU // y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ s/[^A-Za-z0-9_]/-/g p } ' package=$(sed -n "$extract_package_name" configure.ac) \ || die 'cannot find package name in configure.ac' gnulib_name=lib$package build_aux=build-aux source_base=lib m4_base=m4 doc_base=doc tests_base=tests gnulib_extra_files='' # Additional gnulib-tool options to use. Use "\newline" to break lines. gnulib_tool_option_extras= # Other locale categories that need message catalogs. EXTRA_LOCALE_CATEGORIES= # Additional xgettext options to use. Use "\\\newline" to break lines. XGETTEXT_OPTIONS='\\\ --flag=_:1:pass-c-format\\\ --flag=N_:1:pass-c-format\\\ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ ' # Package bug report address and copyright holder for gettext files COPYRIGHT_HOLDER='Free Software Foundation, Inc.' MSGID_BUGS_ADDRESS=bug-$package@gnu.org # Files we don't want to import. excluded_files= # File that should exist in the top directory of a checked out hierarchy, # but not in a distribution tarball. checkout_only_file=README-hacking # Whether to use copies instead of symlinks. copy=false # Set this to '.cvsignore .gitignore' in bootstrap.conf if you want # those files to be generated in directories like lib/, m4/, and po/. # Or set it to 'auto' to make this script select which to use based # on which version control system (if any) is used in the source directory. vc_ignore=auto # Set this to true in bootstrap.conf to enable --bootstrap-sync by # default. bootstrap_sync=false # Use git to update gnulib sources use_git=true # find_tool ENVVAR NAMES... # ------------------------- # Search for a required program. Use the value of ENVVAR, if set, # otherwise find the first of the NAMES that can be run (i.e., # supports --version). If found, set ENVVAR to the program name, # die otherwise. # # FIXME: code duplication, see also gnu-web-doc-update. find_tool () { find_tool_envvar=$1 shift find_tool_names=$@ eval "find_tool_res=\$$find_tool_envvar" if test x"$find_tool_res" = x; then for i do if ($i --version </dev/null) >/dev/null 2>&1; then find_tool_res=$i break fi done else find_tool_error_prefix="\$$find_tool_envvar: " fi test x"$find_tool_res" != x \ || die "one of these is required: $find_tool_names" ($find_tool_res --version </dev/null) >/dev/null 2>&1 \ || die "${find_tool_error_prefix}cannot run $find_tool_res --version" eval "$find_tool_envvar=\$find_tool_res" eval "export $find_tool_envvar" } # Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6. find_tool SHA1SUM sha1sum gsha1sum shasum # Override the default configuration, if necessary. # Make sure that bootstrap.conf is sourced from the current directory # if we were invoked as "sh bootstrap". case "$0" in */*) test -r "$0.conf" && . "$0.conf" ;; *) test -r "$0.conf" && . ./"$0.conf" ;; esac # Extra files from gnulib, which override files from other sources. test -z "${gnulib_extra_files}" && \ gnulib_extra_files=" $build_aux/install-sh $build_aux/mdate-sh $build_aux/texinfo.tex $build_aux/depcomp $build_aux/config.guess $build_aux/config.sub doc/INSTALL " if test "$vc_ignore" = auto; then vc_ignore= test -d .git && vc_ignore=.gitignore test -d CVS && vc_ignore="$vc_ignore .cvsignore" fi # Translate configuration into internal form. # Parse options. for option do case $option in --help) usage exit;; --gnulib-srcdir=*) GNULIB_SRCDIR=${option#--gnulib-srcdir=};; --skip-po) SKIP_PO=t;; --force) checkout_only_file=;; --copy) copy=true;; --bootstrap-sync) bootstrap_sync=true;; --no-bootstrap-sync) bootstrap_sync=false;; --no-git) use_git=false;; *) die "$option: unknown option";; esac done $use_git || test -d "$GNULIB_SRCDIR" \ || die "Error: --no-git requires --gnulib-srcdir" if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then die "Bootstrapping from a non-checked-out distribution is risky." fi # Ensure that lines starting with ! sort last, per gitignore conventions # for whitelisting exceptions after a more generic blacklist pattern. sort_patterns() { sort -u "$@" | sed '/^!/ { H d } $ { P x s/^\n// }' | sed '/^$/d' } # If $STR is not already on a line by itself in $FILE, insert it, # sorting the new contents of the file and replacing $FILE with the result. insert_sorted_if_absent() { file=$1 str=$2 test -f $file || touch $file echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \ || { echo "$str" | sort_patterns - $file > $file.bak \ && mv $file.bak $file; } \ || die "insert_sorted_if_absent $file $str: failed" } # Adjust $PATTERN for $VC_IGNORE_FILE and insert it with # insert_sorted_if_absent. insert_vc_ignore() { vc_ignore_file="$1" pattern="$2" case $vc_ignore_file in *.gitignore) # A .gitignore entry that does not start with '/' applies # recursively to subdirectories, so prepend '/' to every # .gitignore entry. pattern=$(echo "$pattern" | sed s,^,/,);; esac insert_sorted_if_absent "$vc_ignore_file" "$pattern" } # Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. found_aux_dir=no grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ >/dev/null && found_aux_dir=yes grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ >/dev/null && found_aux_dir=yes test $found_aux_dir = yes \ || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" # If $build_aux doesn't exist, create it now, otherwise some bits # below will malfunction. If creating it, also mark it as ignored. if test ! -d $build_aux; then mkdir $build_aux for dot_ig in x $vc_ignore; do test $dot_ig = x && continue insert_vc_ignore $dot_ig $build_aux done fi # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. sort_ver() { # sort -V is not generally available ver1="$1" ver2="$2" # split on '.' and compare each component i=1 while : ; do p1=$(echo "$ver1" | cut -d. -f$i) p2=$(echo "$ver2" | cut -d. -f$i) if [ ! "$p1" ]; then echo "$1 $2" break elif [ ! "$p2" ]; then echo "$2 $1" break elif [ ! "$p1" = "$p2" ]; then if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison echo "$2 $1" elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison echo "$1 $2" else # numeric, then lexicographic comparison lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1) if [ "$lp" = "$p2" ]; then echo "$1 $2" else echo "$2 $1" fi fi break fi i=$(($i+1)) done } get_version() { app=$1 $app --version >/dev/null 2>&1 || return 1 $app --version 2>&1 | sed -n '# Move version to start of line. s/.*[v ]\([0-9]\)/\1/ # Skip lines that do not start with version. /^[0-9]/!d # Remove characters after the version. s/[^.a-z0-9-].*// # The first component must be digits only. s/^\([0-9]*\)[a-z-].*/\1/ #the following essentially does s/5.005/5.5/ s/\.0*\([1-9]\)/.\1/g p q' } check_versions() { ret=0 while read app req_ver; do # We only need libtoolize from the libtool package. if test "$app" = libtool; then app=libtoolize fi # Exempt git if --no-git is in effect. if test "$app" = git; then $use_git || continue fi # Honor $APP variables ($TAR, $AUTOCONF, etc.) appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') test "$appvar" = TAR && appvar=AMTAR case $appvar in GZIP) ;; # Do not use $GZIP: it contains gzip options. *) eval "app=\${$appvar-$app}" ;; esac # Handle the still-experimental Automake-NG programs specially. # They remain named as the mainstream Automake programs ("automake", # and "aclocal") to avoid gratuitous incompatibilities with # pre-existing usages (by, say, autoreconf, or custom autogen.sh # scripts), but correctly identify themselves (as being part of # "GNU automake-ng") when asked their version. case $app in automake-ng|aclocal-ng) app=${app%-ng} ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { warn_ "Error: '$app' not found or not from Automake-NG" ret=1 continue } ;; esac if [ "$req_ver" = "-" ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. $app --version >/dev/null 2>&1 if [ 126 -le $? ]; then warn_ "Error: '$app' not found" ret=1 fi else # Require app to produce a new enough version string. inst_ver=$(get_version $app) if [ ! "$inst_ver" ]; then warn_ "Error: '$app' not found" ret=1 else latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) if [ ! "$latest_ver" = "$inst_ver" ]; then warnf_ '%s\n' \ "Error: '$app' version == $inst_ver is too old" \ " '$app' version >= $req_ver is required" ret=1 fi fi fi done return $ret } print_versions() { echo "Program Min_version" echo "----------------------" printf %s "$buildreq" echo "----------------------" # can't depend on column -t } use_libtool=0 # We'd like to use grep -E, to see if any of LT_INIT, # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, # but that's not portable enough (e.g., for Solaris). grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ && use_libtool=1 grep '^[ ]*LT_INIT' configure.ac >/dev/null \ && use_libtool=1 if test $use_libtool = 1; then find_tool LIBTOOLIZE glibtoolize libtoolize fi # gnulib-tool requires at least automake and autoconf. # If either is not listed, add it (with minimum version) as a prerequisite. case $buildreq in *automake*) ;; *) buildreq="automake 1.9 $buildreq" ;; esac case $buildreq in *autoconf*) ;; *) buildreq="autoconf 2.59 $buildreq" ;; esac # When we can deduce that gnulib-tool will require patch, # and when patch is not already listed as a prerequisite, add it, too. if test -d "$local_gl_dir" \ && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then case $buildreq in *patch*) ;; *) buildreq="patch - $buildreq" ;; esac fi if ! printf "$buildreq" | check_versions; then echo >&2 if test -f README-prereq; then die "See README-prereq for how to get the prerequisite programs" else die "Please install the prerequisite programs" fi fi echo "$0: Bootstrapping from checked-out $package sources..." # See if we can use gnulib's git-merge-changelog merge driver. if test -d .git && (git --version) >/dev/null 2>/dev/null ; then if git config merge.merge-changelog.driver >/dev/null ; then : elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then echo "$0: initializing git-merge-changelog driver" git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' else echo "$0: consider installing git-merge-changelog from gnulib" fi fi cleanup_gnulib() { status=$? rm -fr "$gnulib_path" exit $status } git_modules_config () { test -f .gitmodules && git config --file .gitmodules "$@" } gnulib_path=$(git_modules_config submodule.gnulib.path) test -z "$gnulib_path" && gnulib_path=gnulib # Get gnulib files. case ${GNULIB_SRCDIR--} in -) if git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." git submodule init || exit $? git submodule update || exit $? elif [ ! -d "$gnulib_path" ]; then echo "$0: getting gnulib files..." trap cleanup_gnulib 1 2 13 15 shallow= git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || cleanup_gnulib trap - 1 2 13 15 fi GNULIB_SRCDIR=$gnulib_path ;; *) # Use GNULIB_SRCDIR as a reference. if test -d "$GNULIB_SRCDIR"/.git && \ git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." if git submodule -h|grep -- --reference > /dev/null; then # Prefer the one-liner available in git 1.6.4 or newer. git submodule update --init --reference "$GNULIB_SRCDIR" \ "$gnulib_path" || exit $? else # This fallback allows at least git 1.5.5. if test -f "$gnulib_path"/gnulib-tool; then # Since file already exists, assume submodule init already complete. git submodule update || exit $? else # Older git can't clone into an empty directory. rmdir "$gnulib_path" 2>/dev/null git clone --reference "$GNULIB_SRCDIR" \ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ && git submodule init && git submodule update \ || exit $? fi fi GNULIB_SRCDIR=$gnulib_path fi ;; esac if $bootstrap_sync; then cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || { echo "$0: updating bootstrap and restarting..." exec sh -c \ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ -- "$GNULIB_SRCDIR/build-aux/bootstrap" \ "$0" "$@" --no-bootstrap-sync } fi gnulib_tool=$GNULIB_SRCDIR/gnulib-tool <$gnulib_tool || exit $? # Get translations. download_po_files() { subdir=$1 domain=$2 echo "$me: getting translations into $subdir for $domain..." cmd=$(printf "$po_download_command_format" "$domain" "$subdir") eval "$cmd" && return # Fallback to HTTP. cmd=$(printf "$po_download_command_format2" "$subdir" "$domain") eval "$cmd" } # Mirror .po files to $po_dir/.reference and copy only the new # or modified ones into $po_dir. Also update $po_dir/LINGUAS. # Note po files that exist locally only are left in $po_dir but will # not be included in LINGUAS and hence will not be distributed. update_po_files() { # Directory containing primary .po files. # Overwrite them only when we're sure a .po file is new. po_dir=$1 domain=$2 # Mirror *.po files into this dir. # Usually contains *.s1 checksum files. ref_po_dir="$po_dir/.reference" test -d $ref_po_dir || mkdir $ref_po_dir || return download_po_files $ref_po_dir $domain \ && ls "$ref_po_dir"/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') test "$langs" = '*' && langs=x for po in $langs; do case $po in x) continue;; esac new_po="$ref_po_dir/$po.po" cksum_file="$ref_po_dir/$po.s1" if ! test -f "$cksum_file" || ! test -f "$po_dir/$po.po" || ! $SHA1SUM -c --status "$cksum_file" \ < "$new_po" > /dev/null; then echo "$me: updated $po_dir/$po.po..." cp "$new_po" "$po_dir/$po.po" \ && $SHA1SUM < "$new_po" > "$cksum_file" fi done } case $SKIP_PO in '') if test -d po; then update_po_files po $package || exit fi if test -d runtime-po; then update_po_files runtime-po $package-runtime || exit fi;; esac symlink_to_dir() { src=$1/$2 dst=${3-$2} test -f "$src" && { # If the destination directory doesn't exist, create it. # This is required at least for "lib/uniwidth/cjk.h". dst_dir=$(dirname "$dst") if ! test -d "$dst_dir"; then mkdir -p "$dst_dir" # If we've just created a directory like lib/uniwidth, # tell version control system(s) it's ignorable. # FIXME: for now, this does only one level parent=$(dirname "$dst_dir") for dot_ig in x $vc_ignore; do test $dot_ig = x && continue ig=$parent/$dot_ig insert_vc_ignore $ig "${dst_dir##*/}" done fi if $copy; then { test ! -h "$dst" || { echo "$me: rm -f $dst" && rm -f "$dst" } } && test -f "$dst" && cmp -s "$src" "$dst" || { echo "$me: cp -fp $src $dst" && cp -fp "$src" "$dst" } else # Leave any existing symlink alone, if it already points to the source, # so that broken build tools that care about symlink times # aren't confused into doing unnecessary builds. Conversely, if the # existing symlink's time stamp is older than the source, make it afresh, # so that broken tools aren't confused into skipping needed builds. See # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>. test -h "$dst" && src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && test "$src_i" = "$dst_i" && both_ls=$(ls -dt "$src" "$dst") && test "X$both_ls" = "X$dst$nl$src" || { dot_dots= case $src in /*) ;; *) case /$dst/ in *//* | */../* | */./* | /*/*/*/*/*/) die "invalid symlink calculation: $src -> $dst";; /*/*/*/*/) dot_dots=../../../;; /*/*/*/) dot_dots=../../;; /*/*/) dot_dots=../;; esac;; esac echo "$me: ln -fs $dot_dots$src $dst" && ln -fs "$dot_dots$src" "$dst" } fi } } version_controlled_file() { parent=$1 file=$2 if test -d .git; then git rm -n "$file" > /dev/null 2>&1 elif test -d .svn; then svn log -r HEAD "$file" > /dev/null 2>&1 elif test -d CVS; then grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | grep '^/[^/]*/[0-9]' > /dev/null else warn_ "no version control for $file?" false fi } # NOTE: we have to be careful to run both autopoint and libtoolize # before gnulib-tool, since gnulib-tool is likely to provide newer # versions of files "installed" by these two programs. # Then, *after* gnulib-tool (see below), we have to be careful to # run autoreconf in such a way that it does not run either of these # two just-pre-run programs. # Import from gettext. with_gettext=yes grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ with_gettext=no if test $with_gettext = yes || test $use_libtool = 1; then tempbase=.bootstrap$$ trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15 > $tempbase.0 > $tempbase.1 && find . ! -type d -print | sort > $tempbase.0 || exit if test $with_gettext = yes; then # Released autopoint has the tendency to install macros that have been # obsoleted in current gnulib, so run this before gnulib-tool. echo "$0: $AUTOPOINT --force" $AUTOPOINT --force || exit fi # Autoreconf runs aclocal before libtoolize, which causes spurious # warnings if the initial aclocal is confused by the libtoolized # (or worse out-of-date) macro directory. # libtoolize 1.9b added the --install option; but we support back # to libtoolize 1.5.22, where the install action was default. if test $use_libtool = 1; then install= case $($LIBTOOLIZE --help) in *--install*) install=--install ;; esac echo "running: $LIBTOOLIZE $install --copy" $LIBTOOLIZE $install --copy fi find . ! -type d -print | sort >$tempbase.1 old_IFS=$IFS IFS=$nl for file in $(comm -13 $tempbase.0 $tempbase.1); do IFS=$old_IFS parent=${file%/*} version_controlled_file "$parent" "$file" || { for dot_ig in x $vc_ignore; do test $dot_ig = x && continue ig=$parent/$dot_ig insert_vc_ignore "$ig" "${file##*/}" done } done IFS=$old_IFS rm -f $tempbase.0 $tempbase.1 trap - 1 2 13 15 fi # Import from gnulib. gnulib_tool_options="\ --import\ --no-changelog\ --aux-dir $build_aux\ --doc-base $doc_base\ --lib $gnulib_name\ --m4-base $m4_base/\ --source-base $source_base/\ --tests-base $tests_base\ --local-dir $local_gl_dir\ $gnulib_tool_option_extras\ " if test $use_libtool = 1; then case "$gnulib_tool_options " in *' --libtool '*) ;; *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; esac fi echo "$0: $gnulib_tool $gnulib_tool_options --import ..." $gnulib_tool $gnulib_tool_options --import $gnulib_modules && for file in $gnulib_files; do symlink_to_dir "$GNULIB_SRCDIR" $file \ || die "failed to symlink $file" done bootstrap_post_import_hook \ || die "bootstrap_post_import_hook failed" # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some # gnulib-populated directories. Such .m4 files would cause aclocal to fail. # The following requires GNU find 4.2.3 or newer. Considering the usual # portability constraints of this script, that may seem a very demanding # requirement, but it should be ok. Ignore any failure, which is fine, # since this is only a convenience to help developers avoid the relatively # unusual case in which a symlinked-to .m4 file is git-removed from gnulib # between successive runs of this script. find "$m4_base" "$source_base" \ -depth \( -name '*.m4' -o -name '*.[ch]' \) \ -type l -xtype l -delete > /dev/null 2>&1 # Some systems (RHEL 5) are using ancient autotools, for which the # --no-recursive option had not been invented. Detect that lack and # omit the option when it's not supported. FIXME in 2017: remove this # hack when RHEL 5 autotools are updated, or when they become irrelevant. no_recursive= case $($AUTORECONF --help) in *--no-recursive*) no_recursive=--no-recursive;; esac # Tell autoreconf not to invoke autopoint or libtoolize; they were run above. echo "running: AUTOPOINT=true LIBTOOLIZE=true " \ "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS" AUTOPOINT=true LIBTOOLIZE=true \ $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \ || die "autoreconf failed" # Get some extra files from gnulib, overriding existing files. for file in $gnulib_extra_files; do case $file in */INSTALL) dst=INSTALL;; build-aux/*) dst=$build_aux/${file#build-aux/};; *) dst=$file;; esac symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ || die "failed to symlink $file" done if test $with_gettext = yes; then # Create gettext configuration. echo "$0: Creating po/Makevars from po/Makevars.template ..." rm -f po/Makevars sed ' /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} } ' po/Makevars.template >po/Makevars \ || die 'cannot generate po/Makevars' # If the 'gettext' module is in use, grab the latest Makefile.in.in. # If only the 'gettext-h' module is in use, assume autopoint already # put the correct version of this file into place. case $gnulib_modules in *gettext-h*) ;; *gettext*) cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ || die "cannot create po/Makefile.in.in" ;; esac if test -d runtime-po; then # Similarly for runtime-po/Makevars, but not quite the same. rm -f runtime-po/Makevars sed ' /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ /^subdir *=.*/s/=.*/= runtime-po/ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} } ' po/Makevars.template >runtime-po/Makevars \ || die 'cannot generate runtime-po/Makevars' # Copy identical files from po to runtime-po. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) fi fi bootstrap_epilogue echo "$0: done. Now you can run './configure'." # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/��������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465165�012655� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/tokflags.h����������������������������������������������������������0000664�0000000�0000000�00000002603�12166360012�014634� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* tokflags.h -- decls for per-token flags Copyright (C) 1995-1996, 2007, 2009-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _tokflags_h_ #define _tokflags_h_ #define TOK_VECTOR 0x01 /* 1 = hits are stored as a vector 0 = hits are stored as a 8-way tree of bits mkid chooses whichever is more compact. vector is more compact for tokens with few hits */ #define TOK_NUMBER 0x02 /* occurs as a number */ #define TOK_NAME 0x04 /* occurs as a name */ #define TOK_STRING 0x08 /* occurs in a string */ #define TOK_LITERAL 0x10 /* occurs as a literal */ #define TOK_COMMENT 0x20 /* occurs in a comment */ #define TOK_UNUSED_1 0x40 #define TOK_SHORT_COUNT 0x80 /* count is two bytes */ #endif /* not _tokflags_h_ */ �����������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/scanners.h����������������������������������������������������������0000664�0000000�0000000�00000004637�12166360012�014647� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* scanners.h -- defs for interface to scanners.c Copyright (C) 1986, 1995-1996, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _scanners_h_ #define _scanners_h_ #include "obstack.h" extern size_t log_8_member_files; /* log base 8 of the # of files. e.g., log_8 (32768) == 5 */ struct token { unsigned short tok_count; unsigned char tok_flags; unsigned char tok_hits_name[1]; }; #define TOKEN_HITS(TOKEN) ((TOKEN)->tok_hits_name) #define TOKEN_NAME(TOKEN) (char *)((TOKEN)->tok_hits_name + log_8_member_files) #define OFFSETOF_TOKEN_NAME (offsetof (struct token, tok_hits_name) + log_8_member_files) typedef struct token *(*get_token_func_t) (FILE *in_FILE, void const *args, int *flags); typedef void *(*parse_args_func_t) (char **argv, int argc); typedef void (*help_me_func_t) (void); struct language { char const *lg_name; parse_args_func_t lg_parse_args; get_token_func_t lg_get_token; help_me_func_t lg_help_me; int lg_argc; char *lg_argv[16]; }; struct lang_args { struct language const *la_language; char const *la_pattern; /* fnmatch(3) pattern */ char *la_args_string; /* human-readable scanner args */ void const *la_args_digested; /* pre-parsed scanner args */ int la_index; struct lang_args *la_next; }; extern void language_help_me (void); extern void language_getopt (void); extern void language_save_arg (char *arg); extern struct language *get_language (char const *lang_name) _GL_ATTRIBUTE_PURE; extern void parse_language_map (char const *file_name); extern void set_default_language (char const *lang_name); extern struct lang_args *lang_args_default; extern struct lang_args *lang_args_list; extern struct obstack tokens_obstack; extern unsigned char *scanner_buffer; #endif /* not _scanners_h_ */ �������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/dynvec.h������������������������������������������������������������0000664�0000000�0000000�00000002164�12166360012�014314� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dynvec.h -- declarations for dynamically growable vectors Copyright (C) 1995, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _dynvec_h_ #define _dynvec_h_ struct dynvec { void **dv_vec; int dv_capacity; int dv_fill; }; extern struct dynvec *make_dynvec (int n); extern void dynvec_free (struct dynvec *dv); extern void dynvec_freeze (struct dynvec *dv); extern void dynvec_append (struct dynvec *dv, void *element); #endif /* not _dynvec_h_ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/iduglobal.h���������������������������������������������������������0000664�0000000�0000000�00000004013�12166360012�014761� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _iduglobal_h #define _iduglobal_h /* iduglobal.h -- global definitions for libidu Copyright (C) 1995, 1999, 2005, 2007, 2009-2012 Free Software Foundation, Inc. Written by Claudio Fontana <sick_soul@users.sourceforge.net> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif #ifndef cardinalityof #define cardinalityof(ARRAY) (sizeof (ARRAY) / sizeof ((ARRAY)[0])) #endif #ifndef strequ #define strequ(s1, s2) (strcmp ((s1), (s2)) == 0) #define strnequ(s1, s2, n) (strncmp ((s1), (s2), (n)) == 0) #endif #ifndef obstack_chunk_alloc #define obstack_chunk_alloc xmalloc #endif #ifndef obstack_chunk_free #define obstack_chunk_free free #endif #define CLONE(o, t, n) ((t *) memcpy (xmalloc (sizeof(t) * (n)), (o), sizeof (t) * (n))) #define DEBUG(args) /* printf args */ #if HAVE_LINK #define MAYBE_FNM_CASEFOLD 0 #else #define MAYBE_FNM_CASEFOLD FNM_CASEFOLD #endif #if HAVE_LINK #define IS_ABSOLUTE(_dir_) ((_dir_)[0] == '/') #define SLASH_STRING "/" #define SLASH_CHAR '/' #define DOT_DOT_SLASH "../" #else /* NEEDSWORK: prefer forward-slashes as a user-configurable option. */ #define IS_ABSOLUTE(_dir_) ((_dir_)[1] == ':') #define SLASH_STRING "\\/" #define SLASH_CHAR '\\' #define DOT_DOT_SLASH "..\\" #endif #define STREQ(a, b) (strcmp (a, b) == 0) static inline char * bad_cast (char const *s) { return (char *) s; } #endif /* _iduglobal_h */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/fnprint.c�����������������������������������������������������������0000664�0000000�0000000�00000007222�12204226501�014474� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* fnprint.c -- print a list of file names Copyright (C) 1986, 1995-1996, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include <alloca.h> #include <unistd.h> #include <string.h> #include <pathmax.h> #include <error.h> #include "idfile.h" #include "xnls.h" #include "iduglobal.h" static char const *root_name (char const *path); static char const *suff_name (char const *path); static int common_prefix_suffix (struct file_link const *flink_1, struct file_link const *flink_2); extern void usage (void); static struct file_link *cw_dlink; /* Return the file name with the suffix stripped off. */ static char const * root_name (char const *file_name) { static char file_name_buffer[BUFSIZ]; char const *dot = strrchr (file_name, '.'); if (dot) stzncpy (file_name_buffer, file_name, dot - file_name); else strcpy (file_name_buffer, file_name); return file_name_buffer; } /* Return the suffix, including the dot, or an empty string if there is no suffix. */ static char const * suff_name (char const *file_name) { char const *dot = strrchr (file_name, '.'); return dot ? dot : ""; } /* common_prefix_suffix returns non-zero if two file names have a fully common directory prefix and a common suffix (i.e., they're eligible for coalescing with brace notation. */ static int common_prefix_suffix (struct file_link const *flink_1, struct file_link const *flink_2) { return (flink_1->fl_parent == flink_2->fl_parent && strequ (suff_name (flink_1->fl_name), suff_name (flink_2->fl_name))); } void print_filenames (struct file_link **flinkv, enum separator_style separator_style) { struct file_link const *arg; struct file_link const *dlink; int brace_is_open = 0; char *file_name = alloca (sizeof(char) * PATH_MAX); while (*flinkv) { arg = *flinkv++; if (*flinkv && (separator_style == ss_braces) && common_prefix_suffix (arg, *flinkv)) { if (brace_is_open) printf (",%s", root_name (arg->fl_name)); else { dlink = arg->fl_parent; if (dlink && dlink != cw_dlink) { maybe_relative_file_name (file_name, dlink, cw_dlink); fputs (file_name, stdout); putchar ('/'); } printf ("{%s", root_name (arg->fl_name)); } brace_is_open = 1; } else { if (brace_is_open) printf (",%s}%s", root_name (arg->fl_name), suff_name (arg->fl_name)); else { maybe_relative_file_name (file_name, arg, cw_dlink); fputs (file_name, stdout); } brace_is_open = 0; if (*flinkv) { if (separator_style == ss_newline) putchar ('\n'); else putchar (' '); } } } putchar ('\n'); } enum separator_style parse_separator_style (char const *arg) { MAYBE_RETURN_PREFIX_MATCH (arg, "braces", ss_braces); MAYBE_RETURN_PREFIX_MATCH (arg, "space", ss_space); MAYBE_RETURN_PREFIX_MATCH (arg, "newline", ss_newline); error (0, 0, _("invalid `--separator' style: `%s'"), arg); usage (); return ss_bogus; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/xnls.h��������������������������������������������������������������0000664�0000000�0000000�00000001750�12166360012�014010� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xnls.h -- NLS declarations Copyright (C) 1996, 2007, 2009-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _i18n_h_ #define _i18n_h_ /* Take care of NLS matters. */ #include "gettext.h" #if ENABLE_NLS # define _(Text) gettext (Text) # include <locale.h> #else # define _(Text) Text #endif #endif /* not _i18n_h_ */ ������������������������id-utils-4.6+git20120811/libidu/Makefile.am���������������������������������������������������������0000664�0000000�0000000�00000001400�11434330764�014707� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to create Makefile.in noinst_LIBRARIES = libidu.a libidu_a_SOURCES = dynvec.c dynvec.h \ idu-hash.c idu-hash.h \ idfile.c idfile.h \ idread.c \ idwrite.c \ fnprint.c \ scanners.c scanners.h \ walker.c \ tokflags.h \ iduglobal.h \ xnls.h AM_CPPFLAGS = -I$(top_srcdir)/lib \ -DDATADIR=\"$(datadir)\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DLANGUAGE_MAP_FILE=\"$(datadir)/id-lang.map\" AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) idudir = $(datadir) idu_DATA = id-lang.map EXTRA_DIST = $(idu_DATA) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/dynvec.c������������������������������������������������������������0000664�0000000�0000000�00000003067�12166360012�014312� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dynvec.c -- dynamically growable vectors Copyright (C) 1995, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <xalloc.h> #include "dynvec.h" struct dynvec * make_dynvec (int n) { struct dynvec *dv = xmalloc (sizeof *dv); dv->dv_vec = xnmalloc (n, sizeof *dv->dv_vec); dv->dv_capacity = n; dv->dv_fill = 0; return dv; } void dynvec_free (struct dynvec *dv) { free (dv->dv_vec); free (dv); } void dynvec_freeze (struct dynvec *dv) { if (dv->dv_fill == dv->dv_capacity) return; dv->dv_capacity = dv->dv_fill; dv->dv_vec = xnrealloc (dv->dv_vec, dv->dv_capacity, sizeof *dv->dv_vec); } void dynvec_append (struct dynvec *dv, void *element) { if (dv->dv_fill == dv->dv_capacity) { dv->dv_capacity *= 2; dv->dv_vec = xnrealloc (dv->dv_vec, dv->dv_capacity, sizeof *dv->dv_vec); } dv->dv_vec[dv->dv_fill++] = element; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idfile.h������������������������������������������������������������0000664�0000000�0000000�00000020552�12204226501�014256� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idfile.h -- decls for ID file header and constituent file names Copyright (C) 1986, 1995-1996, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _idfile_h_ #define _idfile_h_ 1 #include <config.h> #include <sys/types.h> #include <stdio.h> #include <string.h> #include "obstack.h" #include "idu-hash.h" #include "dynvec.h" #include "tokflags.h" /****************************************************************************/ /* The ID file header is the nexus of all ID file information. This is an in-core structure, only some of which is read/written to disk. */ struct idhead { unsigned char idh_magic[2]; #define IDH_MAGIC_0 ('I'|0x80) #define IDH_MAGIC_1 ('D'|0x80) unsigned char idh_version; #define IDH_VERSION 4 unsigned short idh_flags; #define IDH_COUNTS (1<<0) /* include occurrence counts for each token */ #define IDH_FOLLOW_SL (1<<1) /* follow symlinks to directories */ #define IDH_COMMENTS (1<<2) /* include tokens found in comments */ #define IDH_LOCALS (1<<3) /* include names of formal params & local vars */ #define IDH_DECL_DEFN_USE (1<<4) /* include decl/defn/use info */ #define IDH_L_R_VALUE (1<<5) /* include lvalue/rvalue info */ #define IDH_CALL_ER_EE (1<<6) /* include caller/callee relationship info */ unsigned long idh_file_links; /* total # of file links */ unsigned long idh_files; /* total # of constituent source files */ unsigned long idh_tokens; /* total # of constituent tokens */ /* idh_*_size: max buffer-sizes for ID file reading programs */ unsigned long idh_buf_size; /* # of bytes in longest entry */ unsigned long idh_vec_size; /* # of hits in longest entry */ /* idh_*_offset: ID file offsets for start of various sections */ long idh_tokens_offset; /* constituent tokens section */ long idh_flinks_offset; /* constituent file & directory names section */ long idh_end_offset; /* end of tokens section */ unsigned short idh_max_link; /* longest file name component */ unsigned short idh_max_path; /* largest # of file name components */ /* The following are run-time variables and are not stored on disk */ char const *idh_file_name; struct hash_table idh_member_file_table; struct hash_table idh_file_link_table; struct obstack idh_member_file_obstack; struct obstack idh_file_link_obstack; #if HAVE_LINK struct hash_table idh_dev_ino_table; /* for detecting file name aliases */ struct obstack idh_dev_ino_obstack; #endif FILE *idh_FILE; }; /* idhead input/output definitions */ #define IO_TYPE_INT 0 /* integer */ #define IO_TYPE_STR 1 /* NUL terminated string */ #define IO_TYPE_FIX 2 /* fix-sized */ /****************************************************************************/ /* A file_link represents a single component (file or directory) in a file name. It has a name, a parent file_link and some flags. */ struct file_link { union { struct file_link *u_parent; #define fl_parent fl_u.u_parent unsigned long u_index; #define fl_index fl_u.u_index #define FL_PARENT_INDEX_BYTES 3 #define IS_ROOT_FILE_LINK(flink) ((flink)->fl_parent == (flink)) } fl_u; unsigned char fl_flags; #define FL_CMD_LINE_ARG (1<<0) #define FL_USED (1<<1) #define FL_MEMBER (1<<2) /* has a corresponding member_file entry */ #define FL_SCAN_ME (1<<3) #define FL_SYM_LINK (1<<4) #define FL_TYPE_MASK (FL_TYPE_DIR|FL_TYPE_FILE) # define FL_TYPE_DIR (1<<5) # define FL_IS_DIR(_f_) (((_f_) & FL_TYPE_MASK) == FL_TYPE_DIR) # define FL_TYPE_FILE (1<<6) # define FL_IS_FILE(_f_) (((_f_) & FL_TYPE_MASK) == FL_TYPE_FILE) #define FL_PRUNE (1<<7) char fl_name[1]; }; /* A member_file represents a source file that is treated by mkid. */ struct member_file { struct file_link *mf_link; struct lang_args const *mf_lang_args; long mf_index; /* order in ID file */ }; #if HAVE_LINK /* On systems that support multiple names for a single file (via hard and/or soft links), dev_ino records information needed to detect such aliasing. */ struct dev_ino { dev_t di_dev; ino_t di_ino; struct file_link *di_link; }; extern struct hash_table dev_ino_table; #endif /* HAVE_LINK */ /******************************************************************************/ /* token flags (struct token is defined in scanners.h) */ #define token_string(buf) (buf) extern unsigned int token_flags (char const *buf) _GL_ATTRIBUTE_PURE; extern unsigned short token_count (char const *buf) _GL_ATTRIBUTE_PURE; extern unsigned char const *token_hits_addr (char const *buf) _GL_ATTRIBUTE_PURE; #define MAYBE_RETURN_PREFIX_MATCH(arg, str, val) do { \ char const *_s_ = (str); \ if (strstr (_s_, (arg)) == _s_) \ return (val); \ } while (0) enum separator_style { ss_bogus, ss_contextual, ss_braces, ss_space, ss_newline }; #ifndef DEFAULT_SEPARATOR_STYLE #define DEFAULT_SEPARATOR_STYLE ss_braces #endif typedef int (*io_func_t) (FILE *, void *, unsigned int, int); extern struct file_link **read_id_file (char const *id_file_name, struct idhead *idhp); extern struct file_link **maybe_read_id_file (char const *id_file_name, struct idhead *idhp); extern int read_idhead (struct idhead *idhp); extern int write_idhead (struct idhead *idhp); extern int sizeof_idhead (void); extern struct file_link *init_walker (struct idhead *idhp); extern void init_idh_obstacks (struct idhead *idhp); extern void init_idh_tables (struct idhead *idhp); extern int io_write (FILE *output_FILE, void *addr, unsigned int size, int io_type); extern int io_read (FILE *input_FILE, void *addr, unsigned int size, int io_type); extern int io_idhead (FILE *fp, io_func_t iof, struct idhead *idhp); extern struct file_link *get_current_dir_link (void); extern struct file_link **deserialize_file_links (struct idhead *idhp); extern void serialize_file_links (struct idhead *idhp); extern void mark_member_file_links (struct idhead *idhp); extern int member_file_qsort_compare (void const *x, void const *y) _GL_ATTRIBUTE_PURE; extern struct file_link *parse_file_name (char *file_name, struct file_link *relative_dir_link); extern void print_filenames (struct file_link **flinkv, enum separator_style separator_style); extern enum separator_style parse_separator_style (char const *arg); extern void walk_flink (struct file_link *flink, struct dynvec *sub_dirs_vec); extern int chdir_to_link (struct file_link* dir_link); extern void prune_file_names (char *str, struct file_link *from_link); extern void include_languages (char *lang_names); extern void exclude_languages (char *lang_names); extern char *absolute_file_name (char *buffer, struct file_link const *flink); extern char *maybe_relative_file_name (char *buffer, struct file_link const *to_link, struct file_link const *from_link); extern char const *locate_id_file_name (char const *arg); extern int tree8_count_levels (unsigned int cardinality) _GL_ATTRIBUTE_CONST; extern int gets_past_00 (char *tok, FILE *input_FILE); extern int skip_past_00 (FILE *input_FILE); extern int links_depth (struct file_link const *flink) _GL_ATTRIBUTE_PURE; #if HAVE_LINK extern struct member_file *find_member_file (struct file_link const *flink); #endif extern struct idhead idh; extern int walker_verbose_flag; extern off_t largest_member_file; #define MAX_LARGEST_MEMBER_FILE (2*1024*1024-1) #define DEFAULT_ID_FILE_NAME "ID" /* Like stpncpy, but do ensure that the result is NUL-terminated, and do not NUL-pad out to LEN. I.e., when strnlen (src, len) == len, this function writes a NUL byte into dest[len]. Thus, the length of the destination buffer must be at least LEN + 1. The DEST and SRC buffers must not overlap. */ static inline char * stzncpy (char *restrict dest, char const *restrict src, size_t len) { char const *src_end = src + len; while (src < src_end && *src) *dest++ = *src++; *dest = 0; return dest; } #endif /* not _idfile_h_ */ ������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idu-hash.c����������������������������������������������������������0000664�0000000�0000000�00000016665�12170556077�014551� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* hash.c -- hash table maintenance Copyright (C) 1995, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include <xalloc.h> #include <error.h> #include "idu-hash.h" #include "xnls.h" static void hash_rehash (struct hash_table* ht); static unsigned long round_up_2 (unsigned long rough); /* Implement double hashing with open addressing. The table size is always a power of two. The secondary (`increment') hash function is forced to return an odd-value, in order to be relatively prime to the table size. This guarantees that the increment can potentially hit every slot in the table during collision resolution. */ void *hash_deleted_item = &hash_deleted_item; /* Force the table size to be a power of two, possibly rounding up the given size. */ void hash_init (struct hash_table* ht, unsigned long size, hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp) { ht->ht_size = round_up_2 (size); ht->ht_empty_slots = ht->ht_size; ht->ht_vec = xcalloc (ht->ht_size, sizeof(struct token *)); if (ht->ht_vec == 0) error (EXIT_FAILURE, 0, _("can't allocate %ld bytes for hash table: memory exhausted"), ht->ht_size * sizeof(struct token *)); ht->ht_capacity = ht->ht_size * 15 / 16; /* 93.75% loading factor */ ht->ht_fill = 0; ht->ht_collisions = 0; ht->ht_lookups = 0; ht->ht_rehashes = 0; ht->ht_hash_1 = hash_1; ht->ht_hash_2 = hash_2; ht->ht_compare = hash_cmp; } static void * hash_insert (struct hash_table* ht, void *item) { void **slot = hash_find_slot (ht, item); void *old_item = slot ? *slot : 0; hash_insert_at (ht, item, slot); return ((HASH_VACANT (old_item)) ? 0 : old_item); } /* Load an array of items into `ht'. */ void hash_load (struct hash_table* ht, void *item_table, unsigned long cardinality, unsigned long size) { char *items = (char *) item_table; while (cardinality--) { hash_insert (ht, items); items += size; } } /* Returns the address of the table slot matching `key'. If `key' is not found, return the address of an empty slot suitable for inserting `key'. The caller is responsible for incrementing ht_fill on insertion. */ void ** hash_find_slot (struct hash_table* ht, void const *key) { void **slot; void **deleted_slot = 0; unsigned int hash_2 = 0; unsigned int hash_1 = (*ht->ht_hash_1) (key); ht->ht_lookups++; for (;;) { hash_1 %= ht->ht_size; slot = &ht->ht_vec[hash_1]; if (*slot == 0) return (deleted_slot ? deleted_slot : slot); if (*slot == hash_deleted_item) { if (deleted_slot == 0) deleted_slot = slot; } else { if (key == *slot) return slot; if ((*ht->ht_compare) (key, *slot) == 0) return slot; ht->ht_collisions++; } if (!hash_2) hash_2 = (*ht->ht_hash_2) (key) | 1; hash_1 += hash_2; } } void * hash_find_item (struct hash_table* ht, void const *key) { void **slot = hash_find_slot (ht, key); return ((HASH_VACANT (*slot)) ? 0 : *slot); } void * hash_insert_at (struct hash_table* ht, void *item, void const *slot) { void *old_item = *(void **) slot; if (HASH_VACANT (old_item)) { ht->ht_fill++; if (old_item == 0) ht->ht_empty_slots--; old_item = item; } *(void const **) slot = item; if (ht->ht_empty_slots < ht->ht_size - ht->ht_capacity) { hash_rehash (ht); return (void *) hash_find_slot (ht, item); } else return (void *) slot; } void * hash_delete (struct hash_table* ht, void const *item) { void **slot = hash_find_slot (ht, item); return hash_delete_at (ht, slot); } void * hash_delete_at (struct hash_table* ht, void const *slot) { void *item = *(void **) slot; if (!HASH_VACANT (item)) { *(void const **) slot = hash_deleted_item; ht->ht_fill--; return item; } else return 0; } void hash_free_items (struct hash_table* ht) { void **vec = ht->ht_vec; void **end = &vec[ht->ht_size]; for (; vec < end; vec++) { void *item = *vec; if (!HASH_VACANT (item)) free (item); *vec = 0; } ht->ht_fill = 0; ht->ht_empty_slots = ht->ht_size; } void hash_delete_items (struct hash_table* ht) { void **vec = ht->ht_vec; void **end = &vec[ht->ht_size]; for (; vec < end; vec++) *vec = 0; ht->ht_fill = 0; ht->ht_collisions = 0; ht->ht_lookups = 0; ht->ht_rehashes = 0; ht->ht_empty_slots = ht->ht_size; } void hash_free (struct hash_table* ht, int free_items) { if (free_items) hash_free_items (ht); else { ht->ht_fill = 0; ht->ht_empty_slots = ht->ht_size; } free (ht->ht_vec); ht->ht_vec = 0; ht->ht_capacity = 0; } void hash_map (struct hash_table *ht, hash_map_func_t map) { void **slot; void **end = &ht->ht_vec[ht->ht_size]; for (slot = ht->ht_vec; slot < end; slot++) { if (!HASH_VACANT (*slot)) (*map) (*slot); } } /* Double the size of the hash table in the event of overflow... */ static void hash_rehash (struct hash_table* ht) { unsigned long old_ht_size = ht->ht_size; void **old_vec = ht->ht_vec; void **ovp; if (ht->ht_fill >= ht->ht_capacity) { ht->ht_size *= 2; ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4); } ht->ht_rehashes++; ht->ht_vec = xcalloc (ht->ht_size, sizeof(struct token *)); for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++) { if (! HASH_VACANT (*ovp)) { void **slot = hash_find_slot (ht, *ovp); *slot = *ovp; } } ht->ht_empty_slots = ht->ht_size - ht->ht_fill; free (old_vec); } void hash_print_stats (struct hash_table const *ht, FILE *out_FILE) { fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size, 100.0 * (double) ht->ht_fill / (double) ht->ht_size); fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes); fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups, (ht->ht_lookups ? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups) : 0)); } /* Dump all items into a NULL-terminated vector. Use the user-supplied vector, or malloc one. */ void** hash_dump (struct hash_table const *ht, void **vector_0, qsort_cmp_t compare) { void **vector; void **slot; void **end = &ht->ht_vec[ht->ht_size]; if (vector_0 == 0) vector_0 = xmalloc (sizeof (void *) * (ht->ht_fill + 1)); vector = vector_0; for (slot = ht->ht_vec; slot < end; slot++) if (!HASH_VACANT (*slot)) *vector++ = *slot; *vector = 0; if (compare) qsort (vector_0, ht->ht_fill, sizeof (void *), compare); return vector_0; } /* Round a given number up to the nearest power of 2. */ static unsigned long _GL_ATTRIBUTE_CONST round_up_2 (unsigned long rough) { int round; round = 1; while (rough) { round <<= 1; rough >>= 1; } return round; } ���������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idfile.c������������������������������������������������������������0000664�0000000�0000000�00000010124�12166360012�014246� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idfile.c -- read & write mkid database file header Copyright (C) 1986, 1995-1996, 1999-2000, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <errno.h> #include <stdlib.h> #include <string.h> #include <obstack.h> #include <error.h> #include <sys/stat.h> #include "idfile.h" #include "xalloc.h" #include "xnls.h" static int io_size (FILE *, void *, unsigned int size, int); /****************************************************************************/ /* Discover the name of the ID file. If ARG is NULL, consult $IDPATH. If $IDPATH is undefined, default to "ID". If the candidate file name is relative, search successive ancestor directories until the file is found or we reach the root. If we find it, return the relative file name, otherwise return NULL. */ char const * locate_id_file_name (char const *arg) { static char file_name_buffer[BUFSIZ]; char *buf = file_name_buffer; char *id_path = 0; struct stat rootb; struct stat statb; if (arg == 0) { id_path = getenv ("IDPATH"); if (id_path) { id_path = xstrdup (id_path); arg = strsep (&id_path, ":"); /* FIXME: handle multiple ID file names */ } } if (arg == 0) arg = DEFAULT_ID_FILE_NAME; /* if we got absolute name, just use it. */ if (arg[0] == '/') return arg; /* if the name we were give exists, don't bother searching */ if (stat (arg, &statb) == 0) return arg; /* search up the tree until we find a directory where this * relative file name is visible. * (or we run out of tree to search by hitting root). */ if (stat ("/", &rootb) != 0) return NULL; do { strcpy (buf, "../"); buf += 3; strcpy (buf, arg); if (stat (file_name_buffer, &statb) == 0) return file_name_buffer; *buf = '\0'; if (stat (file_name_buffer, &statb) != 0) return NULL; } while (statb.st_ino != rootb.st_ino || statb.st_dev != rootb.st_dev); return NULL; } /****************************************************************************/ int sizeof_idhead (void) { return io_idhead (0, io_size, 0); } static int io_size (FILE *ignore_FILE, void *ignore_addr, unsigned int size, int io_type) { if (io_type == IO_TYPE_STR) error (0, 0, _("can't determine the io_size of a string!")); return size; } /* The sizes of the fields must be hard-coded. They aren't necessarily the sizes of the struct members, because some architectures don't have any way to declare 4-byte integers (e.g., Cray) */ int io_idhead (FILE *fp, io_func_t iof, struct idhead *idhp) { unsigned int size = 0; unsigned char pad = 0; if (fp) fseek (fp, 0L, 0); size += iof (fp, idhp->idh_magic, 2, IO_TYPE_FIX); size += iof (fp, &pad, 1, IO_TYPE_FIX); size += iof (fp, &idhp->idh_version, 1, IO_TYPE_FIX); size += iof (fp, &idhp->idh_flags, 2, IO_TYPE_INT); size += iof (fp, &idhp->idh_file_links, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_files, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_tokens, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_buf_size, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_vec_size, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_tokens_offset, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_flinks_offset, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_end_offset, 4, IO_TYPE_INT); size += iof (fp, &idhp->idh_max_link, 2, IO_TYPE_INT); size += iof (fp, &idhp->idh_max_path, 2, IO_TYPE_INT); return size; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idwrite.c�����������������������������������������������������������0000664�0000000�0000000�00000012304�12166360012�014463� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idwrite.c -- functions to write ID database files Copyright (C) 1995-1996, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <obstack.h> #include <xalloc.h> #include <error.h> #include "idfile.h" #include "ignore-value.h" #include "idu-hash.h" #include "xnls.h" static int file_link_qsort_compare (void const *x, void const *y); /****************************************************************************/ /* Serialize and write a file_link hierarchy. */ void serialize_file_links (struct idhead *idhp) { struct file_link **flinks_0; struct file_link **flinks; struct file_link **end; struct file_link **parents_0; struct file_link **parents; unsigned long parent_index = 0; int max_link = 0; flinks_0 = (struct file_link **) hash_dump (&idhp->idh_file_link_table, 0, file_link_qsort_compare); end = &flinks_0[idhp->idh_file_link_table.ht_fill]; parents = parents_0 = xmalloc (sizeof(struct file_link *) * idhp->idh_file_link_table.ht_fill); for (flinks = flinks_0; flinks < end; flinks++) { struct file_link *flink = *flinks; int name_length; if (!(flink->fl_flags & FL_USED)) break; name_length = strlen (flink->fl_name); if (name_length > max_link) max_link = name_length; io_write (idhp->idh_FILE, flink->fl_name, 0, IO_TYPE_STR); io_write (idhp->idh_FILE, &flink->fl_flags, sizeof (flink->fl_flags), IO_TYPE_INT); io_write (idhp->idh_FILE, (IS_ROOT_FILE_LINK (flink) ? &parent_index : &flink->fl_parent->fl_index), FL_PARENT_INDEX_BYTES, IO_TYPE_INT); *parents++ = flink->fl_parent; /* save parent link before clobbering */ flink->fl_index = parent_index++; } /* restore parent links */ for ((flinks = flinks_0), (parents = parents_0); flinks < end; flinks++) { struct file_link *flink = *flinks; if (!(flink->fl_flags & FL_USED)) break; flink->fl_parent = *parents++; } free (parents_0); free (flinks_0); idhp->idh_max_link = max_link + 1; idhp->idh_file_links = parent_index; idhp->idh_files = idhp->idh_member_file_table.ht_fill; } /* Collation sequence: - Used before unused. - Among used: breadth-first (dirs before files, parent dirs before children) - Among files: collate by mf_index. */ static int file_link_qsort_compare (void const *x, void const *y) { struct file_link const *flx = *(struct file_link const *const *) x; struct file_link const *fly = *(struct file_link const *const *) y; unsigned int x_flags = flx->fl_flags; unsigned int y_flags = fly->fl_flags; int result; result = (y_flags & FL_USED) - (x_flags & FL_USED); if (result) return result; if (!(x_flags & FL_USED)) /* If neither link is used, we don't care... */ return 0; result = (y_flags & FL_TYPE_DIR) - (x_flags & FL_TYPE_DIR); if (result) return result; result = (y_flags & FL_TYPE_MASK) - (x_flags & FL_TYPE_MASK); if (result) return result; if (FL_IS_FILE (x_flags)) { struct member_file *x_member = find_member_file (flx); struct member_file *y_member = find_member_file (fly); return x_member->mf_index - y_member->mf_index; } else { int x_depth = links_depth (flx); int y_depth = links_depth (fly); return (x_depth - y_depth); } } /****************************************************************************/ int write_idhead (struct idhead *idhp) { return io_idhead (idhp->idh_FILE, io_write, idhp); } int io_write (FILE *output_FILE, void *addr, unsigned int size, int io_type) { if (io_type == IO_TYPE_INT || size == 1) { switch (size) { case 4: putc (*(unsigned long *)addr, output_FILE); putc (*(unsigned long *)addr >> 010, output_FILE); putc (*(unsigned long *)addr >> 020, output_FILE); putc (*(unsigned long *)addr >> 030, output_FILE); break; case 3: putc (*(unsigned long *)addr, output_FILE); putc (*(unsigned long *)addr >> 010, output_FILE); putc (*(unsigned long *)addr >> 020, output_FILE); break; case 2: putc (*(unsigned short *)addr, output_FILE); putc (*(unsigned short *)addr >> 010, output_FILE); break; case 1: putc (*(unsigned char *)addr, output_FILE); break; default: error (EXIT_FAILURE, 0, _("unsupported size in io_write (): %d"), size); } } else if (io_type == IO_TYPE_STR) { fputs (addr, output_FILE); putc ('\0', output_FILE); } else if (io_type == IO_TYPE_FIX) ignore_value (fwrite (addr, size, 1, output_FILE)); else error (0, 0, _("unknown I/O type: %d"), io_type); return size; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/Makefile.in���������������������������������������������������������0000664�0000000�0000000�00000152447�12166360012�014732� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libidu DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ libidu_a_AR = $(AR) $(ARFLAGS) libidu_a_LIBADD = am_libidu_a_OBJECTS = dynvec.$(OBJEXT) idu-hash.$(OBJEXT) \ idfile.$(OBJEXT) idread.$(OBJEXT) idwrite.$(OBJEXT) \ fnprint.$(OBJEXT) scanners.$(OBJEXT) walker.$(OBJEXT) libidu_a_OBJECTS = $(am_libidu_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libidu_a_SOURCES) DIST_SOURCES = $(libidu_a_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(idudir)" DATA = $(idu_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libidu.a libidu_a_SOURCES = dynvec.c dynvec.h \ idu-hash.c idu-hash.h \ idfile.c idfile.h \ idread.c \ idwrite.c \ fnprint.c \ scanners.c scanners.h \ walker.c \ tokflags.h \ iduglobal.h \ xnls.h AM_CPPFLAGS = -I$(top_srcdir)/lib \ -DDATADIR=\"$(datadir)\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DLANGUAGE_MAP_FILE=\"$(datadir)/id-lang.map\" AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) idudir = $(datadir) idu_DATA = id-lang.map EXTRA_DIST = $(idu_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libidu/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libidu/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libidu.a: $(libidu_a_OBJECTS) $(libidu_a_DEPENDENCIES) $(EXTRA_libidu_a_DEPENDENCIES) $(AM_V_at)-rm -f libidu.a $(AM_V_AR)$(libidu_a_AR) libidu.a $(libidu_a_OBJECTS) $(libidu_a_LIBADD) $(AM_V_at)$(RANLIB) libidu.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynvec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idu-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idwrite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanners.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/walker.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` install-iduDATA: $(idu_DATA) @$(NORMAL_INSTALL) test -z "$(idudir)" || $(MKDIR_P) "$(DESTDIR)$(idudir)" @list='$(idu_DATA)'; test -n "$(idudir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(idudir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(idudir)" || exit $$?; \ done uninstall-iduDATA: @$(NORMAL_UNINSTALL) @list='$(idu_DATA)'; test -n "$(idudir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(idudir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(idudir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iduDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iduDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES cscopelist ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iduDATA install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-iduDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/scanners.c����������������������������������������������������������0000664�0000000�0000000�00000131572�12177536626�014663� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* scanners.c -- file & directory name manipulations Copyright (C) 1986, 1995-1996, 1999-2000, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <ctype.h> #include <fcntl.h> #include <getopt.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <xalloc.h> #include <error.h> #include <sys/stat.h> #include "xnls.h" #include "scanners.h" #include "tokflags.h" #include "iduglobal.h" static struct obstack lang_args_obstack; struct lang_args *lang_args_default = 0; struct lang_args *lang_args_list = 0; struct obstack tokens_obstack; size_t log_8_member_files = 0; extern void usage (void) __attribute__((__noreturn__)); extern char *program_name; /****************************************************************************/ static struct lang_args **parse_language_map_file (char const *file_name, struct lang_args **next_ptr); static char *read_language_map_file (char const *file_name); static void tokenize_args_string (char *args_string, int *argcp, char ***argvp); static struct token *get_token_c (FILE *in_FILE, void const *args, int *flags); static void *parse_args_c (char **argv, int argc); static void help_me_c (void); static void help_me_cpp (void); static void help_me_java (void); static struct token *get_token_asm (FILE *in_FILE, void const *args, int *flags); static void *parse_args_asm (char **argv, int argc); static void help_me_asm (void); static struct token *get_token_text (FILE *in_FILE, void const *args, int *flags); static void *parse_args_text (char **argv, int argc); static void help_me_text (void); static struct token *get_token_perl (FILE *in_FILE, void const *args, int *flags); static void *parse_args_perl (char **argv, int argc); static void help_me_perl (void); static struct token *get_token_lisp (FILE *in_FILE, void const *args, int *flags); static void *parse_args_lisp (char **argv, int argc); static void help_me_lisp (void); static struct language languages_0[] = { { "C", parse_args_c, get_token_c, help_me_c }, { "C++", parse_args_c, get_token_c, help_me_cpp }, { "Java", parse_args_c, get_token_c, help_me_java }, { "asm", parse_args_asm, get_token_asm, help_me_asm }, { "text", parse_args_text, get_token_text, help_me_text }, { "perl", parse_args_perl, get_token_perl, help_me_perl }, { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp } }; static struct language const *languages_N = &languages_0[cardinalityof (languages_0)]; void language_help_me (void) { const struct language *lang; for (lang = languages_0; lang < languages_N; lang++) { putchar ('\n'); (*lang->lg_help_me) (); } } void language_save_arg (char *arg) { char *lang_name = strsep (&arg, ":"); struct language *lang = get_language (lang_name); if (lang == NULL) { error (0, 0, _("unrecognized language: `%s'"), lang_name); usage (); } if (arg == NULL) { error (0, 0, _("missing language OPT for `%s'"), lang_name); usage (); } if (lang->lg_argc == 0) lang->lg_argv[lang->lg_argc++] = program_name; lang->lg_argv[lang->lg_argc++] = arg; } void language_getopt (void) { const struct language *lang; for (lang = languages_0; lang < languages_N; lang++) if (lang->lg_argc) lang->lg_parse_args ((char**)(lang->lg_argv), lang->lg_argc); } struct language * get_language (char const *lang_name) { const struct language *lang; for (lang = languages_0; lang < languages_N; lang++) if (strequ (lang_name, lang->lg_name)) { DEBUG (("lang=%s", lang_name)); return (struct language *) lang; } DEBUG (("!lang=%s", lang_name)); return 0; } /****************************************************************************/ static int lang_args_index = 0; void set_default_language (char const *lang_name) { struct lang_args *new_args; const struct language *lang; obstack_init (&lang_args_obstack); new_args = obstack_alloc (&lang_args_obstack, sizeof *new_args); new_args->la_pattern = obstack_copy0 (&lang_args_obstack, lang_name, strlen(lang_name)+1); new_args->la_args_string = 0; new_args->la_next = 0; lang = new_args->la_language = get_language (lang_name); new_args->la_args_digested = (lang ? lang->lg_parse_args (&new_args->la_args_string, 0) : 0); lang_args_default = new_args; DEBUG ((", <default>\n")); } void parse_language_map (char const *file_name) { if (obstack_init (&lang_args_obstack) == 0) error (EXIT_FAILURE, 0, _("can't allocate language args obstack: memory exhausted")); if (file_name == 0) file_name = LANGUAGE_MAP_FILE; parse_language_map_file (file_name, &lang_args_list); } static struct lang_args ** parse_language_map_file (char const *file_name, struct lang_args **next_ptr) { static char white_space[] = " \t\r\n\v\f"; static char horizontal_space[] = " \t"; static char vertical_space[] = "\r\n\v\f"; char *lang_map_buffer; char *lmp; lmp = lang_map_buffer = read_language_map_file (file_name); for (;;) { struct lang_args *new_args; struct language const *lang; int pattern_size; char *lang_name; int space; /* Skip leading white space and full-line comments */ while (*lmp) { lmp += strspn (lmp, white_space); if (*lmp != '#') break; lmp += strcspn (lmp, vertical_space); } if (*lmp == '\0') break; pattern_size = strcspn (lmp, white_space); if (pattern_size == 3 && strnequ (lmp, "***", 3)) { lmp += pattern_size; lmp += strspn (lmp, horizontal_space); if (isspace (*lmp)) next_ptr = parse_language_map_file (LANGUAGE_MAP_FILE, next_ptr); else { char *end = lmp + strcspn (lmp, white_space); *end = '\0'; next_ptr = parse_language_map_file (lmp, next_ptr); lmp = end + 1; } continue; } new_args = obstack_alloc (&lang_args_obstack, sizeof *new_args); if (new_args == 0) error (EXIT_FAILURE, 0, _("can't allocate language args: memory exhausted")); new_args->la_pattern = obstack_copy0 (&lang_args_obstack, lmp, pattern_size); new_args->la_args_string = 0; new_args->la_next = 0; lmp += pattern_size; lmp += strspn (lmp, horizontal_space); if (isspace (*lmp)) { error (0, 0, _("language name expected following `%s' in file `%s'"), new_args->la_pattern, file_name); obstack_free (&lang_args_obstack, new_args); continue; } lang_name = lmp; lmp += strcspn (lmp, white_space); space = *lmp; *lmp++ = '\0'; lmp += strspn (lmp, horizontal_space); lang = new_args->la_language = get_language (lang_name); if (*lmp == '#') lmp += strcspn (lmp, vertical_space); else if (!isspace (*lmp) && (space == ' ' || space == '\t')) { int args_size = strcspn (lmp, vertical_space); new_args->la_args_string = obstack_copy0 (&lang_args_obstack, lmp, args_size); lmp += args_size; } new_args->la_args_digested = (lang ? lang->lg_parse_args (&new_args->la_args_string, 0) : 0); if (pattern_size == 2 && strnequ (new_args->la_pattern, "**", 2)) { if (lang_args_default) { obstack_free (&lang_args_obstack, new_args); continue; } lang_args_default = new_args; DEBUG ((", <default>")); } else { new_args->la_index = lang_args_index++; *next_ptr = new_args; next_ptr = &new_args->la_next; } DEBUG ((", pat=%s\n", new_args->la_pattern)); } free (lang_map_buffer); return next_ptr; } static char * read_language_map_file (char const *file_name) { int map_fd; char *lang_map_buffer; struct stat st; int bytes; map_fd = open (file_name, O_RDONLY); if (map_fd < 0) error (EXIT_FAILURE, errno, _("can't open language map file `%s'"), file_name); if (fstat (map_fd, &st) < 0) error (EXIT_FAILURE, errno, _("can't get size of map file `%s'"), file_name); lang_map_buffer = xmalloc (sizeof(char) * (st.st_size + 2)); if (lang_map_buffer == 0) error (EXIT_FAILURE, 0, _("can't allocate language args: memory exhausted")); lang_map_buffer[st.st_size] = '\n'; lang_map_buffer[st.st_size+1] = '\0'; bytes = read (map_fd, lang_map_buffer, st.st_size); if (bytes < 0) error (EXIT_FAILURE, errno, _("can't read language map file `%s'"), file_name); /* FIXME: handle interrupted & partial reads */ if (bytes != st.st_size) error (EXIT_FAILURE, errno, _("can't read entire language map file `%s'"), file_name); close (map_fd); return lang_map_buffer; } /****************************************************************************/ static void tokenize_args_string (char *args_string, int *argcp, char ***argvp) { static char horizontal_space[] = " \t"; char **argv_0 = xmalloc (sizeof(char *) * strlen (args_string) / 2); char **argv = argv_0; char *arg; *argv++ = program_name; arg = strsep (&args_string, horizontal_space); while (arg) { *argv++ = arg; arg = strsep (&args_string, horizontal_space); } *argcp = argv - argv_0; *argvp = xnrealloc (argv_0, *argcp, sizeof **argvp); } static void set_ushort_ctype (unsigned short *ctype, char const *chars, int type) { unsigned short *rct = &ctype[1]; unsigned char const *uc = (unsigned char const *) chars; while (*uc) rct[*uc++] |= type; } static void clear_ushort_ctype (unsigned short *ctype, char const *chars, int type) { unsigned short *rct = &ctype[1]; unsigned char const *uc = (unsigned char const *) chars; while (*uc) rct[*uc++] &= ~type; } static void set_uchar_ctype (unsigned char *ctype, char const *chars, int type) { unsigned char *rct; unsigned char const *uc; rct = &ctype[1]; uc = (unsigned char const *) chars; while (*uc) rct[*uc++] |= type; } static void clear_uchar_ctype (unsigned char *ctype, char const *chars, int type) { unsigned char *rct; unsigned char const *uc; rct = &ctype[1]; uc = (unsigned char const *) chars; while (*uc) rct[*uc++] &= ~type; } /*************** C, C++ & Java ***********************************************/ #define I1 0x0001 /* 1st char of an identifier [a-zA-Z_] */ #define DG 0x0002 /* decimal digit [0-9] */ #define NM 0x0004 /* extra chars in a hex or long number [a-fA-FxXlLuU.] */ #define C1 0x0008 /* C comment introduction char: / */ #define C2 0x0010 /* C comment termination char: * */ #define Q1 0x0020 /* single quote: ' */ #define Q2 0x0040 /* double quote: " */ #define ES 0x0080 /* escape char: \ */ #define NL 0x0100 /* newline: \n */ #define EF 0x0200 /* EOF */ #define SK 0x0400 /* Make these chars valid for names within strings */ #define VH 0x0800 /* VHIL comment introduction char: # */ /* character class membership macros: */ #define ISDIGIT(c) ((rct)[c] & (DG)) /* digit */ #define ISNUMBER(c) ((rct)[c] & (DG|NM)) /* legal in a number */ #define ISEOF(c) ((rct)[c] & (EF)) /* EOF */ #define ISID1ST(c) ((rct)[c] & (I1)) /* 1st char of an identifier */ #define ISIDREST(c) ((rct)[c] & (I1|DG)) /* rest of an identifier */ #define ISSTRKEEP(c) ((rct)[c] & (I1|DG|SK)) /* keep contents of string */ /* The `BORING' classes should be skipped over until something interesting comes along... */ #define ISBORING(c) (!((rct)[c] & (EF|NL|I1|DG|Q1|Q2|C1|VH))) /* fluff */ #define ISCBORING(c) (!((rct)[c] & (EF|C2))) /* comment fluff */ #define ISCCBORING(c) (!((rct)[c] & (EF|NL))) /* C++ // comment fluff */ #define ISQ1BORING(c) (!((rct)[c] & (EF|NL|Q1|ES))) /* char const fluff */ #define ISQ2BORING(c) (!((rct)[c] & (EF|NL|Q2|ES))) /* quoted str fluff */ static unsigned short ctype_c[257] = { EF, /* 0 1 2 3 4 5 6 7 */ /* ----- ----- ----- ----- ----- ----- ----- ----- */ /*000*/ 0, 0, 0, 0, 0, 0, 0, 0, /*010*/ 0, 0, NL, 0, 0, 0, 0, 0, /*020*/ 0, 0, 0, 0, 0, 0, 0, 0, /*030*/ 0, 0, 0, 0, 0, 0, 0, 0, /*040*/ 0, 0, Q2, 0, 0, 0, 0, Q1, /*050*/ 0, 0, C2, 0, 0, 0, NM, C1, /*060*/ DG, DG, DG, DG, DG, DG, DG, DG, /*070*/ DG, DG, 0, 0, 0, 0, 0, 0, /*100*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*110*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*120*/ I1, I1, I1, I1, I1, I1|NM, I1, I1, /*130*/ I1|NM, I1, I1, 0, ES, 0, 0, I1, /*140*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*150*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*160*/ I1, I1, I1, I1, I1, I1|NM, I1, I1, /*170*/ I1|NM, I1, I1, 0, 0, 0, 0, 0, /* FIXME: latin-1 */ }; struct args_c { int strip_underscore; unsigned short *ctype; }; static struct args_c args_c = { 0, ctype_c }; static struct option const long_options_c[] = { { "keep", required_argument, 0, 'k' }, { "ignore", required_argument, 0, 'i' }, { "strip-underscore", no_argument, 0, 'u' }, {NULL, 0, NULL, 0} }; static void help_me_c (void) { printf (_("\ C language:\n\ -k,--keep=CHARS Allow CHARS in single-token strings, keep the result\n\ -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result\n\ -u,--strip-underscore Strip a leading underscore from single-token strings\n\ ")); } static void help_me_cpp (void) { printf (_("\ C++ language:\n\ -k,--keep=CHARS Allow CHARS in single-token strings, keep the result\n\ -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result\n\ -u,--strip-underscore Strip a leading underscore from single-token strings\n\ ")); } static void help_me_java (void) { printf (_("\ Java language:\n\ -k,--keep=CHARS Allow CHARS in single-token strings, keep the result\n\ -i,--ignore=CHARS Allow CHARS in single-token strings, toss the result\n\ -u,--strip-underscore Strip a leading underscore from single-token strings\n\ ")); } static void * parse_args_c (char **argv, int argc) { char *tmp_string = 0; struct args_c *args; if (argv == 0 || *argv == 0) return &args_c; if (argc) args = &args_c; else { tmp_string = xstrdup (*argv); tokenize_args_string (tmp_string, &argc, &argv); args = xmalloc (sizeof *args); args->strip_underscore = 0; args->ctype = ctype_c; } optind = 0; for (;;) { int optc = getopt_long (argc, argv, "k:i:u", long_options_c, (int *) 0); if (optc < 0) break; if ((optc == 'k' || optc == 'i') && args->ctype == ctype_c) args->ctype = CLONE (ctype_c, unsigned short, cardinalityof (ctype_c)); switch (optc) { case 'k': set_ushort_ctype (args->ctype, optarg, SK); break; case 'i': clear_ushort_ctype (args->ctype, optarg, SK); break; case 'u': args->strip_underscore = 1; break; default: usage (); } } if (tmp_string) { free (argv); free (tmp_string); } return args; } unsigned char *scanner_buffer; #define SCAN_CPP_DIRECTIVE \ do \ { \ new_line = 0; \ /* Cope with leading whitespace before CPP lines */ \ while (c == ' ' || c == '\t') \ c = getc (in_FILE); \ if (c == '\n') \ { \ new_line = 1; \ goto top; \ } \ else if (c != '#') \ goto next; \ c = getc (in_FILE); \ while (ISBORING (c)) \ c = getc (in_FILE); \ if (!ISID1ST (c)) \ goto next; \ id = scanner_buffer; \ *id++ = c; \ while (ISIDREST (c = getc (in_FILE))) \ *id++ = c; \ *id = '\0'; \ if (strequ (scanner_buffer, "include")) \ { \ while (c == ' ' || c == '\t') \ c = getc (in_FILE); \ if (c == '\n') \ { \ new_line = 1; \ goto top; \ } \ id = scanner_buffer; \ if (c == '"') \ { \ c = getc (in_FILE); \ while (c != '\n' && c != '"' && c != EOF) \ { \ *id++ = c; \ c = getc (in_FILE); \ } \ *flags = TOK_STRING; \ } \ else if (c == '<') \ { \ c = getc (in_FILE); \ while (c != '\n' && c != '>' && c != EOF) \ { \ *id++ = c; \ c = getc (in_FILE); \ } \ *flags = TOK_STRING; \ } \ else if (ISID1ST (c)) \ { \ *id++ = c; \ while (ISIDREST (c = getc (in_FILE))) \ *id++ = c; \ *flags = TOK_NAME; \ } \ else \ { \ while (c != '\n' && c != EOF) \ c = getc (in_FILE); \ new_line = 1; \ goto top; \ } \ while (c != '\n' && c != EOF) \ c = getc (in_FILE); \ new_line = 1; \ obstack_grow0 (&tokens_obstack, scanner_buffer, \ id - scanner_buffer); \ return (struct token *) obstack_finish (&tokens_obstack); \ } \ if (strnequ (scanner_buffer, "if", 2) \ || strequ (scanner_buffer, "define") \ || strequ (scanner_buffer, "elif") /* ansi C */ \ || strequ (scanner_buffer, "undef")) \ goto next; \ while ((c != '\n') && (c != EOF)) \ c = getc (in_FILE); \ new_line = 1; \ goto top; \ } while (0) /* Grab the next identifier from the C source file. This state machine is built for speed, not elegance. */ static struct token * get_token_c (FILE *in_FILE, void const *args, int *flags) { #define ARGS ((struct args_c const *) args) static int new_line = 1; unsigned short const *rct = &ARGS->ctype[1]; unsigned char *id = scanner_buffer; int c; int d; obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME); top: c = getc (in_FILE); if (new_line) SCAN_CPP_DIRECTIVE; next: while (ISBORING (c)) c = getc (in_FILE); switch (c) { case '"': id = scanner_buffer; *id++ = c = getc (in_FILE); for (;;) { while (ISQ2BORING (c)) *id++ = c = getc (in_FILE); if (c == '\\') { *id++ = c = getc (in_FILE); continue; } else if (c != '"') goto next; break; } *--id = '\0'; id = scanner_buffer; while (ISSTRKEEP (d = *id)) id++; if (*id || id == scanner_buffer) { c = getc (in_FILE); goto next; } *flags = TOK_STRING; if (ARGS->strip_underscore && scanner_buffer[0] == '_' && scanner_buffer[1]) obstack_grow0 (&tokens_obstack, scanner_buffer + 1, id - scanner_buffer - 1); else obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); case '\'': c = getc (in_FILE); for (;;) { while (ISQ1BORING (c)) c = getc (in_FILE); if (c == '\\') { c = getc (in_FILE); continue; } else if (c == '\'') c = getc (in_FILE); goto next; } case '/': c = getc (in_FILE); if (c == '/') { /* Cope with C++ comment */ while (ISCCBORING (c)) c = getc (in_FILE); new_line = 1; goto top; } else if (c != '*') goto next; c = getc (in_FILE); for (;;) { while (ISCBORING (c)) c = getc (in_FILE); c = getc (in_FILE); if (c == '/') { c = getc (in_FILE); goto next; } else if (ISEOF (c)) { new_line = 1; obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } } case '\n': new_line = 1; goto top; default: if (ISEOF (c)) { new_line = 1; obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } id = scanner_buffer; *id++ = c; if (ISID1ST (c)) { *flags = TOK_NAME; while (ISIDREST (c = getc (in_FILE))) *id++ = c; } else if (ISDIGIT (c)) { *flags = TOK_NUMBER; while (ISNUMBER (c = getc (in_FILE))) *id++ = c; } else { if (isprint (c)) fprintf (stderr, _("junk: `%c'"), c); else fprintf (stderr, _("junk: `\\%03o'"), c); } ungetc (c, in_FILE); *flags |= TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); } #undef ARGS } #undef I1 #undef DG #undef NM #undef C1 #undef C2 #undef Q1 #undef Q2 #undef ES #undef NL #undef EF #undef SK #undef VH #undef ISDIGIT #undef ISNUMBER #undef ISEOF #undef ISID1ST #undef ISIDREST #undef ISSTRKEEP #undef ISBORING #undef ISCBORING #undef ISCCBORING #undef ISQ1BORING #undef ISQ2BORING /*************** Assembly ***************************************************/ #define I1 0x01 /* 1st char of an identifier [a-zA-Z_] */ #define NM 0x02 /* digit [0-9a-fA-FxX] */ #define NL 0x04 /* newline: \n */ #define CM 0x08 /* assembler comment char: usually # or | */ #define IG 0x10 /* ignore `identifiers' with these chars in them */ #define C1 0x20 /* C comment introduction char: / */ #define C2 0x40 /* C comment termination char: * */ #define EF 0x80 /* EOF */ /* Assembly Language character classes */ #define ISID1ST(c) ((rct)[c] & (I1)) #define ISIDREST(c) ((rct)[c] & (I1|NM)) #define ISNUMBER(c) ((rct)[c] & (NM)) #define ISEOF(c) ((rct)[c] & (EF)) #define ISCOMMENT(c) ((rct)[c] & (CM)) #define ISBORING(c) (!((rct)[c] & (EF|NL|I1|NM|CM|C1))) #define ISCBORING(c) (!((rct)[c] & (EF|NL))) #define ISCCBORING(c) (!((rct)[c] & (EF|C2))) #define ISIGNORE(c) ((rct)[c] & (IG)) static unsigned char ctype_asm[257] = { EF, /* 0 1 2 3 4 5 6 7 */ /* ----- ----- ----- ----- ----- ----- ----- ----- */ /*000*/ 0, 0, 0, 0, 0, 0, 0, 0, /*010*/ 0, 0, NL, 0, 0, 0, 0, 0, /*020*/ 0, 0, 0, 0, 0, 0, 0, 0, /*030*/ 0, 0, 0, 0, 0, 0, 0, 0, /*040*/ 0, 0, 0, 0, 0, 0, 0, 0, /*050*/ 0, 0, C2, 0, 0, 0, 0, C1, /*060*/ NM, NM, NM, NM, NM, NM, NM, NM, /*070*/ NM, NM, 0, 0, 0, 0, 0, 0, /*100*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*110*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*120*/ I1, I1, I1, I1, I1, I1, I1, I1, /*130*/ I1|NM, I1, I1, 0, 0, 0, 0, I1, /*140*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*150*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*160*/ I1, I1, I1, I1, I1, I1, I1, I1, /*170*/ I1|NM, I1, I1, 0, 0, 0, 0, 0, }; struct args_asm { int handle_cpp; int strip_underscore; unsigned char *ctype; }; static struct args_asm args_asm = { 1, 0, ctype_asm }; static struct option const long_options_asm[] = { { "comment", required_argument, 0, 'c' }, { "keep", required_argument, 0, 'k' }, { "ignore", required_argument, 0, 'i' }, { "strip-underscore", no_argument, 0, 'u' }, { "no-cpp", no_argument, 0, 'n' }, {NULL, 0, NULL, 0} }; static void help_me_asm (void) { printf (_("\ Assembly language:\n\ -c,--comment=CHARS Any of CHARS starts a comment until end-of-line\n\ -k,--keep=CHARS Allow CHARS in tokens, and keep the result\n\ -i,--ignore=CHARS Allow CHARS in tokens, and toss the result\n\ -u,--strip-underscore Strip a leading underscore from tokens\n\ -n,--no-cpp Don't handle C pre-processor directives\n\ ")); } static void * parse_args_asm (char **argv, int argc) { char *tmp_string = 0; struct args_asm *args; if (argv == 0 || *argv == 0) return &args_asm; if (argc) args = &args_asm; else { tmp_string = xstrdup (*argv); tokenize_args_string (tmp_string, &argc, &argv); args = xmalloc (sizeof *args); args->strip_underscore = 0; args->ctype = ctype_asm; args->handle_cpp = 1; } optind = 0; for (;;) { int optc = getopt_long (argc, argv, "c:k:i:un", long_options_asm, (int *) 0); if (optc < 0) break; if ((optc == 'k' || optc == 'i' || optc == 'c') && args->ctype == ctype_asm) args->ctype = CLONE (ctype_asm, unsigned char, cardinalityof (ctype_asm)); switch (optc) { case 'c': set_uchar_ctype (args->ctype, optarg, CM); break; case 'k': set_uchar_ctype (args->ctype, optarg, I1); break; case 'i': set_uchar_ctype (args->ctype, optarg, I1 | IG); break; case 'u': args->strip_underscore = 1; break; case 'n': args->handle_cpp = 0; break; default: usage (); } } if (tmp_string) { free (argv); free (tmp_string); } return args; } /* Grab the next identifier the assembly language source file. This state machine is built for speed, not elegance. */ static struct token * get_token_asm (FILE *in_FILE, void const *args, int *flags) { #define ARGS ((struct args_asm const *) args) static int new_line = 1; unsigned char const *rct = &ARGS->ctype[1]; unsigned char *id = scanner_buffer; int c, d; obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME); top: c = getc (in_FILE); if (ARGS->handle_cpp > 0 && new_line) SCAN_CPP_DIRECTIVE; next: while (ISBORING (c)) c = getc (in_FILE); if (ISCOMMENT (c)) { while (ISCBORING (c)) c = getc (in_FILE); new_line = 1; } if (ISEOF (c)) { new_line = 1; obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } if (c == '\n') { new_line = 1; goto top; } if (c == '/') { if ((c = getc (in_FILE)) != '*') goto next; c = getc (in_FILE); for (;;) { while (ISCCBORING (c)) c = getc (in_FILE); c = getc (in_FILE); if (c == '/') { c = getc (in_FILE); break; } else if (ISEOF (c)) { new_line = 1; obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } } goto next; } id = scanner_buffer; if (ARGS->strip_underscore && c == '_' && !ISID1ST (c = getc (in_FILE))) { obstack_grow0 (&tokens_obstack, "_", 1); return (struct token *) obstack_finish (&tokens_obstack); } *id++ = c; if (ISID1ST (c)) { *flags = TOK_NAME; while (ISIDREST (c = getc (in_FILE))) *id++ = c; } else if (ISNUMBER (c)) { *flags = TOK_NUMBER; while (ISNUMBER (c = getc (in_FILE))) *id++ = c; } else { if (isprint (c)) fprintf (stderr, _("junk: `%c'"), c); else fprintf (stderr, _("junk: `\\%03o'"), c); goto next; } *id = '\0'; for (id = scanner_buffer; *id; id++) if (ISIGNORE (d = *id)) goto next; ungetc (c, in_FILE); *flags |= TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); #undef ARGS } #undef I1 #undef NM #undef NL #undef CM #undef IG #undef C1 #undef C2 #undef EF #undef ISID1ST #undef ISIDREST #undef ISNUMBER #undef ISEOF #undef ISCOMMENT #undef ISBORING #undef ISCBORING #undef ISCCBORING #undef ISIGNORE /*************** Text *******************************************************/ #define I1 0x01 /* 1st char of an identifier [a-zA-Z_] */ #define NM 0x02 /* digit [0-9a-fA-FxX] */ #define SQ 0x04 /* squeeze these out (.,',-) */ #define EF 0x80 /* EOF */ /* Text character classes */ #define ISID1ST(c) ((rct)[c] & (I1)) #define ISIDREST(c) ((rct)[c] & (I1|NM|SQ)) #define ISNUMBER(c) ((rct)[c] & (NM)) #define ISEOF(c) ((rct)[c] & (EF)) #define ISBORING(c) (!((rct)[c] & (I1|NM|EF))) #define ISIDSQUEEZE(c) ((rct)[c] & (SQ)) static unsigned char ctype_text[257] = { EF, /* 0 1 2 3 4 5 6 7 */ /* ----- ----- ----- ----- ----- ----- ----- ----- */ /*000*/ 0, 0, 0, 0, 0, 0, 0, 0, /*010*/ 0, 0, 0, 0, 0, 0, 0, 0, /*020*/ 0, 0, 0, 0, 0, 0, 0, 0, /*030*/ 0, 0, 0, 0, 0, 0, 0, 0, /*040*/ 0, 0, 0, 0, 0, 0, 0, 0, /*050*/ 0, 0, 0, 0, 0, 0, 0, 0, /*060*/ NM, NM, NM, NM, NM, NM, NM, NM, /*070*/ NM, NM, 0, 0, 0, 0, 0, 0, /*100*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*110*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*120*/ I1, I1, I1, I1, I1, I1, I1, I1, /*130*/ I1|NM, I1, I1, 0, 0, 0, 0, I1, /*140*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*150*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*160*/ I1, I1, I1, I1, I1, I1, I1, I1, /*170*/ I1|NM, I1, I1, 0, 0, 0, 0, 0, /*200*/ 0, 0, 0, 0, 0, 0, 0, 0, /*210*/ 0, 0, 0, 0, 0, 0, 0, 0, /*220*/ 0, 0, 0, 0, 0, 0, 0, 0, /*230*/ 0, 0, 0, 0, 0, 0, 0, 0, /*240*/ 0, 0, 0, 0, 0, 0, 0, 0, /*250*/ 0, 0, 0, 0, 0, 0, 0, 0, /*260*/ 0, 0, 0, 0, 0, 0, 0, 0, /*270*/ 0, 0, 0, 0, 0, 0, 0, 0, /*300*/ I1, I1, I1, I1, I1, I1, I1, I1, /*310*/ I1, I1, I1, I1, I1, I1, I1, I1, /*320*/ I1, I1, I1, I1, I1, I1, I1, 0, /*330*/ I1, I1, I1, I1, I1, I1, I1, I1, /*340*/ I1, I1, I1, I1, I1, I1, I1, I1, /*350*/ I1, I1, I1, I1, I1, I1, I1, I1, /*360*/ I1, I1, I1, I1, I1, I1, I1, 0, /*370*/ I1, I1, I1, I1, I1, I1, I1, I1, }; struct args_text { unsigned char *ctype; }; static struct args_text args_text = { ctype_text }; static struct option const long_options_text[] = { { "include", required_argument, 0, 'i' }, { "exclude", required_argument, 0, 'x' }, {NULL, 0, NULL, 0} }; static void help_me_text (void) { printf (_("\ Text language:\n\ -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents\n\ -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters\n\ ")); } static void * parse_args_text (char **argv, int argc) { char *tmp_string = 0; struct args_text *args; if (argv == 0 || *argv == 0) return &args_text; if (argc) args = &args_text; else { tmp_string = xstrdup (*argv); tokenize_args_string (tmp_string, &argc, &argv); args = xmalloc (sizeof *args); args->ctype = ctype_text; } optind = 0; for (;;) { int optc = getopt_long (argc, argv, "i:x:", long_options_text, (int *) 0); if (optc < 0) break; if ((optc == 'x' || optc == 'i') && args->ctype == ctype_text) args->ctype = CLONE (ctype_text, unsigned char, cardinalityof (ctype_text)); switch (optc) { case 'i': set_uchar_ctype (args->ctype, optarg, I1); break; case 'x': clear_uchar_ctype (args->ctype, optarg, I1); break; default: usage (); } } if (tmp_string) { free (argv); free (tmp_string); } return args; } /* Grab the next identifier the text source file. This state machine is built for speed, not elegance. */ static struct token * get_token_text (FILE *in_FILE, void const *args, int *flags) { #define ARGS ((struct args_text const *) args) unsigned char const *rct = &ARGS->ctype[1]; int c; unsigned char *id = scanner_buffer; obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME); top: c = getc (in_FILE); while (ISBORING (c)) c = getc (in_FILE); if (ISEOF (c)) { obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } id = scanner_buffer; *id++ = c; if (ISID1ST (c)) { *flags = TOK_NAME; while (ISIDREST (c = getc (in_FILE))) if (!ISIDSQUEEZE (c)) *id++ = c; } else if (ISNUMBER (c)) { *flags = TOK_NUMBER; while (ISNUMBER (c = getc (in_FILE))) *id++ = c; } else { if (isprint (c)) fprintf (stderr, _("junk: `%c'"), c); else fprintf (stderr, _("junk: `\\%03o'"), c); goto top; } ungetc (c, in_FILE); *flags |= TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); #undef ARGS } #undef I1 #undef NM #undef SQ #undef EF #undef ISID1ST #undef ISIDREST #undef ISNUMBER #undef ISEOF #undef ISBORING #undef ISIDSQUEEZE /*************** Perl *******************************************************/ #define I1 0x01 /* 1st char of an identifier [a-zA-Z_] */ #define NM 0x02 /* digit [0-9a-fA-FxX] */ #define SQ 0x04 /* squeeze these out (.,',-) */ #define CM 0x08 /* Comment Character '#' */ #define EQ 0x10 /* Start of Documentation Character '=' */ #define Q1 0x20 /* Start of Single Quote ''' */ #define Q2 0x40 /* Start of Double Quote '"' */ #define EF 0x80 /* EOF */ #define NL 0x100 /* '\n' character */ #define ES 0x200 /* Escape '\\' character */ /* Text character classes */ #define ISID1ST(c) ((rct)[c] & (I1)) #define ISIDREST(c) ((rct)[c] & (I1|NM|SQ)) #define ISNUMBER(c) ((rct)[c] & (NM)) #define ISIDSQUEEZE(c) ((rct)[c] & (SQ)) #define ISCOMMENT(c) ((rct)[c] & (CM)) #define ISEQUALS(c) ((rct)[c] & (EQ)) #define ISQUOTE1(c) ((rct)[c] & (Q1)) #define ISQUOTE2(c) ((rct)[c] & (Q2)) #define ISNEWLINE(c) ((rct)[c] & (NL)) #define ISEOF(c) ((rct)[c] & (EF)) #define ISBORING(c) (!((rct)[c] & (I1|NL|NM|CM|EQ|Q1|Q2|ES|EF))) static unsigned short ctype_perl[257] = { EF, /* 0 1 2 3 4 5 6 7 */ /* ----- ----- ----- ----- ----- ----- ----- ----- */ /*000*/ 0, 0, 0, 0, 0, 0, 0, 0, /*010*/ 0, 0, NL, 0, 0, 0, 0, 0, /*020*/ 0, 0, 0, 0, 0, 0, 0, 0, /*030*/ 0, 0, 0, 0, 0, 0, 0, 0, /*040*/ 0, 0, Q2, CM, 0, 0, 0, Q1, /*050*/ 0, 0, 0, 0, 0, 0, 0, 0, /*060*/ NM, NM, NM, NM, NM, NM, NM, NM, /*070*/ NM, NM, 0, 0, 0, EQ, 0, 0, /*100*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*110*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*120*/ I1, I1, I1, I1, I1, I1, I1, I1, /*130*/ I1|NM, I1, I1, 0, ES, 0, 0, I1, /*140*/ 0, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1|NM, I1, /*150*/ I1, I1, I1, I1, I1|NM, I1, I1, I1, /*160*/ I1, I1, I1, I1, I1, I1, I1, I1, /*170*/ I1|NM, I1, I1, 0, 0, 0, 0, 0, /*200*/ 0, 0, 0, 0, 0, 0, 0, 0, /*210*/ 0, 0, 0, 0, 0, 0, 0, 0, /*220*/ 0, 0, 0, 0, 0, 0, 0, 0, /*230*/ 0, 0, 0, 0, 0, 0, 0, 0, /*240*/ 0, 0, 0, 0, 0, 0, 0, 0, /*250*/ 0, 0, 0, 0, 0, 0, 0, 0, /*260*/ 0, 0, 0, 0, 0, 0, 0, 0, /*270*/ 0, 0, 0, 0, 0, 0, 0, 0, /*300*/ I1, I1, I1, I1, I1, I1, I1, I1, /*310*/ I1, I1, I1, I1, I1, I1, I1, I1, /*320*/ I1, I1, I1, I1, I1, I1, I1, 0, /*330*/ I1, I1, I1, I1, I1, I1, I1, I1, /*340*/ I1, I1, I1, I1, I1, I1, I1, I1, /*350*/ I1, I1, I1, I1, I1, I1, I1, I1, /*360*/ I1, I1, I1, I1, I1, I1, I1, 0, /*370*/ I1, I1, I1, I1, I1, I1, I1, I1, }; struct args_perl { int exclude_dtags; unsigned short *ctype; }; static struct args_perl args_perl = { 1, ctype_perl }; static struct option const long_options_perl[] = { { "include", required_argument, 0, 'i' }, { "exclude", required_argument, 0, 'x' }, { "dtags", no_argument, 0, 'd' }, {NULL, 0, NULL, 0} }; static void help_me_perl (void) { printf (_("\ Perl language:\n\ -i,--include=CHAR-CLASS Treat characters of CHAR-CLASS as token constituents\n\ -x,--exclude=CHAR-CLASS Treat characters of CHAR-CLASS as token delimiters\n\ -d,--dtags Include documentation tags\n\ ")); } static void * parse_args_perl (char **argv, int argc) { char *tmp_string = 0; struct args_perl *args; if (argv == 0 || *argv == 0) return &args_perl; if (argc) args = &args_perl; else { tmp_string = xstrdup (*argv); tokenize_args_string (tmp_string, &argc, &argv); args = xmalloc (sizeof(struct args_perl)); args->exclude_dtags = 1; args->ctype = ctype_perl; } optind = 0; for (;;) { int optc = getopt_long (argc, argv, "i:x:d", long_options_perl, (int *) 0); if (optc < 0) break; if ((optc == 'x' || optc == 'i') && args->ctype == ctype_perl) args->ctype = CLONE (ctype_perl, unsigned short, cardinalityof (ctype_perl)); switch (optc) { case 'd': args->exclude_dtags = 0; break; case 'i': set_ushort_ctype (args->ctype, optarg, I1); break; case 'x': clear_ushort_ctype (args->ctype, optarg, I1); break; default: usage (); } } if (tmp_string) { free (argv); free (tmp_string); } return args; } /* Grab the next identifier the text source file. This state machine is built for speed, not elegance. */ static struct token * get_token_perl (FILE *in_FILE, void const *args, int *flags) { #define ARGS ((struct args_perl const *) args) static int new_line = 1; /* static char id_0[BUFSIZ]; */ unsigned short const *rct = &ARGS->ctype[1]; int c, state = 0, skip_doc = 0; /* int comment = 0, d_quote = 0, s_quote = 0, equals = 0; */ unsigned char *id = scanner_buffer; obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME); top: c = getc (in_FILE); while (ISBORING (c)) c = getc (in_FILE); switch (c) { case '\n': state &= ~CM; /* comment = 0; */ new_line = 1; goto top; break; case '\\': c = getc (in_FILE); /* Skip next character */ new_line = 0; goto top; break; case '#': /* Skip the # if it is inside single quotes or double quotes */ if (!(state & Q1) && !(state & Q2)) state |= CM; /* comment = 1 */ break; case '\'': /* Skip the single quote if it is inside a comment or double quotes */ if (!skip_doc) if (!(state & CM) && !(state & Q2)) state ^= Q1; /* s_quote = ((s_quote) ? 0 : 1); */ break; case '\"': /* Skip the double quote if it is inside a comment or single quotes */ if (!skip_doc) if (!(state & CM) && !(state & Q1)) state ^= Q2; /* d_quote = ((d_quote == 1) ? 0 : 1); */ break; case '=': if (new_line && ARGS->exclude_dtags) { skip_doc = 1; state &= ~EQ; /* documentation = 0; */ } break; default: if (ISEOF (c)) { new_line = 1; obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; } break; } new_line = 0; if (ISCOMMENT(c) || ISQUOTE1(c) || ISQUOTE2(c) || ISNEWLINE(c) || ISEQUALS(c) || state) goto top; id = scanner_buffer; *id++ = c; if (ISID1ST (c)) { *flags = TOK_NAME; while (ISIDREST (c = getc (in_FILE))) if (!ISIDSQUEEZE (c)) *id++ = c; } else if (ISNUMBER (c)) { *flags = TOK_NUMBER; while (ISNUMBER (c = getc (in_FILE))) *id++ = c; ungetc (c, in_FILE); goto top; /* skip all numbers */ } else { if (isprint (c)) fprintf (stderr, _("junk: `%c'"), c); else fprintf (stderr, _("junk: `\\%03o'"), c); goto top; } ungetc (c, in_FILE); *id = '\0'; if (skip_doc) { /* perl documentation 'perlpod' processing is done here */ if (strequ (scanner_buffer, "cut")) { skip_doc = 0; } else { state |= EQ; /* documentation = 1; */ } goto top; } if (strequ (scanner_buffer, "_")) { goto top; } *flags |= TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); #undef ARGS } #undef I1 #undef NM #undef SQ #undef CM #undef EQ #undef Q1 #undef Q2 #undef EF #undef NL #undef ES #undef ISID1ST #undef ISIDREST #undef ISNUMBER #undef ISIDSQUEEZE #undef ISCOMMENT #undef ISEQUALS #undef ISQUOTE1 #undef ISQUOTE2 #undef ISNEWLINE #undef ISEOF #undef ISBORING /*************** Lisp *******************************************************/ #define DG 0x01 /* [0-9] */ #define LT 0x02 /* [a-zA-Z] */ #define I1 0x04 /* LT | [!$%&*:/<=>?^_~] */ #define Id 0x08 /* LT | I1 | DG | [-+.@] */ #define RA 0x10 /* [bodxieBODXIE] */ #define NM 0x20 /* [-@#.0-9a-fA-FesfdlESFDL] */ #define EF 0x40 /* (eof) */ #define is_DIGIT(c) ((rct)[c] & DG) #define is_LETTER(c) ((rct)[c] & LT) #define is_IDENT1(c) ((rct)[c] & (LT | I1)) #define is_IDENT(c) ((rct)[c] & (LT | I1 | DG | Id)) #define is_RADIX(c) ((rct)[c] & RA) #define is_NUMBER(c) ((rct)[c] & (DG | RA | NM)) static unsigned char ctype_lisp[257] = { EF, /* 0 1 2 3 4 5 6 7 */ /* ----- ----- ----- ----- ----- ----- ----- ----- */ /*000*/ 0, 0, 0, 0, 0, 0, 0, 0, /*010*/ 0, 0, 0, 0, 0, 0, 0, 0, /*020*/ 0, 0, 0, 0, 0, 0, 0, 0, /*030*/ 0, 0, 0, 0, 0, 0, 0, 0, /*040*/ 0, I1, 0, NM, I1, I1, I1, 0, /*050*/ 0, 0, I1, Id, 0, Id|NM, Id|NM, I1, /*060*/ DG, DG, DG, DG, DG, DG, DG, DG, /*070*/ DG, DG, I1, 0, I1, I1, I1, I1, /*100*/ Id|NM, LT|NM, LT|RA, LT|NM, LT|RA, LT|RA, LT|NM, LT, /*110*/ LT, LT|RA, LT, LT, LT|NM, LT, LT, LT|RA, /*120*/ LT, LT, LT, LT|NM, LT, LT, LT, LT, /*130*/ LT|RA, LT, LT, 0, 0, 0, I1, I1, /*140*/ 0, LT|NM, LT|RA, LT|NM, LT|RA, LT|RA, LT|NM, LT, /*150*/ LT, LT|RA, LT, LT, LT|NM, LT, LT, LT|RA, /*160*/ LT, LT, LT, LT|NM, LT, LT, LT, LT, /*170*/ LT|RA, LT, LT, 0, 0, 0, I1, 0 /* FIXME: latin-1 */ }; static void help_me_lisp (void) { printf (_("\ Lisp language:\n\ ")); } static void * parse_args_lisp (char **argv, int argc) { return NULL; } /* Grab the next identifier from the lisp source file. This state machine is built for speed, not elegance. */ static struct token * get_token_lisp (FILE *in_FILE, void const *args, int *flags) { unsigned char const *rct = &ctype_lisp[1]; unsigned char *id = scanner_buffer; int c; obstack_blank (&tokens_obstack, OFFSETOF_TOKEN_NAME); top: c = getc (in_FILE); recheck: switch (c) { case EOF: obstack_free (&tokens_obstack, obstack_finish (&tokens_obstack)); return 0; case '(': case ')': case '\'': case '`': /* quote, quasiquote */ goto top; case ',': /* unquote */ c = getc (in_FILE); if (c == '@') /* unquote-splicing */ goto top; goto recheck; case ';': /* comment */ do { c = getc (in_FILE); } while ( (c != EOF) && (c != '\n')); goto top; case '"': /* string with/without ansi-C escapes*/ string: do { c = getc (in_FILE); if (c == '\\') { c = getc (in_FILE); goto string; } } while ( (c != EOF) && (c != '"')); goto top; case '?': /* character constant */ cconstant: do { c = getc(in_FILE); if (c == '\\') { c = getc(in_FILE); goto cconstant; } } while (c != EOF && is_IDENT(c)); goto top; case '.': case '+': case '-': id = scanner_buffer; *id++ = c; c = getc (in_FILE); if (is_DIGIT (c) || (scanner_buffer[0] != '.' && (c == '.' || c == 'i' || c == 'I'))) goto number; if (c != EOF) ungetc (c, in_FILE); goto ident; case '#': id = scanner_buffer; *id++ = c; c = getc (in_FILE); if (c == EOF) goto top; else if (is_RADIX (c)) goto number; else if (c == '\\') /* #\... literal Character */ { *id++ = c; c = getc (in_FILE); *id++ = c; if (is_LETTER (c)) { while (is_LETTER (c = getc (in_FILE))) *id++ = c; if (c != EOF) ungetc (c, in_FILE); } *flags = TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); } else if (c == '(') /* # (...) vector vi%) */ goto top; else if (c == '"') /* #"..." Bigloo: string with ansi-C escape */ goto string; else if (c == '!') /* #!... Kawa key/eof/null/... */ { while (is_LETTER (c = getc (in_FILE))) *id++ = c; if (c != EOF) ungetc (c, in_FILE); *flags = TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); } else if (c == '|') /* #|...|# Guile/Kawa multi-lines comment */ { do { c = getc (in_FILE); if (c == '|') { while ( (c = getc (in_FILE)) == '|') ; if (c == '#') break; } } while (c != EOF); goto top; } else if (c == '@') /* #@LENGTH ...^_ EMACS byte-code comment */ { do { c = getc (in_FILE); } while ( (c != EOF) && (c != '\037')); goto top; } else if (c == '[') /* #[ ... ] EMACS byte-code object */ goto top; /* Ignore invalide #-construct */ goto top; case '[': case ']': /* EMACS vector aka # (...) in Scheme */ /* EMACS vector object vs Kawa ident */ /* rational: Kawa ident could not start with [ nor with ] */ goto top; default: if (is_IDENT1 (c)) { id = scanner_buffer; *id++ = c; ident: /* Emacs end-of-vector vs Kawa ident: allow [] as a part of an ident. */ for (;;) { while (is_IDENT (c = getc (in_FILE))) *id++ = c; if (0 /* c == '[' */) { c = getc (in_FILE); if (c == ']') { *id++ = '['; *id++ = ']'; continue; } if (c != EOF) ungetc (c, in_FILE); ungetc ('[', in_FILE); } break; } if (c != EOF) ungetc (c, in_FILE); *flags = TOK_NAME | TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); } else if (is_DIGIT (c)) { id = scanner_buffer; number: *id++ = c; while (is_NUMBER (c = getc (in_FILE))) *id++ = c; if (c != EOF) ungetc (c, in_FILE); *flags = TOK_NUMBER | TOK_LITERAL; obstack_grow0 (&tokens_obstack, scanner_buffer, id - scanner_buffer); return (struct token *) obstack_finish (&tokens_obstack); } } goto top; } #undef DG #undef LT #undef I1 #undef Id #undef RA #undef NM #undef is_DIGIT #undef is_LETTER #undef is_IDENT1 #undef is_IDENT #undef is_RADIX #undef is_NUMBER ��������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idread.c������������������������������������������������������������0000664�0000000�0000000�00000016624�12166360012�014255� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idread.c -- functions to read ID database files Copyright (C) 1995-1996, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stddef.h> #include <errno.h> #include <stdlib.h> #include <obstack.h> #include <xalloc.h> #include <error.h> #include "idu-hash.h" #include "idfile.h" #include "iduglobal.h" #include "ignore-value.h" #include "xnls.h" static int fgets0 (char *buf0, int size, FILE *in_FILE); /****************************************************************************/ /* read_id_file opens the ID file, reads header fields into idh, verifies the magic number and version, and reads the constituent file names. Any errors are considered fatal and cause an exit. */ struct file_link ** read_id_file (char const *id_file_name, struct idhead *idhp) { struct file_link **flinkv = maybe_read_id_file (id_file_name, idhp); if (flinkv) return flinkv; error (EXIT_FAILURE, errno, _("can't open `%s'"), id_file_name); return NULL; } /* maybe_read_id_file does everything that read_id_file does, but is tolerant of errors opening the ID file, returning NULL in this case (this is called from mkid where an ID might or might not already exist). All other errors are considered fatal. */ struct file_link ** maybe_read_id_file (char const *id_file_name, struct idhead *idhp) { obstack_init (&idhp->idh_file_link_obstack); idhp->idh_FILE = fopen (id_file_name, "rb"); if (idhp->idh_FILE == 0) return 0; read_idhead (idhp); if (idhp->idh_magic[0] != IDH_MAGIC_0 || idhp->idh_magic[1] != IDH_MAGIC_1) error (EXIT_FAILURE, 0, _("`%s' is not an ID file! (bad magic #)"), id_file_name); if (idhp->idh_version != IDH_VERSION) error (EXIT_FAILURE, 0, _("`%s' is version %d, but I only grok version %d"), id_file_name, idhp->idh_version, IDH_VERSION); fseek (idhp->idh_FILE, idhp->idh_flinks_offset, 0); return deserialize_file_links (idhp); } /****************************************************************************/ /* Read and reconstruct a serialized file_link hierarchy. */ struct file_link ** deserialize_file_links (struct idhead *idhp) { struct file_link **flinks_0 = xmalloc (sizeof(struct file_link *) * idhp->idh_file_links); struct file_link **flinks = flinks_0; struct file_link **members_0 = xmalloc (sizeof(struct file_link *) * idhp->idh_file_links + 1); struct file_link **members = members_0; struct file_link *flink; struct file_link **slot; int i; for (i = 0; i < idhp->idh_file_links; i++) { unsigned long parent_index; int c; obstack_blank (&idhp->idh_file_link_obstack, offsetof (struct file_link, fl_name)); if (obstack_room (&idhp->idh_file_link_obstack) >= idhp->idh_max_link) do { c = getc (idhp->idh_FILE); obstack_1grow_fast (&idhp->idh_file_link_obstack, c); } while (c); else do { c = getc (idhp->idh_FILE); obstack_1grow (&idhp->idh_file_link_obstack, c); } while (c); flink = (struct file_link *) obstack_finish (&idhp->idh_file_link_obstack); *flinks = flink; io_read (idhp->idh_FILE, &flink->fl_flags, sizeof (flink->fl_flags), IO_TYPE_INT); io_read (idhp->idh_FILE, &parent_index, FL_PARENT_INDEX_BYTES, IO_TYPE_INT); flink->fl_parent = flinks_0[parent_index]; slot = (struct file_link **) hash_find_slot (&idhp->idh_file_link_table, flink); if (HASH_VACANT (*slot)) hash_insert_at (&idhp->idh_file_link_table, flink, slot); else { obstack_free (&idhp->idh_file_link_obstack, flink); (*slot)->fl_flags = flink->fl_flags; flink = *flinks = *slot; } flinks++; if (flink->fl_flags & FL_MEMBER) *members++ = flink; } free (flinks_0); *members = 0; return members_0; } /****************************************************************************/ int read_idhead (struct idhead *idhp) { return io_idhead (idhp->idh_FILE, io_read, idhp); } /* This is like fgets(3s), except that lines are delimited by NULs rather than newlines. Also, we return the number of characters read rather than the address of buf0. */ static int fgets0 (char *buf0, int size, FILE * in_FILE) { char *buf; int c; char *end; buf = buf0; end = &buf[size]; while ((c = getc (in_FILE)) > 0 && buf < end) *buf++ = c; *buf = '\0'; return (buf - buf0); } int io_read (FILE *input_FILE, void *addr, unsigned int size, int io_type) { if (io_type == IO_TYPE_INT || size == 1) { switch (size) { case 4: *(unsigned long *)addr = getc (input_FILE); *(unsigned long *)addr += getc (input_FILE) << 010; *(unsigned long *)addr += getc (input_FILE) << 020; *(unsigned long *)addr += getc (input_FILE) << 030; break; case 3: *(unsigned long *)addr = getc (input_FILE); *(unsigned long *)addr += getc (input_FILE) << 010; *(unsigned long *)addr += getc (input_FILE) << 020; break; case 2: *(unsigned short *)addr = getc (input_FILE); *(unsigned short *)addr += getc (input_FILE) << 010; break; case 1: *(unsigned char *)addr = getc (input_FILE); break; default: error (EXIT_FAILURE, 0, _("unsupported size in io_read (): %d"), size); } } else if (io_type == IO_TYPE_STR) fgets0 (addr, size, input_FILE); else if (io_type == IO_TYPE_FIX) { ignore_value (fread (addr, size, 1, input_FILE)); } else error (0, 0, _("unknown I/O type: %d"), io_type); return size; } /****************************************************************************/ unsigned int token_flags (char const *buf) { return *(unsigned char const *)&buf[strlen (buf) + 1]; } unsigned short token_count (char const *buf) { unsigned char const *flags = (unsigned char const *)&buf[strlen (buf) + 1]; unsigned char const *addr = flags + 1; unsigned short count = *addr; if (*flags & TOK_SHORT_COUNT) count += (*++addr << 8); return count; } unsigned char const * token_hits_addr (char const *buf) { unsigned char const *flags = (unsigned char const *)&buf[strlen (buf) + 1]; unsigned char const *addr = flags + 2; if (*flags & TOK_SHORT_COUNT) addr++; return addr; } /****************************************************************************/ int tree8_count_levels (unsigned int cardinality) { int levels = 1; cardinality--; while (cardinality >>= 3) ++levels; return levels; } int gets_past_00 (char *tok, FILE *input_FILE) { int got = 0; int c; do { do { got++; c = getc (input_FILE); *tok++ = c; } while (c > 0); got++; c = getc (input_FILE); *tok++ = c; } while (c > 0); return got - 2; } int skip_past_00 (FILE *input_FILE) { int skipped = 0; do { do skipped++; while (getc (input_FILE) > 0); skipped++; } while (getc (input_FILE) > 0); return skipped; } ������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/idu-hash.h����������������������������������������������������������0000664�0000000�0000000�00000012527�12170556077�014547� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* idu-hash.h -- decls for hash table Copyright (C) 1995, 1999, 2007-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #ifndef _hash_h_ #define _hash_h_ #include <stdio.h> typedef unsigned long (*hash_func_t) (void const *key); typedef int (*hash_cmp_func_t) (void const *x, void const *y); typedef void (*hash_map_func_t) (void const *item); struct hash_table { void **ht_vec; unsigned long ht_size; /* total number of slots (power of 2) */ unsigned long ht_capacity; /* usable slots, limited by loading-factor */ unsigned long ht_fill; /* items in table */ unsigned long ht_empty_slots; /* empty slots not including deleted slots */ unsigned long ht_collisions; /* # of failed calls to comparison function */ unsigned long ht_lookups; /* # of queries */ unsigned int ht_rehashes; /* # of times we've expanded table */ hash_func_t ht_hash_1; /* primary hash function */ hash_func_t ht_hash_2; /* secondary hash function */ hash_cmp_func_t ht_compare; /* comparison function */ }; typedef int (*qsort_cmp_t) (void const *, void const *); extern void hash_init (struct hash_table *ht, unsigned long size, hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp); extern void hash_load (struct hash_table *ht, void *item_table, unsigned long cardinality, unsigned long size); extern void **hash_find_slot (struct hash_table *ht, void const *key); extern void *hash_find_item (struct hash_table *ht, void const *key); extern void *hash_insert_at (struct hash_table *ht, void *item, void const *slot); extern void *hash_delete (struct hash_table *ht, void const *item); extern void *hash_delete_at (struct hash_table *ht, void const *slot); extern void hash_delete_items (struct hash_table *ht); extern void hash_free_items (struct hash_table *ht); extern void hash_free (struct hash_table *ht, int free_items); extern void hash_map (struct hash_table *ht, hash_map_func_t map); extern void hash_print_stats (struct hash_table const *ht, FILE *out_FILE); extern void **hash_dump (struct hash_table const *ht, void **vector_0, qsort_cmp_t compare); extern void *hash_deleted_item; #define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item) /* hash and comparison macros for string keys. */ #define STRING_HASH_1(_key_, _result_) { \ unsigned char const *kk = (unsigned char const *) (_key_) - 1; \ while (*++kk) \ (_result_) += (*kk << (kk[1] & 0xf)); \ } while (0) #define return_STRING_HASH_1(_key_) do { \ unsigned long result = 0; \ STRING_HASH_1 ((_key_), result); \ return result; \ } while (0) #define STRING_HASH_2(_key_, _result_) do { \ unsigned char const *kk = (unsigned char const *) (_key_) - 1; \ while (*++kk) \ (_result_) += (*kk << (kk[1] & 0x7)); \ } while (0) #define return_STRING_HASH_2(_key_) do { \ unsigned long result = 0; \ STRING_HASH_2 ((_key_), result); \ return result; \ } while (0) #define STRING_COMPARE(_x_, _y_, _result_) do { \ unsigned char const *xx = (unsigned char const *) (_x_) - 1; \ unsigned char const *yy = (unsigned char const *) (_y_) - 1; \ do { \ if (*++xx == '\0') { \ yy++; \ break; \ } \ } while (*xx == *++yy); \ (_result_) = *xx - *yy; \ } while (0) #define return_STRING_COMPARE(_x_, _y_) do { \ int result; \ STRING_COMPARE (_x_, _y_, result); \ return result; \ } while (0) /* hash and comparison macros for integer keys. */ #define INTEGER_HASH_1(_key_, _result_) do { \ (_result_) += ((unsigned long)(_key_)); \ } while (0) #define return_INTEGER_HASH_1(_key_) do { \ unsigned long result = 0; \ INTEGER_HASH_1 ((_key_), result); \ return result; \ } while (0) #define INTEGER_HASH_2(_key_, _result_) do { \ (_result_) += ~((unsigned long)(_key_)); \ } while (0) #define return_INTEGER_HASH_2(_key_) do { \ unsigned long result = 0; \ INTEGER_HASH_2 ((_key_), result); \ return result; \ } while (0) #define INTEGER_COMPARE(_x_, _y_, _result_) do { \ (_result_) = _x_ - _y_; \ } while (0) #define return_INTEGER_COMPARE(_x_, _y_) do { \ int result; \ INTEGER_COMPARE (_x_, _y_, result); \ return result; \ } while (0) /* hash and comparison macros for address keys. */ #define ADDRESS_HASH_1(_key_, _result_) INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3, (_result_)) #define ADDRESS_HASH_2(_key_, _result_) INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3, (_result_)) #define ADDRESS_COMPARE(_x_, _y_, _result_) INTEGER_COMPARE ((_x_), (_y_), (_result_)) #define return_ADDRESS_HASH_1(_key_) return_INTEGER_HASH_1 (((unsigned long)(_key_)) >> 3) #define return_ADDRESS_HASH_2(_key_) return_INTEGER_HASH_2 (((unsigned long)(_key_)) >> 3) #define return_ADDRESS_COMPARE(_x_, _y_) return_INTEGER_COMPARE ((_x_), (_y_)) #endif /* not _hash_h_ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/walker.c������������������������������������������������������������0000664�0000000�0000000�00000077434�12166360012�014320� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* walker.c -- nifty file-tree walker Copyright (C) 1986, 1995-1996, 1999-2000, 2008-2012 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> 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, 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <fnmatch.h> #include <dirent.h> #include <errno.h> #include <alloca.h> #include <xalloc.h> #include <error.h> #include <pathmax.h> #include <sys/stat.h> #include "xnls.h" #include "idfile.h" #include "dynvec.h" #include "scanners.h" #include "iduglobal.h" int walker_verbose_flag = 0; off_t largest_member_file = 0; static char **vectorize_string (char *string, char const *delimiter_class); static int walk_dir (struct file_link *dir_link); static struct member_file *get_member_file (struct file_link *flink); static struct lang_args *get_lang_args (struct file_link const *flink); static void print_member_file (struct member_file *member); static int walk_sub_dirs (struct dynvec *sub_dirs_vec); static void reparent_children (struct file_link *dlink, struct file_link *slink); static int classify_link (struct file_link *flink, struct stat *stp); static struct file_link *get_link_from_dirent (struct dirent *dirent, struct file_link *parent); static struct file_link *make_link_from_dirent (struct dirent *dirent, struct file_link *parent); static struct file_link *get_link_from_string (char const *name, struct file_link *parent); static struct file_link *make_link_from_string (char const *name, struct file_link *parent); static int lang_wanted (char const *lang_name); static char **append_strings_to_vector (char **vector_0, char *string, char const *delimiter_class); static int string_in_vector (char const *string, char **vector); static int same_as_dot (char const *cwd); static struct file_link const **fill_link_vector (struct file_link const **vec_buf, struct file_link const *flink); static struct file_link const **fill_link_vector_1 (struct file_link const **vec_buf, struct file_link const *flink); static char *fill_dot_dots (char *buf, int levels); static char *absolute_file_name_1 (char *buffer, struct file_link const *flink); static unsigned long member_file_hash_1 (void const *key); static unsigned long member_file_hash_2 (void const *key); static int member_file_hash_compare (void const *x, void const *y); static unsigned long file_link_hash_1 (void const *key); static unsigned long file_link_hash_2 (void const *key); static int file_link_hash_compare (void const *x, void const *y); static unsigned long dev_ino_hash_1 (void const *key); static unsigned long dev_ino_hash_2 (void const *key); static int dev_ino_hash_compare (void const *x, void const *y); static int symlink_ancestry (struct file_link *flink); #if HAVE_LINK static struct file_link *find_alias_link (struct file_link *flink, struct stat *stp); static struct member_file *maybe_get_member_file (struct file_link *flink, struct stat *stp); #endif #define IS_DOT(s) ((s)[0] == '.' && (s)[1] == '\0') #define IS_DOT_DOT(s) ((s)[0] == '.' && (s)[1] == '.' && (s)[2] == '\0') #define IS_DOT_or_DOT_DOT(s) \ (((s)[0] == '.') && (((s)[1] == '\0') || ((s)[1] == '.' && (s)[2] == '\0'))) static struct file_link *current_dir_link = 0; static char const white_space[] = " \t\r\n\v\f"; char* xgetcwd (void); /****************************************************************************/ /* Walk the file-system tree rooted at `dir_link', looking for files that are eligible for scanning. */ static int walk_dir (struct file_link *dir_link) { int scannable_files; struct dynvec *sub_dirs_vec; DIR *dirp; if (!chdir_to_link (dir_link)) return 0; dirp = opendir ("."); if (dirp == 0) { char *file_name = alloca (PATH_MAX); absolute_file_name (file_name, dir_link); error (0, errno, _("can't read directory `%s' (`.' from `%s')"), file_name, xgetcwd ()); return 0; } sub_dirs_vec = make_dynvec (32); scannable_files = 0; for (;;) { struct file_link *flink; struct dirent *dirent = readdir (dirp); if (dirent == 0) break; if (IS_DOT_or_DOT_DOT (dirent->d_name)) continue; flink = get_link_from_dirent (dirent, dir_link); if (!(flink->fl_flags & FL_PRUNE)) walk_flink (flink, sub_dirs_vec); } closedir (dirp); scannable_files += walk_sub_dirs (sub_dirs_vec); dynvec_free (sub_dirs_vec); return scannable_files; } /* Walk the directories found by walk_dir, calling walk_dir recursively for each directory. */ static int walk_sub_dirs (struct dynvec *sub_dirs_vec) { struct file_link **sub_dirs; struct file_link **sub_dirs_end; int total_scannable_files = 0; dynvec_freeze (sub_dirs_vec); sub_dirs_end = (struct file_link **) &sub_dirs_vec->dv_vec[sub_dirs_vec->dv_fill]; sub_dirs = (struct file_link **) sub_dirs_vec->dv_vec; for ( ; sub_dirs < sub_dirs_end; sub_dirs++) { struct file_link *sub_dir_link = *sub_dirs; int scannable_files = walk_dir (sub_dir_link); if (scannable_files) total_scannable_files += scannable_files; } return total_scannable_files; } void walk_flink (struct file_link *flink, struct dynvec *sub_dirs_vec) { struct stat st; unsigned int old_flags; unsigned int new_flags; new_flags = classify_link (flink, &st); if (new_flags == 0) return; old_flags = flink->fl_flags; if ((old_flags & FL_TYPE_MASK) && (old_flags & FL_TYPE_MASK) != (new_flags & FL_TYPE_MASK)) { char *file_name = alloca (PATH_MAX); absolute_file_name (file_name, flink); error (0, 0, _("notice: `%s' was a %s, but is now a %s!"), file_name, (FL_IS_FILE (old_flags) ? _("file") : _("directory")), (FL_IS_FILE (new_flags) ? _("file") : _("directory"))); } flink->fl_flags = (old_flags & ~(FL_TYPE_MASK|FL_SYM_LINK)) | new_flags; if (FL_IS_DIR (new_flags)) { struct file_link *alias_link; #if HAVE_LINK alias_link = find_alias_link (flink, &st); #else alias_link = 0; #endif /* HAVE_LINK */ if (alias_link) { if (!(new_flags & FL_SYM_LINK)) reparent_children (flink, alias_link); } else if (sub_dirs_vec == 0) walk_dir (flink); else dynvec_append (sub_dirs_vec, flink); } else { struct member_file *member; #if HAVE_LINK member = maybe_get_member_file (flink, &st); #else member = get_member_file (flink); #endif if (member) { if (st.st_size > largest_member_file) largest_member_file = st.st_size; if (walker_verbose_flag) print_member_file (member); } } } /* Take child file_link nodes from a symlinked directory and give them to a hard linked directory. This is something of a pain since a file_link's parent node is part of its hash-table key. We must search the entire hash-table for the children. With each child, we must delete it, reset its parent link, then reinsert. */ static void reparent_children (struct file_link *dlink, struct file_link *slink) { void **slot = idh.idh_file_link_table.ht_vec; void **end = &idh.idh_file_link_table.ht_vec[idh.idh_file_link_table.ht_size]; for ( ; slot < end; slot++) { if (!HASH_VACANT (*slot)) { struct file_link *child = (struct file_link *) *slot; if (child->fl_parent == slink) { void **new_slot; *slot = hash_deleted_item; child->fl_parent = dlink; new_slot = hash_find_slot (&idh.idh_file_link_table, child); *new_slot = child; } } } } /****************************************************************************/ /* Separate the wheat from the chaff. Mark those file_links that are components in member files. */ void mark_member_file_links (struct idhead *idhp) { struct member_file **members_0 = (struct member_file **) hash_dump (&idhp->idh_member_file_table, 0, member_file_qsort_compare); struct member_file **end = &members_0[idhp->idh_member_file_table.ht_fill]; struct member_file **members; long new_index = 0; for (members = members_0; members < end; members++) { struct member_file *member = *members; struct file_link *flink; member->mf_index = new_index++; for (flink = member->mf_link; !(flink->fl_flags & FL_USED); flink = flink->fl_parent) flink->fl_flags |= FL_USED; } free (members_0); } #if HAVE_LINK /****************************************************************************/ /* Return a `member_file' for this `flink' *if* the filename matches some scan pattern, and no alias for the file takes precedence ([1] hard-links dominate symbolic-links; [2] for two hard-links: first come, first served). */ static struct member_file * maybe_get_member_file (struct file_link *flink, struct stat *stp) { struct file_link *alias_link; struct member_file *member; struct member_file *alias_member = 0; member = get_member_file (flink); alias_link = find_alias_link (flink, stp); if (alias_link) alias_member = find_member_file (alias_link); if (member && alias_member) { int ancestry = symlink_ancestry (flink); int alias_ancestry = symlink_ancestry (alias_link); if (member->mf_lang_args != alias_member->mf_lang_args) { char *file_name = alloca (PATH_MAX); char *alias_file_name = alloca (PATH_MAX); absolute_file_name (file_name, flink); absolute_file_name (alias_file_name, alias_link); error (0, 0, _("warning: `%s' and `%s' are the same file, but yield different scans!"), file_name, alias_file_name); } else if (alias_ancestry > ancestry) { hash_delete (&idh.idh_member_file_table, member); member->mf_link->fl_flags &= ~FL_MEMBER; return 0; } else { hash_delete (&idh.idh_member_file_table, alias_member); alias_member->mf_link->fl_flags &= ~FL_MEMBER; } } return member; } /* Return a previously registered alias for `flink', if any. */ static struct file_link * find_alias_link (struct file_link *flink, struct stat *stp) { struct dev_ino *dev_ino; struct dev_ino **slot; dev_ino = (struct dev_ino *) obstack_alloc (&idh.idh_dev_ino_obstack, sizeof (struct dev_ino)); dev_ino->di_dev = stp->st_dev; dev_ino->di_ino = stp->st_ino; slot = (struct dev_ino **) hash_find_slot (&idh.idh_dev_ino_table, dev_ino); if (HASH_VACANT (*slot)) { dev_ino->di_link = flink; hash_insert_at (&idh.idh_dev_ino_table, dev_ino, slot); return 0; } else { obstack_free (&idh.idh_dev_ino_obstack, dev_ino); return (*slot)->di_link; } } /* Return the distance from `flink' to a symbolic-link ancestor directory. PATH_MAX is considered an infinite distance (e.g., there are no symlinks between `flink' and the root). */ static int _GL_ATTRIBUTE_PURE symlink_ancestry (struct file_link *flink) { int ancestry = 0; while (!IS_ROOT_FILE_LINK (flink)) { if (flink->fl_flags & FL_SYM_LINK) return ancestry; ancestry++; flink = flink->fl_parent; } return PATH_MAX; } #endif /* HAVE_LINK */ static struct member_file * get_member_file (struct file_link *flink) { struct member_file *member; struct member_file **slot; struct lang_args const *args; args = get_lang_args (flink); if (args == 0) return 0; if (!lang_wanted (args->la_language->lg_name)) return 0; member = (struct member_file *) obstack_alloc (&idh.idh_member_file_obstack, sizeof (struct member_file)); member->mf_link = flink; slot = (struct member_file **) hash_find_slot (&idh.idh_member_file_table, member); if (HASH_VACANT (*slot)) { member->mf_index = -1; hash_insert_at (&idh.idh_member_file_table, member, slot); flink->fl_flags |= FL_MEMBER; } else { obstack_free (&idh.idh_member_file_obstack, member); #if 0 if (member->mf_lang_args != args) { char *file_name = alloca (PATH_MAX); absolute_file_name (file_name, flink); error (0, 0, _("notice: scan parameters changed for `%s'"), file_name); member->mf_old_index = -1; } #endif member = *slot; } member->mf_lang_args = args; return member; } struct member_file * find_member_file (struct file_link const *flink) { struct member_file key; struct member_file **slot; key.mf_link = (struct file_link *) flink; slot = (struct member_file **) hash_find_slot (&idh.idh_member_file_table, &key); if (HASH_VACANT (*slot)) return 0; return *slot; } /* March down the list of lang_args, and return the first one whose pattern matches FLINK. Return the matching lang_args, if a scanner exists for that language, otherwise return 0. */ static struct lang_args * get_lang_args (struct file_link const *flink) { struct lang_args *args = lang_args_list; char *file_name = alloca (PATH_MAX); while (args) { if (strchr (args->la_pattern, SLASH_CHAR)) { absolute_file_name (file_name, flink); if (fnmatch (args->la_pattern, file_name, MAYBE_FNM_CASEFOLD | FNM_FILE_NAME) == 0) return (args->la_language ? args : 0); } else { if (fnmatch (args->la_pattern, flink->fl_name, MAYBE_FNM_CASEFOLD) == 0) return (args->la_language ? args : 0); } args = args->la_next; } return ((lang_args_default && lang_args_default->la_language) ? lang_args_default : 0); } static void print_member_file (struct member_file *member) { char *file_name = alloca (PATH_MAX); absolute_file_name (file_name, member->mf_link); printf ("%ld: %s: %s\n", idh.idh_member_file_table.ht_fill - 1, member->mf_lang_args->la_language->lg_name, file_name); } /****************************************************************************/ static char **langs_included; static char **langs_excluded; static int lang_wanted (char const *lang_name) { if (langs_excluded) return !string_in_vector (lang_name, langs_excluded); else if (langs_included) return string_in_vector (lang_name, langs_included); else return 1; } void include_languages (char *lang_names) { if (langs_excluded) error (EXIT_FAILURE, 0, _("can't mix --include and --exclude options")); langs_included = append_strings_to_vector (langs_included, lang_names, white_space); } void exclude_languages (char *lang_names) { if (langs_included) error (EXIT_FAILURE, 0, _("can't mix --include and --exclude options")); langs_excluded = append_strings_to_vector (langs_excluded, lang_names, white_space); } static int _GL_ATTRIBUTE_PURE vector_length (char **vector) { int length = 0; while (*vector++) length++; return length; } static char ** append_strings_to_vector (char **vector_0, char *string, char const *delimiter_class) { char **vector; if (vector_0) { int length = vector_length (vector_0); vector_0 = xnrealloc (vector_0, length + 2 + strlen (string) / 2, sizeof *vector_0); vector = &vector_0[length]; } else vector = vector_0 = xnmalloc (2 + strlen (string) / 2, sizeof *vector); do *vector = strsep (&string, delimiter_class); while (*vector++); return xnrealloc (vector_0, vector - vector_0, sizeof *vector_0); } static int _GL_ATTRIBUTE_PURE string_in_vector (char const *string, char **vector) { while (*vector) if (strequ (string, *vector++)) return 1; return 0; } /****************************************************************************/ /* Convert a file name string to an absolute chain of `file_link's. */ struct file_link * parse_file_name (char *file_name, struct file_link *relative_dir_link) { struct file_link *flink; char **links_0; char **links; if (IS_ABSOLUTE (file_name)) { #if HAVE_LINK flink = get_link_from_string (SLASH_STRING, 0); #else flink = 0; #endif } else if (relative_dir_link) flink = relative_dir_link; else if (current_dir_link) flink = current_dir_link; else flink = get_current_dir_link (); links = links_0 = vectorize_string (file_name, SLASH_STRING); while (*links) { char const* link_name = *links++; if (*link_name == '\0' || IS_DOT (link_name)) ; else if (IS_DOT_DOT (link_name)) flink = flink->fl_parent; else { struct stat st; flink = get_link_from_string (link_name, flink); if (!flink->fl_flags) { flink->fl_flags = classify_link (flink, &st); if (!flink->fl_flags) return 0; } } } free (links_0); return flink; } /* Return an absolute chain of `file_link's representing the current working directory. */ struct file_link * get_current_dir_link (void) { struct file_link *dir_link; char *cwd; char **links_0; char **links; if (current_dir_link) return current_dir_link; cwd = getenv ("PWD"); cwd = same_as_dot (cwd) ? xstrdup (cwd) : xgetcwd (); if (cwd == NULL) error (EXIT_FAILURE, errno, _("can't get working directory")); #if HAVE_LINK dir_link = get_link_from_string (SLASH_STRING, 0); dir_link->fl_flags = (dir_link->fl_flags & ~FL_TYPE_MASK) | FL_TYPE_DIR; #else dir_link = 0; #endif links = links_0 = vectorize_string (cwd, SLASH_STRING); if (*links && **links) /* Not in / */ while (*links) { struct stat st; char const* link_name = *links++; dir_link = get_link_from_string (link_name, dir_link); if (!dir_link->fl_flags) dir_link->fl_flags = classify_link (dir_link, &st); } chdir_to_link (dir_link); free (links_0); free (cwd); current_dir_link = dir_link; return dir_link; } static int same_as_dot (char const *cwd) { struct stat cwd_st; struct stat dot_st; if (cwd == 0 || *cwd != '/' || stat (cwd, &cwd_st) < 0 || stat (".", &dot_st) < 0) return 0; return ((cwd_st.st_ino == dot_st.st_ino) && (cwd_st.st_dev == dot_st.st_dev)); } /* Change the working directory to the directory represented by `dir_link'. Choose the shortest path to the destination based on the cached value of the current directory. */ int chdir_to_link (struct file_link *dir_link) { char *to_dir_name = alloca (PATH_MAX); if (current_dir_link == dir_link) return 1; if (current_dir_link) maybe_relative_file_name (to_dir_name, dir_link, current_dir_link); else absolute_file_name (to_dir_name, dir_link); if (chdir (to_dir_name) < 0) { if (IS_ABSOLUTE (to_dir_name)) error (0, errno, _("can't chdir to `%s'"), to_dir_name); else { char *from_dir_name = alloca (PATH_MAX); absolute_file_name (from_dir_name, current_dir_link); error (0, errno, _("can't chdir to `%s' from `%s'"), to_dir_name, from_dir_name); } return 0; } else { current_dir_link = dir_link; return 1; } } static char ** vectorize_string (char *string, char const *delimiter_class) { char **vector_0 = xmalloc (sizeof(char *) * (2 + strlen (string) / 2)); char **vector = vector_0; *vector++ = strsep (&string, delimiter_class); if (vector[-1]) { /* Toss first field if empty */ if (vector[-1][0] == '\0') vector--; do *vector = strsep (&string, delimiter_class); while (*vector++); } return xnrealloc (vector_0, vector - vector_0, sizeof *vector_0); } void prune_file_names (char *str, struct file_link *from_link) { char **file_names_0 = vectorize_string (str, white_space); char **file_names = file_names_0; while (*file_names) { struct file_link *flink = parse_file_name (*file_names++, from_link); if (flink) flink->fl_flags |= FL_PRUNE; } free (file_names_0); } /****************************************************************************/ /* Gather information about the link at `flink'. If it's a good file or directory, return its mod-time and type. */ static int classify_link (struct file_link *flink, struct stat *stp) { unsigned int flags = 0; if (!chdir_to_link (flink->fl_parent)) return 0; #ifdef S_IFLNK if (lstat (flink->fl_name, stp) < 0) { error (0, errno, _("can't lstat `%s' from `%s'"), flink->fl_name, xgetcwd ()); return 0; } if (S_ISLNK (stp->st_mode)) { #endif if (stat (flink->fl_name, stp) < 0) { error (0, errno, _("can't stat `%s' from `%s'"), flink->fl_name, xgetcwd ()); return 0; } #ifdef S_IFLNK flags |= FL_SYM_LINK; } #endif if (S_ISDIR (stp->st_mode)) flags |= FL_TYPE_DIR; else if (stp->st_size == 0) return 0; else if (S_ISREG (stp->st_mode)) flags |= FL_TYPE_FILE; else return 0; return flags; } /****************************************************************************/ /* Retrieve an existing flink; or if none exists, create one. */ static struct file_link * get_link_from_dirent (struct dirent *dirent, struct file_link *parent) { struct file_link **slot; struct file_link *new_link; new_link = make_link_from_dirent (dirent, parent); slot = (struct file_link **) hash_find_slot (&idh.idh_file_link_table, new_link); if (HASH_VACANT (*slot)) slot = (struct file_link **) hash_insert_at (&idh.idh_file_link_table, new_link, slot); else obstack_free (&idh.idh_file_link_obstack, new_link); return *slot; } static struct file_link * get_link_from_string (char const *name, struct file_link *parent) { struct file_link **slot; struct file_link *new_link; new_link = make_link_from_string (name, parent); slot = (struct file_link **) hash_find_slot (&idh.idh_file_link_table, new_link); if (HASH_VACANT (*slot)) slot = (struct file_link **) hash_insert_at (&idh.idh_file_link_table, new_link, slot); else obstack_free (&idh.idh_file_link_obstack, new_link); return *slot; } struct file_link * make_link_from_dirent (struct dirent* dirent, struct file_link *parent) { struct file_link *flink; flink = (struct file_link *) obstack_alloc (&idh.idh_file_link_obstack, sizeof (struct file_link) + strlen (dirent->d_name)); strcpy (flink->fl_name, dirent->d_name); flink->fl_parent = parent ? parent : flink; flink->fl_flags = 0; return flink; } static struct file_link * make_link_from_string (char const* name, struct file_link *parent) { struct file_link *flink; flink = (struct file_link *) obstack_alloc (&idh.idh_file_link_obstack, sizeof (struct file_link) + strlen (name)); strcpy (flink->fl_name, name); flink->fl_parent = parent ? parent : flink; flink->fl_flags = 0; return flink; } /****************************************************************************/ /* Convert a `file_link' chain to a vector of component `file_link's, with the root at [0]. Return a pointer beyond the final component. */ static struct file_link const ** fill_link_vector (struct file_link const **vec_buf, struct file_link const *flink) { vec_buf = fill_link_vector_1 (vec_buf, flink); *vec_buf = 0; return vec_buf; } static struct file_link const ** fill_link_vector_1 (struct file_link const **vec_buf, struct file_link const *flink) { if (!IS_ROOT_FILE_LINK (flink)) vec_buf = fill_link_vector_1 (vec_buf, flink->fl_parent); *vec_buf++ = flink; return vec_buf; } /****************************************************************************/ /* Fill BUF_0 with a path to TO_LINK. If a relative path from FROM_LINK is possible (i.e., no intervening symbolic-links) and shorter, return the relative path; otherwise, return an absolute path. */ char * maybe_relative_file_name (char *buf_0, struct file_link const *to_link, struct file_link const *from_link) { struct file_link const **to_link_vec_0 = alloca (sizeof (struct file_link const *) * (PATH_MAX/2)); struct file_link const **from_link_vec_0 = alloca (sizeof (struct file_link const *) * (PATH_MAX/2)); struct file_link const **to_link_vec = to_link_vec_0; struct file_link const **from_link_vec = from_link_vec_0; struct file_link const **from_link_end; struct file_link const **from_links; int alloc_me = (buf_0 == 0); char *buf; int levels; if (from_link == 0) from_link = current_dir_link; if (alloc_me) buf_0 = xmalloc (PATH_MAX); /* Optimize common cases. */ if (to_link == from_link) strcpy (buf_0, "."); else if (to_link->fl_parent == from_link) strcpy (buf_0, to_link->fl_name); else if (from_link->fl_flags & FL_SYM_LINK) absolute_file_name (buf_0, to_link); else if (to_link == from_link->fl_parent) strcpy (buf_0, ".."); else if (to_link->fl_parent == from_link->fl_parent) { strcpy (buf_0, DOT_DOT_SLASH); strcpy (&buf_0[3], to_link->fl_name); } else { from_link_end = fill_link_vector (from_link_vec, from_link); fill_link_vector (to_link_vec, to_link); while (*to_link_vec == *from_link_vec) { if (*to_link_vec == 0) { strcpy (buf_0, "."); goto out; } to_link_vec++; from_link_vec++; } levels = from_link_end - from_link_vec; if (levels >= (from_link_vec - from_link_vec_0)) { absolute_file_name (buf_0, to_link); goto out; } for (from_links = from_link_vec; *from_links; from_links++) if ((*from_links)->fl_flags & FL_SYM_LINK) { absolute_file_name (buf_0, to_link); goto out; } buf = fill_dot_dots (buf_0, levels); if (*to_link_vec == 0) *--buf = '\0'; else { do { strcpy (buf, (*to_link_vec)->fl_name); buf += strlen (buf); if ((*to_link_vec)->fl_name[0] != SLASH_CHAR && *++to_link_vec) *buf++ = SLASH_CHAR; } while (*to_link_vec); } } out: if (alloc_me) buf_0 = xrealloc (buf_0, (1 + strlen (buf_0))); return buf_0; } /* Fill `buf' with sequences of "../" in order to ascend so many `levels' in a directory tree. */ static char * fill_dot_dots (char *buf, int levels) { while (levels--) { strcpy (buf, DOT_DOT_SLASH); buf += 3; } return buf; } /****************************************************************************/ /* Fill `buffer' with the absolute path to `flink'. */ char * absolute_file_name (char *buf_0, struct file_link const *flink) { char *end; int alloc_me = (buf_0 == 0); if (alloc_me) buf_0 = xmalloc (PATH_MAX); end = absolute_file_name_1 (buf_0, flink); /* Clip the trailing slash. */ #if HAVE_LINK if (end > &buf_0[1]) end--; #else if (end > &buf_0[3]) end--; #endif *end++ = '\0'; if (alloc_me) buf_0 = xrealloc (buf_0, (size_t)(end - buf_0)); return buf_0; } static char * absolute_file_name_1 (char *buf, struct file_link const *flink) { char *end; if (IS_ROOT_FILE_LINK (flink)) end = buf; else end = absolute_file_name_1 (buf, flink->fl_parent); strcpy (end, flink->fl_name); if (*end == SLASH_CHAR) end++; else { end += strlen (end); *end++ = SLASH_CHAR; } return end; } /****************************************************************************/ /* Hash stuff for `struct member_file'. */ static unsigned long member_file_hash_1 (void const *key) { return_ADDRESS_HASH_1 (((struct member_file const *) key)->mf_link); } static unsigned long member_file_hash_2 (void const *key) { return_ADDRESS_HASH_2 (((struct member_file const *) key)->mf_link); } static int member_file_hash_compare (void const *x, void const *y) { return_ADDRESS_COMPARE (((struct member_file const *) x)->mf_link, ((struct member_file const *) y)->mf_link); } /* Collating sequence: - language.map index - mf_link: breadth-first, alphabetical */ int member_file_qsort_compare (void const *x, void const *y) { struct member_file const *mfx = *(struct member_file const *const *) x; struct member_file const *mfy = *(struct member_file const *const *) y; int result; INTEGER_COMPARE (mfx->mf_lang_args->la_index, mfy->mf_lang_args->la_index, result); if (result) return result; else { struct file_link const *flx = mfx->mf_link; struct file_link const *fly = mfy->mf_link; if (flx->fl_parent == fly->fl_parent) return strcmp (flx->fl_name, fly->fl_name); result = (links_depth (flx) - links_depth (fly)); if (result) return result; while (flx->fl_parent != fly->fl_parent) { flx = flx->fl_parent; fly = fly->fl_parent; } return strcmp (flx->fl_name, fly->fl_name); } } /****************************************************************************/ /* Hash stuff for `struct file_link'. */ static unsigned long _GL_ATTRIBUTE_PURE file_link_hash_1 (void const *key) { unsigned long result = 0; struct file_link const *parent = (IS_ROOT_FILE_LINK (((struct file_link const *) key)) ? 0 : ((struct file_link const *) key)->fl_parent); STRING_HASH_1 (((struct file_link const *) key)->fl_name, result); ADDRESS_HASH_1 (parent, result); return result; } static unsigned long _GL_ATTRIBUTE_PURE file_link_hash_2 (void const *key) { unsigned long result = 0; struct file_link const *parent = (IS_ROOT_FILE_LINK (((struct file_link const *) key)) ? 0 : ((struct file_link const *) key)->fl_parent); STRING_HASH_2 (((struct file_link const *) key)->fl_name, result); ADDRESS_HASH_2 (parent, result); return result; } static int _GL_ATTRIBUTE_PURE file_link_hash_compare (void const *x, void const *y) { int result; struct file_link const *x_parent = (IS_ROOT_FILE_LINK (((struct file_link const *) x)) ? 0 : ((struct file_link const *) x)->fl_parent); struct file_link const *y_parent = (IS_ROOT_FILE_LINK (((struct file_link const *) y)) ? 0 : ((struct file_link const *) y)->fl_parent); ADDRESS_COMPARE (x_parent, y_parent, result); if (result) return result; STRING_COMPARE (((struct file_link const *) x)->fl_name, ((struct file_link const *) y)->fl_name, result); return result; } /* Count directory components between flink and its root. */ int links_depth (struct file_link const *flink) { int depth = 0; while (!IS_ROOT_FILE_LINK (flink)) { depth++; flink = flink->fl_parent; } return depth; } #if HAVE_LINK /****************************************************************************/ /* Hash stuff for `struct dev_ino'. */ static unsigned long dev_ino_hash_1 (void const *key) { unsigned long result = 0; INTEGER_HASH_1 (((struct dev_ino const *) key)->di_dev, result); INTEGER_HASH_1 (((struct dev_ino const *) key)->di_ino, result); return result; } static unsigned long dev_ino_hash_2 (void const *key) { unsigned long result = 0; INTEGER_HASH_2 (((struct dev_ino const *) key)->di_dev, result); INTEGER_HASH_2 (((struct dev_ino const *) key)->di_ino, result); return result; } static int dev_ino_hash_compare (void const *x, void const *y) { int result; INTEGER_COMPARE (((struct dev_ino const *) x)->di_ino, ((struct dev_ino const *) y)->di_ino, result); if (result) return result; INTEGER_COMPARE (((struct dev_ino const *) x)->di_dev, ((struct dev_ino const *) y)->di_dev, result); return result; } #endif /*******************************************************************/ struct file_link * init_walker (struct idhead *idhp) { init_idh_obstacks (idhp); init_idh_tables (idhp); return get_current_dir_link (); } void init_idh_obstacks (struct idhead *idhp) { obstack_init (&idhp->idh_member_file_obstack); obstack_init (&idhp->idh_file_link_obstack); #if HAVE_LINK obstack_init (&idhp->idh_dev_ino_obstack); #endif } void init_idh_tables (struct idhead *idhp) { hash_init (&idhp->idh_member_file_table, 16*1024, member_file_hash_1, member_file_hash_2, member_file_hash_compare); hash_init (&idhp->idh_file_link_table, 16*1024, file_link_hash_1, file_link_hash_2, file_link_hash_compare); #if HAVE_LINK hash_init (&idhp->idh_dev_ino_table, 16*1024, dev_ino_hash_1, dev_ino_hash_2, dev_ino_hash_compare); #endif } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/libidu/id-lang.map���������������������������������������������������������0000664�0000000�0000000�00000003521�12166360012�014663� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Welcome to the mkid language mapper. # # The format of each line is: # # <pattern> <language> [options] # # Filenames are matched top-to-bottom against the patterns, and the # first match is chosen. The special language `IGNORE' means that # this file should be ignored by mkid. The options are # language-specific command-line options to mkid. # # If a file name doesn't match any pattern, it is assigned the default # language. The default language may be specified here with the # special pattern `**', or overridden from the mkid command-line with # the `--default-lang=LANG' option. # # The special pattern `***' means to include the named file that # immediately follows. If no file is named, then the default system # language mapper file (i.e., this file) is included. # Default language ** IGNORE # Although this is listed first, # the default language pattern is # logically matched last. # Backup files *~ IGNORE *.bak IGNORE *.bk[0-9] IGNORE # SCCS files [sp].* IGNORE # C dependencies created by automake */.deps/* IGNORE *.h C *.h.in C *.in.h C *.H C++ *.hh C++ *.hpp C++ *.hxx C++ *.l C *.lex C *.y C *.yacc C *.c C *.C C++ *.cc C++ *.cpp C++ *.CPP C++ *.cxx C++ *.java Java ChangeLog* Cdoc *.[sS] asm --comment=; *.asm asm --comment=; # [nt]roff *.[0-9] roff *.ms roff *.me roff *.mm roff *.tex TeX *.ltx TeX *.texi texinfo *.texinfo texinfo # portable object (i18n) *.po po *.el lisp *.elc lisp *.lisp lisp *.scm lisp *.am make *.mk make Makefile make Makefile.* make GNUmakefile make *.doc text *.txt text *.org text *.m4 m4 *.ac m4 configure.in m4 *.PL perl *.pl perl *.pm perl *.rb perl *.Z FILTER gzip -d <%s *.gz FILTER gzip -d <%s *.bz2 FILTER bzip2 -d <%s *.xz FILTER xz -d <%s *.lzma FILTER xz -d <%s �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/AUTHORS��������������������������������������������������������������������0000664�0000000�0000000�00000000373�10623104751�012455� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������The idutils were written by Greg McGary, who assigned his copyright to the FSF on March 1, 1996. idutils.texi was written by Tom Horsley, and explicitly not copyrighted, but contributed to the public domain. An FSF copyright has since been affixed. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lisp/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�12210465166�012355� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lisp/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000126�11434330764�014412� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to create Makefile.in dist_lisp_LISP = idutils.el ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lisp/Makefile.in�����������������������������������������������������������0000664�0000000�0000000�00000142231�12166360012�014417� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lisp DIST_COMMON = $(dist_lisp_LISP) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/build-aux/elisp-comp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/asm-underscore.m4 \ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/chdir-long.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exponentd.m4 \ $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \ $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fflush.m4 \ $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \ $(top_srcdir)/m4/fprintf-posix.m4 $(top_srcdir)/m4/fpurge.m4 \ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/freopen.m4 \ $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ $(top_srcdir)/m4/isnand.m4 $(top_srcdir)/m4/isnanf.m4 \ $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/iswblank.m4 \ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexpl.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \ $(top_srcdir)/m4/localename.m4 $(top_srcdir)/m4/lock.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 \ $(top_srcdir)/m4/printf-posix-rpl.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readdir.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/rewinddir.m4 $(top_srcdir)/m4/save-cwd.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \ $(top_srcdir)/m4/signbit.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/sprintf-posix.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcasestr.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsep.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/ungetc.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vfprintf-posix.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(lispdir)" dist_lispLISP_INSTALL = $(INSTALL_DATA) LISP = $(dist_lisp_LISP) am__ELFILES = idutils.el am__ELCFILES = $(am__ELFILES:.el=.elc) ELCFILES = $(LISP:.el=.elc) elisp_comp = $(top_srcdir)/build-aux/elisp-comp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNF = @HAVE_COPYSIGNF@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTF = @HAVE_RINTF@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ POSIX_SHELL = @POSIX_SHELL@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YIELD_LIB = @YIELD_LIB@ abs_aux_dir = @abs_aux_dir@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_lisp_LISP = idutils.el all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lisp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lisp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): elc-stamp: $(LISP) @echo 'WARNING: Warnings can be ignored. :-)' @rm -f elc-temp && touch elc-temp if test "$(EMACS)" != no; then \ set x; \ list='$(LISP)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ set x "$$@" "$$d$$p"; shift; \ done; \ shift; \ EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \ else : ; fi @mv -f elc-temp $@ $(am__ELCFILES): elc-stamp @dry=; for f in x $$MAKEFLAGS; do \ case $$f in \ *=*|--*);; \ *n*) dry=:;; \ esac; \ done; \ if test "$(EMACS)" != no && test ! -f $@; then \ $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \ if $$dry mkdir elc-lock 2>/dev/null; then \ $$dry rm -f elc-stamp; \ $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \ $$dry rmdir elc-lock; \ else \ while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \ $$dry test -f elc-stamp; exit $$?; \ fi; \ else : ; fi install-dist_lispLISP: $(dist_lisp_LISP) $(ELCFILES) @$(NORMAL_INSTALL) @if test "$(EMACS)" != no && test -n "$(lispdir)"; then \ $(MKDIR_P) "$(DESTDIR)$(lispdir)"; \ list='$(dist_lisp_LISP)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ echo " $(dist_lispLISP_INSTALL) '$$d$$p' '$(DESTDIR)$(lispdir)/$$f'"; \ $(dist_lispLISP_INSTALL) "$$d$$p" "$(DESTDIR)$(lispdir)/$$f" || exit $$?; \ if test -f $${p}c; then \ echo " $(dist_lispLISP_INSTALL) '$${p}c' '$(DESTDIR)$(lispdir)/$${f}c'"; \ $(dist_lispLISP_INSTALL) "$${p}c" "$(DESTDIR)$(lispdir)/$${f}c" || exit $$?; \ else : ; fi; \ done; \ else : ; fi uninstall-dist_lispLISP: @$(NORMAL_UNINSTALL) @test "$(EMACS)" != no && test -n "$(lispdir)" || exit 0; \ list='$(dist_lisp_LISP)'; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files="$$files "`echo "$$files" | sed 's|$$|c|'`; \ dir='$(DESTDIR)$(lispdir)'; $(am__uninstall_files_from_dir) clean-lisp: -rm -f elc-stamp $(ELCFILES) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LISP) $(ELCFILES) installdirs: for dir in "$(DESTDIR)$(lispdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-lisp mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_lispLISP install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_lispLISP .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-lisp \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dist_lispLISP install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-dist_lispLISP # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/lisp/idutils.el������������������������������������������������������������0000664�0000000�0000000�00000005206�12166360012�014351� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; idutils.el --- emacs interface to `lid -R grep', a.k.a. `gid' ;;; Copyright (C) 1995-1996, 2006-2012 Free Software Foundation, Inc. ;;; Greg McGary <gkm@gnu.ai.mit.edu>. ;; This file is part of GNU idutils. ;; GNU idutils 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, or (at your option) ;; any later version. ;; GNU idutils 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 <http://www.gnu.org/licenses/>. ;;; This package provides the tools meant to help editing PO files, ;;; as documented in the GNU idutils user's manual. See this manual ;;; for user documentation, which is not repeated here. ;;; To install, merely put this file somewhere GNU Emacs will find it, ;;; then add the following lines to your .emacs file: ;;; ;;; (autoload 'gid "idutils" "run idutils' gid command" t) ;;; ;;; You may also adjust some customizations variables, below, by defining ;;; them in your .emacs file. (require 'compile) (require 'thingatpt) (defvar gid-command "gid" "The command run by the gid function.") (defvar gid-mode-font-lock-keywords '(("^\\(Compilation\\|Gid\\) \\(started\\|finished\\).*" (0 '(face nil message nil help-echo nil mouse-face nil) t)))) (defvar gid-use-search-in-buffer-name t "If non-nil, use the search string in the gid buffer's name.") (define-compilation-mode gid-mode "Gid" "Specialization of compilation-mode for use with gid." nil) ;;;###autoload (defun gid (args) "Run gid, with user-specified ARGS, and collect output in a buffer. While gid runs asynchronously, you can use the \\[next-error] command to find the text that gid hits refer to. The command actually run is defined by the gid-command variable." (interactive (list (read-shell-command (concat "Run " gid-command " (with args): ") (thing-at-point 'symbol)))) (let (compile-command (compilation-error-regexp-alist grep-regexp-alist) (compilation-directory default-directory) (gid-full-buffer-name (concat "*gid-" args "*"))) (save-some-buffers (not compilation-ask-about-save) nil) (compilation-start (concat gid-command " " args) 'gid-mode (when gid-use-search-in-buffer-name (function (lambda (ignore) gid-full-buffer-name))) (regexp-quote args)))) (provide 'idutils) ;;; idutils.el ends here ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/idutils.spec���������������������������������������������������������������0000664�0000000�0000000�00000003402�12166360012�013730� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Name: idutils Version: 4.6 Release: 1%{?dist} Summary: A simple, fast, high-capacity, language-independent identifier database tool Group: Development/Tools License: GPLv3+ URL: http://www.gnu.org/software/idutils/ Source0: http://ftp.gnu.org/gnu/idutils/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: emacs, gettext-devel Requires(post): info Requires(preun): info %description `mkid' is a simple, fast, high-capacity, language-independent identifier database tool. Actually, the term `identifier' is too limiting--`mkid' stores tokens, be they program identifiers of any form, literal numbers, or words of human-readable text. Database queries can be issued from the command-line, or from within emacs, serving as an augmented tags facility. %prep %setup -q %build %configure make %{?_smp_mflags} %check make check %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} rm -f $RPM_BUILD_ROOT%{_infodir}/dir %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root,-) %doc ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README* THANKS TODO %doc %{_mandir}/man1/*.1.gz %{_bindir}/* %{_datadir}/emacs/site-lisp/ %{_datadir}/id-lang.map %{_infodir}/idutils.info* %post /sbin/install-info %{_infodir}/idutils.info.gz %{_infodir}/dir || : %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/idutils.info.gz %{_infodir}/dir || : fi %changelog * Sat Oct 18 2008 Jim Meyering <meyering@redhat.com> - Newer version of gnulib to fix test-program build failure on ppc. * Fri Oct 17 2008 Jim Meyering <meyering@redhat.com> - Include man1/*.1.gz and tweak Source0. * Fri Sep 12 2008 Markus Armbruster <armbru@redhat.com> - Initial build for Fedora ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/ABOUT-NLS������������������������������������������������������������������0000664�0000000�0000000�00000272155�11434330764�012653� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������1 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of May 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar as ast az be be@latin bg bn_IN bs ca crh +---------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] [] | iso_639_3 | [] | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ af am ar as ast az be be@latin bg bn_IN bs ca crh 6 0 2 3 19 1 11 3 28 3 1 38 5 cs da de el en en_GB en_ZA eo es et eu fa fi +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] | bibshelf | [] [] [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] | bombono-dvd | [] [] | buzztard | [] [] [] | cflow | [] [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | [] | cppi | [] | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] [] | flex | [] [] [] | freedink | [] [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] [] | gjay | [] [] | gliv | [] [] [] [] | glunarclock | [] [] [] | gnubiff | () | gnucash | [] () () () () () | gnuedu | [] [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] [] [] | gpe-beam | [] [] [] [] [] | gpe-bluetooth | [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] [] | gpe-sketchbook | [] [] [] [] [] | gpe-su | [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] () [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] | gsasl | [] [] | gss | [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] | gtick | [] () [] [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] [] [] | help2man | [] [] | hylafax | [] [] | idutils | [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] [] | iso_3166 | [] [] [] () [] [] [] () [] | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] [] | iso_639 | [] [] [] () [] [] [] | iso_639_3 | | jwhois | [] [] | kbd | [] [] [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] | klavaro | [] [] [] [] | latrine | [] () [] | ld | [] [] [] | leafpad | [] [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] [] | linkdr | [] [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] [] | mkisofs | [] | myserver | | nano | [] [] [] [] | opcodes | [] [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] [] | psmisc | [] [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] [] | rosegarden | () () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] [] | wget | [] [] [] [] | wyslij-po | [] | xchat | [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ cs da de el en en_GB en_ZA eo es et eu fa fi 64 105 117 18 1 8 0 28 89 18 19 0 104 fr ga gl gu he hi hr hu hy id is it ja ka kn +------------------------------------------------+ a2ps | [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] | bash | [] [] [] | bfd | [] [] | bibshelf | [] [] [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] | bombono-dvd | | buzztard | [] | cflow | [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] [] | cryptsetup | [] [] [] | dfarc | [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] | freedink | [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | () | glunarclock | [] [] [] | gnubiff | () [] () | gnucash | () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] | gpe-beam | [] [] [] | gpe-bluetooth | [] [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] | gpe-su | [] [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] [] | gtick | [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] | help2man | [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | () [] [] | iso_3166 | () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | () [] [] [] [] | iso_639 | () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] | keytouch-editor | [] [] [] [] | keytouch-keyboa... | [] [] [] [] | klavaro | [] [] | latrine | [] [] | ld | [] [] [] | leafpad | [] [] [] [] [] [] () | libc | [] [] [] [] | libexif | | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] | linkdr | [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] | psmisc | [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rosegarden | () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] | sed | [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] | xchat | [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +------------------------------------------------+ fr ga gl gu he hi hr hu hy id is it ja ka kn 121 53 20 4 8 2 5 53 2 120 5 83 66 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 12 48 4 2 2 4 24 10 19 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 61 47 91 3 55 47 8 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] | 11 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 13 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 30 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () () | 9 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 22 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] [] | 25 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 6 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 13 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] | 16 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] | 60 xkeyboard-config | [] [] [] [] | 25 +---------------------------------------------------+ 84 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 2 0 10 66 50 155 17 97 7 41 2610 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If May 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������id-utils-4.6+git20120811/NEWS�����������������������������������������������������������������������0000664�0000000�0000000�00000015721�12204226501�012102� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������GNU idutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] ** Bug fixes lid is no longer susceptible to a buffer overrun * Noteworthy changes in release 4.6 (2012-02-03) [stable] ** Bug fixes lid -L no longer mishandles open-ended ranges like "..2" and "2.." lid's -d, -o and -x options now work properly * Noteworthy changes in release 4.5 (2010-06-17) [stable] * Noteworthy changes in release 4.4 (2009-10-30) [beta] ** New features mkid and xtokid accept a new option --files0-from=FILE, to make them process only the files named in FILE. FILE must contain a list of NUL-terminated file names. ** Bug fixes mkid and xtokid now accept language specific options via the command line. * Noteworthy changes in release 4.3.92 (2008-10-18) [beta] ** Bug fixes fid: avoid a buffer overrun handle failed allocation, e.g., by strdup avoid potential realloc overflow mkid: avoid an infloop on some .el files all programs: detect write error on stdout ** Miscellaneous improvements revamp code and infrastructure, bringing it closer to coreutils' standards add automatically-generated man pages mkid recognize more suffixes: .ac, .mk, .bz2, .lzma. idutils is now licensed under the General Public License version 3 or later (GPLv3+). Version 4.2 - August 5, 2006, by Claudio Fontana * Bugfix release Version 4.1 - March 12, 2006, by Claudio Fontana * new project name: idutils (change from id-utils) * fixed many portability issues * support for java and lisp Version 4.0 - Nov 1, 2005, by Claudio Fontana * Modernize build system (autotools, gnulib, intl, large file support) * Cleaned up some code * Fixed some portability problems (some might remain) * Integrated perl support Version 3.2d - April 6, 1999, by Greg McGary * Modernize lisp/Makefile.am, replace gets with fgets. * Allocate larger scanner buffer: MIN (2MB, largest file) * compile lib/regex.c if regcomp is absent in libc. Version 3.2c - April 3, 1999, by Greg McGary * Add verbose traces to file walker: `mkid -V' * New heuristic for computing initial size of token table: MAX (1M, lg(n) * n * 16) Version 3.2b - March 29, 1999, by Greg McGary * Fixed assorted bugs * Remove arbitrary limit of 32767 on number of files that can be scanned. Now the number of files is only limited by available virtual memory. Version 3.2a - November 22, 1998, by Greg McGary * Fixed assorted bugs Version 3.2 - August 6, 1996, by Greg McGary * Major bug in eid fixed Version 3.1 - July 17, 1996, by Greg McGary * A few more portability bugs are fixed Version 3.0m - July 9, 1996, by Greg McGary * NLS is now initialized properly * Assorted portability problems are fixed * A few bugs (one serious) are fixed Version 3.0l - skipped `l' (ell) is too easy to confuse with `1' (one) Version 3.0k - June 5, 1996, by Greg McGary * `lid's command line has been revised and expanded. Control over output formats is expanded. Pattern searching options are now complete and orthogonal: word/substring, literal/regexp, case (in)sensitivity. * The texinfo manual, id-utils.texi, is now up-to-date. * `mkid' and `xtokid' support the new `--prune' option. * `mkid' and `xtokid' now implement the `--include' and `--exclude 'options. * `lid -R grep' (a.k.a. `gid') no longer prepends a space to each line-- now its output is exactly like grep's. * `fid' separates tokens with spaces if output is to a termianal, and otherwise with newlines. * If lid is in `brace' mode by default, it uses brace notation when outputting to a terminal and separates file names with spaces otherwise. If printing the token or pattern key is disabled, then file names are separated with newlines. * All programs now accept directory names for the `-f, --file=' args. When a directory is given, the file name "ID" is assumed. * gid.el is renamed id-utils.el and is installed in emacs's site-lisp/ * Source files and directories are reorganized * Misc. bugs are fixed Version 3.0j - May 31, 1996, by Greg McGary * Pre-test versions are now designated with a lower-case letter to shorten the top-level directory name to 14 chars. * `idx' has been renamed `xtokid'. * The old `pid' program has been reborn as `fnid'. * Some bugs & build problems are fixed. * Some missing prototypes are added to header files. * gcc -Wall (plus a bunch of other other warnings) is happier. * A number of idtest problems are fixed. Version 3.0.9 - May 30, 1996, by Greg McGary * The package name has been changed from `mkid' to `id-utils', and is now officially a part of GNU. * Command-line arguments have been revised to conform with GNU standards. Each command now processes --help and --version long arguments. * The texinfo manual is out-of-date. Please use the `--help' option for correct information about command-line arguments. * Message catalogs for French and German exist, but are out-of-date. * `mkid' and `idx' use a file-tree walker. Give them one or more directory names on the command-line, and they'll recursively descend looking for source files. lib/language.map (installe as $(prefix)/share/language.map) contains patterns for mapping file names to the appropriate language scanner. * id-utils now uses automake. * gid, aid and eid are now shell-script wrappers that call `lid' with the appropriate argument. * A new environment `IDPATH' contains a colon-separated list of ID file names for use by `fid' and `lid'. It is only partially implemented at this time only the first ID file is actually handled, the rest are ignored. * pid is temporarily gone, but will reappear soon. * iid has been removed from the distribution. * Support for non-ANSI compilers is broken. Don't expect it to work. If you use gcc, all will be well. * Miscellaneous bugs are fixed. Version 3.0 - February 1995, by Greg McGary * `mkid' uses a new efficient algorithm for building the database. The old algorithm was O(n^2) for space and would exhaust memory or lead to page thrashing on very large programs. The new algorithm is linear with the size of the input for both time and space. It is now possible to build very large `mkid' databases covering many thousands of files totalling tens of megabytes and containing hundreds of thousands of unique tokens. * The database header is now byte-order and word-size independent. ID files may be shared across networks of dissimilar architectures. Version 2.0 - March 1991, by Tom Horsley Version 1.0 - September 1987, by Greg McGary * Initial release to comp.sources.unix Copyright (C) 2001-2012 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the ``GNU Free Documentation License'' file as part of this distribution. �����������������������������������������������id-utils-4.6+git20120811/THANKS���������������������������������������������������������������������0000664�0000000�0000000�00000003271�11434330764�012326� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������`mkid' THANKS file All programs were written by Greg McGary. Tom Horsley maintained the programs for a time and released mkid2 to comp.sources.unix. The texinfo manual was originally written by Tom Horsley. Special thanks go to François Pinard, who worked tirelessly to refine mkid's autoconfiscation, ensure mkid's conformance to GNU standards, and generally pick all the nits that were fit to pick. 8^) Many people further contributed to mkid by reporting problems, suggesting improvements, or submitting patches. Here is a list of these people. If you contributed, but don't see your name here, please notify me (Greg McGary) at the address in the README file. Help keep this list complete and accurate. Tom Horsley <Tom.Horsley@mail.hcsc.com> Wolfgang Rupprecht <wolfgang@wsrcc.com> Marty Leisner <leisner@sdsp.mc.xerox.com> François Pinard <pinard@iro.umontreal.ca> Hal Peterson <hrp@ironwood.cray.com> Jay Lawlor <jlawlor@ptdcs2.intel.com> Paul Lew <lew@omocha.tay.dec.com> Karl Berry <karl@owl.hq.ileaf.com> Nathanael Makarevitch <nat@nataa.frmug.fr.net> Rodney Brown <rdb@mel.cocam.oz.au> Richard Stallman <rms@gnu.ai.mit.edu> Dave Wiggins <dpw@x.org> Thomas Neumann <tom@smart.ruhr.de> Jim Meyering <meyering@na-net.ornl.gov> Kazushi (Jam)Marukawa <kazusi-m@is.aist-nara.ac.jp> Tom Tromey <tromey@cygnus.com> Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Youki Kadobayashi <youki-k@is.aist-nara.ac.jp> Monty Solomon <monty@roscom.com> Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de> Nelson H. F. Beebe <beebe@math.utah.edu> Erick Branderhorst <Erick.Branderhorst@asml.nl> John Bley <jbb6@acpub.duke.edu> Marco S Hyman <marc@snafu.org> ;; Local Variables: ;; coding: utf-8 ;; End: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������